Systemd units for Buildbot in Conda
- Older
Newer
Buildbot is a Python framework for continuous integration systems. In my research group we are deploying it in a Conda environment, which we also use to manage all the different moving parts of our Python-centric control infrastructure on both Windows and Linux. To start up the master and worker services, the corresponding Conda environment needs to be activated first. This is easiest to achieve using simple wrapper scripts.
For this, let’s assume we’ve created a bb
user, with the master and worker configurations in its home directory (~/master
and ~/worker
). First, create a wrapper script to start up the master process:
This assumes Conda has been installed into ~bb/anaconda3
, and the environment with the Buildbot installation is called buildbot
. master
is the name of the configuration directory, and --nodaemon
prevents daemonisation (i.e. keeps the process running in the foreground).
Make the script executable, and create a Systemd unit file that invokes it:
To start the master process, run
and to do so every time the system boots:
The analogous configuration for the worker process is
and
Start it using
This is it; Buildbot is now run automatically when the system boots. To avoid starting the graphical user interface on a desktop Ubuntu install, run systemctl set-default multi-user.target
.