[Buildbot-devel] Add "latent slave" capability to buildbot (e.g., on-demand ec2 slaves)

Gary Poster gary.poster at canonical.com
Fri Jan 16 21:58:37 UTC 2009


On Tue, 2009-01-06 at 10:19 -0500, Gary Poster wrote:
> We (Canonical/Launchpad) are interested in adding what I'm calling
> "latent slaves" to buildbot--a class of slaves that can start up
> external machines like Amazon EC2 boxes when a test needs to be run.

I've got some interesting progress on this.  There's a git branch that
does this.

http://github.com/garyposter/buildbot/tree/latentslaves

It has an abstract latent slave in buildslave.py.  To make a concrete
one, you just need to subclass and implement start_instance and
stop_instance.  ec2buildslave.py has a subclass that uses EC2.
test_slaves.py has a subclass for testing.  

I added some tests to test_slaves.py.  Since the test suite failed when
I started, I just used test_run and test_slaves as my guide to make sure
I was on the right track: they pass.  I'll check soon if the "master"
branch has fixes for the test failures I encountered before, and pull
them over to my branch if so.  It would be very reassuring to have the
whole suite passing.

The ec2 subclass currently does not have tests.  It has worked in my
manual tests.  I'm guessing that I'll put a stub boto module in
sys.modules or something crazy like that to try and write some automated
tests for it eventually.

Currently this is mostly my "minimal" implementation: specifically,
machine images are expected to have the address of the master, and to be
responsible for attaching to the master.  I'm excited by exarkun's
approach of having the masters try to connect to the slaves, and it
would make our SA's happy, so I'll be pursuing it soon.

We'll hopefully start eating this dogfood next week.

So what's left?

- documentation

- automated testing of the EC2 subclass

- implement exarkun's suggestion for masters connecting to the slaves

- tweaks and tests/fixes as discovered by eating the dogfood

- merge upstream/get review/get merged

Early reviews/bug reports welcome!

Gary





More information about the devel mailing list