← Back to team overview

yellow team mailing list archive

State of the beards 2012-02-03: update from Francesco and Graham

 

Hi folks,

Since Brad and Gary were away at lunch when Francesco and I were
wrapping up for the day, we thought we'd send you an email detailing
what we'd done rather than just chucking it over the wall at you.

We've updated both buildbot-master and -slave. You probably don't need
to worry too much about the slave changes, so here are the things we did
to the master charm:

 - We've added a configuration template in the hooks directory. We
   wanted to keep it separate from the one in configuration/, since that
   one is used when the buildbot master is being set up in the install
   hook. The template contains placeholders for slaves and builders,
   which we'll replace on-the-fly.
 - We've added a buildbot-relation-changed hook which handles the master
   side of the master/slave handshake. It stores the slave details in a
   pickle so that it can regenerate the whole config on the fly every
   time.
 - We've added a relation-joined hook, which generates a name and
   password for each new slave that joins.
 - We've added some (self-explanatory) helpers to helpers.py.

The next step for the master is updating the c['builders'] section
ofmaster.cfg. This is a bit more complicated, since the builders to
which
each slave belongs are stored with the slaves in the pickle.
However,it's mostly just a case of iterating over the slaves and
putting them in
a {builder: [slave_names]} kind of structure (We think; but it's 6/7pm
for us).

That's about it. Hope it helps, and that the code doesn't conflict too
much with yours. We've tested it out as follows:

 $ juju deploy repository=./ local:buildbot-master
 $ juju deploy repository=./ local:buildbot-slave
 $ juju set buildbot-slave builders=BUILDER1,BUILDER2
 $ juju add-relation buildbot-slave buildbot-master

Watch the master log file and weep with joy.

Cheers,

Francesco & Graham


Follow ups