Installing Buildbot in Ubuntu

Buildbot is a continuous integration (CI) system for build and test automation. It is successfully used by many well-known projects such as WebKit, Chromium and LLVM. My particular interest in Buildbot is in using it for building and testing AMPL solvers on different platforms.

While the Buildbot documentation is good in general, information about installing this CI system in Debian-based distributions is somewhat spotty. So in this post I am going to give minimal instructions for setting up Buildbot 0.8.5 in Ubuntu 12.04.

So here they are:

  • Install buildbot:
    $ sudo apt-get install buildbot
  • Create a master:
    $ cd /var/lib/buildbot/masters
    $ sudo buildbot create-master master
    $ sudo mv master/master.cfg.sample master/master.cfg
    $ sudo chown -R buildbot:buildbot master
  • Configure the buildmaster daemon by editing /etc/default/buildmaster:
  • Start the buildmaster:
    $ sudo /etc/init.d/buildmaster start
  • Create a slave:
    $ cd /var/lib/buildbot/slaves
    $ sudo buildslave create-slave slave localhost:9989 \
        example-slave pass
    $ sudo chown -R buildbot:buildbot slave
  • Configure the buildslave daemon by editing /etc/default/buildslave:
    SLAVE_NAME[1]="buildslave #1"
  • Start the buildslave:
    $ sudo /etc/init.d/buildslave start

These instructions will give initial working configuration with buildmaster and buildslave daemons automatically started at boot time. The Buildbot will be available at localhost:8010.