Fork me on GitHub

slave-ball

slave-ball runs a buildbot slave for your master-ball.

Get slave-ball

You start off with a clone of slave-ball …

$ git clone git://github.com/Pike/slave-ball
$ cd slave-ball

and then you get the submodules. You only want the first level of submodules, not recursive.

$ git submodule init
$ git submodule update

Install dependencies

If you're not running a dedicated slave, you probably want to create a virtualenv. That's not required, though. We're still going to denote shell commands which assume that you have the dependencies installed with a (@slave) prompt.

Create virtualenv, if required

virtualenv \@slave
. \@slave/bin/activate

requirements.txt

Now install the requirements for slave-ball…

pip install -U -r requirements.txt

Create buildbot slave

Gathering data

You need to pick up a few data points from the master you want this slave to connect to. For one, there's the location on the network where the master is, and then there's the username and password that identify this slave.

You will find the latter inside your master's slaves.json.

In addition to the network host of the master, you'll also need the port number, which you will find inside master.cfg. It'll look like this:

c['slavePortnum'] = 9876

The bot

With the data to create the slave, run:

./scripts/buildbot create-slave slave localhost:9876 cs0 pwd

The last three arguments to this command are the host:port, name and password we collected above.

This would have created a directory called slave containing, amongst other things, a buildbot.tac file.

Next, you need to update the file slave/buildbot.tac so that it's able to pull in all the vendor-local dependencies. This is automated by running:

python scripts/update-slave.py slave

Starting the slave

Finally, you can start the slave!

./scripts/buildbot start slave

You can monitor what it's doing by running:

tail -f slave/twistd.log

Shutting down

Stopping the slave is easy:

./scripts/buildbot stop slave