README.pod
August 31, 2012 ยท View on GitHub
=head1 NAME
Pogo - Run commands on many hosts in a controlled manner
=head1 DESCRIPTION
Pogo is a highly scalable system for running arbitrary commands on many hosts in a controlled manner.
It is mostly used for quick mass software deployments on server farms while making sure only an allowed number of nodes are upgraded in parallel to ensure business continuity.
=head2 Project Setup
Pogo is hosted on Github at
https://github.com/ytoolshed/pogo
The latest stable version can be found on the master branch. The project is automatically being tested on every commit, using travis-ci's service:
http://travis-ci.org/#!/ytoolshed/pogo
=head2 Architecture
Pogo consists of several components, which can be all running on the same system, or, in order to scale it, be replicated and even be installed on many distributed hosts. Those components are
=over 4
=item Client
Users submit jobs to pogo using the client, which in turn contacts the API.
=item API
Takes requests via HTTP from the client and forwards them to a dispatcher.
=item Dispatcher
Takes job requests from the API, figures out constraints, and determines single tasks the job consists of. It then assigns tasks to workers, watches their individual completion and keeps track of overall job completion. Dispatchers can be queried by the API to determine the status of a given job.
=item Worker
Takes a task (like "ssh to a host and run this command") from the dispatcher, executes it and reports back the result. Can handle many tasks concurrently.
=back
=head2 Security
To make sure dispatchers and workers communicate over secure channels, and enable them to authenticate each other (is a connecting worker really an authorized worker, or is the dispatcher it's connecting to really an authorized dispatcher?), Pogo uses SSL server and client certs. See LPogo::Security for details.
=head1 NAME
pogo-one - All-In-One Pogo
=head1 SYNOPSIS
$ cat t/cfgs/one.cfg
tag:
# no tags
sequence:
- host3
- host2
- host1
# specify two hosts 1 and 2, but config says to run them in
# reverse order
$ perl -Ilib bin/pogo-one --password --targets host1,host2 \
--config t/cfgs/one.cfg --run-command 'date'
Password: ****
host2: Running target
host2: Success
host1: Running target
host1: Success
=head1 DESCRIPTION
C
=head2 PASSWORDS
By default, C
$ pogo-one --password ...
Password: ****
...
=head2 OPTIONS
=over 4
=item C<--config file>
Location of configuration file that defineds Pogo tags, sequences, and constraints.
=item C<--password>
If specified, c
=item C<--targets>
All hosts to run the command on. Order and parallelism is determined by the configuration file.
=item C<--run-command>
The command to run on all hosts.
=back
=head1 NAME
pogo-schedule - Print out the schedule for a job
=head1 SYNOPSIS
$ cat t/cfgs/triple.cfg
# sample configuration file
tag:
colo:
one:
- host1
- host2
- host3
two:
- host4
- host5
- host6
three:
- host7
- host8
- host9
sequence:
foo:
- $colo.one
- $colo.two
bar:
- $colo.three
$ perl -Ilib bin/pogo-schedule t/cfgs/triple.cfg
.--------------------------------------------------------------.
| Schedule |
+------------------+---------------------+---------------------+
| Thread | slot-1 | slot-2 |
+------------------+---------------------+---------------------+
| thread-000000000 | [foo.$colo.one] | [foo.$colo.two] |
| | host3, host2, host1 | host6, host5, host4 |
| thread-000000001 | [bar.$colo.three] | |
| | host9, host8, host7 | |
| unconstrained | [unconstrained] | |
'------------------+---------------------+---------------------'
=head1 DESCRIPTION
This utility pretty-prints a schedule for a job, as it would be executed based on a Pogo configuration file. It uses the actual Pogo scheduler in Pogo::Scheduler::Classic and asks it for an execution plan just as if we submitted a Pogo job for all hosts present in the configuration.
=head1 LICENSE
Copyright (c) 2010-2012 Yahoo! Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and imitations under the License.
=head1 AUTHORS
Mike Schilli m@perlmeister.com Ian Bettinger ibettinger@yahoo.com
Many thanks to the following folks for implementing the original version of Pogo:
Andrew Sloane andy@a1k0n.net, Michael Fischer michael+pogo@dynamine.net, Nicholas Harteau nrh@hep.cat, Nick Purvis nep@noisetu.be, Robert Phan robert.phan@gmail.com, Srini Singanallur ssingan@yahoo.com, Yogesh Natarajan yogesh_ny@yahoo.co.in