[Buildbot-devel] Recipe: Builder to manage buildslaves via the Web UI

Jared Grubb jared.grubb at gmail.com
Thu Apr 24 07:51:00 UTC 2014


I saw a presentation the other day about Jenkins, and they showed how they could manage their buildslaves directly from the web. As long as machine A can ssh into machine B, it just knew how to get it all set up.

I'd love to see buildbot gain a feature like this. However, it's not there, and might be a hard problem to solve in general. 

Many of you probably use Salt and Puppet and the like, but when I tried those out, it seemed the cost of meta-maintanance was worse than the manual maintanace I do now. Once I get more than 4 slaves, that probably will change, but that's how it feels now.

So, I realized I could hack something that would get me most of the way there. 

The solution is to create a Builder ("ManageSlaves") that has a ForceScheduler with a drop-down box for each buildslave: "start", "stop", "restart", and a default "none" action. You select the actions you want per buildslave, hit Build, and the right ssh command will dispatch out to each buildslave.

So, it's not the most elegant, but it works well for me, and I thought it probably would be useful for others.

The recipe is here as a github gist and works without modifying buildbot sources. Just need to add a scheduler and a builder:
https://gist.github.com/jaredgrubb/11244843

You could easily customize the script to mount drives, trim /tmp, run "sudo reboot", or whatever else you desire. Make sure you trust the people who have access to that builder too, for obvious reasons :)

Jared
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20140424/c66a1d4b/attachment.html>


More information about the devel mailing list