Unless your in the desert under a rock (where rain is clearly needed), you will have heard of Drizzle – A Lightweight SQL Database for Cloud and Web. My company 42SQL is sponsoring the BuildBot for the Drizzle project. BuildBot is a system to automate the compile/test cycle required by most software projects to validate code changes.
Check out Installing Buildbot for what’s necessary to get a working installation. This is necessary for the Master and Slaves.
Configuration was a little more complicated then expected, due to lack of accurate documentation, and reading old docs at sourceforge. Be sure now to read here.
This is a step by step approach I used to successfully configure Drizzle Build Bot (Master and Slave).
1. Create OS User.
su - useradd buildbot su - buildbot
2. Create Master Installation
buildbot create-master /home/buildbot/master cd /home/buildbot/master cp master.cfg.sample master.cfg vi master.cfg
Here is a diff of what simple changes I made to the master.cfg.sample work in my environment.
$ diff master.cfg.sample master.cfg 23c23 < c['slaves'] = [BuildSlave("bot1name", "bot1passwd")] --- > c['slaves'] = [BuildSlave("centos5_64", "paSSw0rd")] 95c95 < cvsroot = ":pserver:firstname.lastname@example.org:/cvsroot/buildbot" --- > cvsroot = ":pserver:email@example.com:/cvsroot/buildbot" 105c105 < f1.addStep(Trial(testpath=".")) --- > #f1.addStep(Trial(testpath=".")) 108c108 < 'slavename': "bot1name", --- > 'slavename': "centos5_64", 148c148 < #c['debugPassword'] = "debugpassword" --- > c['debugPassword'] = "paSSw0rd" 156c156 < # "admin", "password") --- > # "admin", "paSSw0rd") 166,167c166,167 < c['projectName'] = "Buildbot" < c['projectURL'] = "http://buildbot.sourceforge.net/" --- > c['projectName'] = "Drizzle Buildbot" > c['projectURL'] = "https://launchpad.net/drizzle/"
Initially I’m just going to test with a CVS checkout of buildbot to confirm operations.
NOTE: The example provided pserver URL in master.cfg.sample is invalid.
3. Start Master
buildbot start /home/buildbot/master > start.log tail -f /home/buildbot/master/twistd.log
4. Confirm Master
5. Create Slave
buildbot create-slave /home/buildbot/slave drizzlebuild.42sql.com:9989 centos5_64 PaSSw0rd
I got stuck here based on docs, be sure the port number is the client port.
6. Configure Slave
cd /home/buildbot/slave/info echo "Ronald Bradford < ronald .bradford @ google mail >" > admin echo "Drizzle CentOS 5 64bit "`uname -a` > host cat admin host
7. Start Slave
cd /home/buildbot/slave buildbot start /home/buildbot/slave > start.log tail -f /home/buildbot/slave/twistd.log
8. Confirm Slave
If everything is working by the time you look at the twistd.log you will see work happening.
You can also via the web interface and see in Lasted Builds the first build is working.
9. Stop Services
To stop the BuildBot master and slave.
buildbot stop /home/buildbot/master buildbot stop /home/buildbot/slave
10. Change Master Configuration
Should you make any changes to master.cfg the following command will re-read the configuration file.
buildbot sighup /home/buildbot/master
The following was added to cron
@reboot buildbot start /home/buildbot/master @reboot buildbot start /home/buildbot/slave
The @reboot is new sytax for me, so I can’t yet confirm it’s operation.
If you want to be a build slave for Drizzle, check out Instructions here