Version 6 (modified by Samuli Seppänen, 10 years ago) (diff)



OpenVPN project uses Buildbot to help increase code quality and provide snapshot packages. Buildbot is a Python application that can work in either master or slave mode. The buildmaster is the core server which accepts connections from buildslaves and tells them what they should do. Typically the clients fetch latest sources and report any build problems to buildbot which in turn informs developers via email. In software engineering this is called Continous integration and helps prevent build problems go unnoticed for extended time periods. The clients (buildslaves) can and should run on a variety of hardware / OS platforms. For example, a buildbot setup might look like this:

  • 1 buildmaster running whatever OS
  • 1 buildslave running Debian Lenny (i386)
  • 1 buildslave running Debian Lenny (amd64)
  • 1 buildslave running Ubuntu 10.04 (i386)
  • 1 buildslave running Ubuntu 10.04 (amd64)
  • 1 buildslave running Fedora13 (i386)
  • 1 buildslave running Fedora13 (amd64)
  • 1 buildslave running CentOS 5.5 (i386)
  • 1 buildslave running CentOS 5.5 (amd64)
  • 1 buildslave running OpenBSD 4.7 (i386)
  • 1 buildslave running NetBSD (sparc64)

This setup allows automatic notifications of build failures on any of those platforms. As buildbot is a general-purpose (build) automation tool, it can also be used to automatically build packages for each buildslave architecture and then push them to a central repository for users to download. It's also trivial to integrate code checking tools into the build process.

As can be seen from the above list, the number of buildslaves can easily get out of hand, so the project can make use of your help - see below for details.

Buildbot is described in more detail in the Buildbot manual.

Setting up a buildslave


Setting up a buildslave requires a few steps:

  1. Make sure you can build OpenVPN manually
  2. If you want to automatically build packages (e.g. deb/rpm) for your platform, you need to be able to do it manually first. Consult your OS'es documentation for more details.
  3. Install buildbot requirements.
  4. Download and install buildbot using one of the methods described here. More instructions are available here. You should install Buildbot 0.7.12 which the buildmaster is using.
  5. Configure buildslave

Installing builslave

Installing buildslave using easy_install

Probably easiest way is to install buildbot is by using easy_install if that's available on your platform. This will keep buildslave isolated from your OS'es package management and take care of dependencies for you. It is easiest (but [ not necessary) to run setuptools as root:

First switch to root account, e.g. using sudo or su:

$ sudo -s

Next test that easy_install should work as expected:

easy_install -n buildbot==0.7.12

If all went well, install buildbot for real:

easy_install buildbot==0.7.12

Configuring the buildslave

Once buildslave is installed you can and should switch to an ordinary user account. You can then just follow the official buildslave setup instructions: