No products in the cart.

Learn Python – Interactive Python

Conventional always-on machines

You need a recent version of the buildbot software, and you will probably want a separate ‘buildbot’ user to run the buildbot software. You may also want to set the buildbot up using a virtual environment, depending on how you manage your system. We won’t cover how to that here; it doesn’t differ from setting up a virtual environment for any other software, but you’ll need to modify the sequence of steps below as appropriate if you choose that path.

For Linux:

  • If your package manager provides the buildbot worker software, that is probably the best way to install it; it may create the buildbot user for you, in which case you can skip that step. Otherwise, do pip install buildbot-worker.
  • Create a buildbot user (using, eg: useradd) if necessary.
  • Log in as the buildbot user.

For Mac:

  • Create a buildbot user using the OS/X control panel user admin. It should be a “standard” user.
  • Log in as the buildbot user.
  • Install the buildbot worker [1] by running pip install buildbot-worker.

For Windows:

  • Create a buildbot user as a “standard” user.
  • Install the latest version of Python from
  • Open a Command Prompt.
  • Execute python -m pip install pypiwin32 buildbot-worker (note that python.exe is not added to PATH by default, making the python command accessible is left as an exercise for the user).

In a terminal window for the buildbot user, issue the following commands (you can put the buildarea wherever you want to):

mkdir buildarea
buildbot-worker create-worker buildarea workername workerpasswd

(Note that on Windows, the buildbot-worker command will be in the Scripts directory of your Python installation.)

Once this initial worker setup completes, you should edit the files buildarea/info/admin and buildarea/info/host to provide your contact info and information on the host configuration, respectively. This information will be presented in the buildbot web pages that display information about the builders running on your worker.

You will also want to make sure that the worker is started when the machine reboots:

For Linux:

  • Add the following line to /etc/crontab:

    @reboot buildbot-worker restart /path/to/buildarea

    Note that we use restart rather than start in case a crash has left a file behind.

For OSX:

  • Create a bin directory for your buildbot user:

    mkdir bin
  • Place the following script, named, into that directory:

    export PATH=/usr/local/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH
    export LC_CTYPE=en_US.utf-8
    cd /Users/buildbot/buildarea
    twistd --nodaemon --python=buildbot.tac --logfile=buildbot.log --prefix=worker

    If you use pip with Apple’s system python, add ‘/System’ to the front of the path to the Python bin directory.

  • Place a file with the following contents into /Library/LaunchDaemons:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
    <plist version="1.0">

    The recommended name for the file is net.buildbot.worker.

For Windows:

  • Add a Scheduled Task to run buildbot-worker start buildarea as the buildbot user “when the computer starts up”. It is best to provide absolute paths to the buildbot-worker command and the buildarea directory. It is also recommended to set the task to run in the directory that contains the buildarea directory.
  • Alternatively (note: don’t do both!), set up the worker service as described in the buildbot documentation.

To start the worker running for your initial testing, you can do:

buildbot-worker start buildarea

Then you can either wait for someone to make a commit, or you can pick a builder associated with your worker from the list of builders and force a build.

In any case you should initially monitor builds on your builders to make sure the tests are passing and to resolve any platform issues that may be revealed by tests that fail. Unfortunately we do not currently have a way to notify you only of failures on your builders, so doing periodic spot checks is also a good idea.



Connect with: