Tag Archives: systemd

Starting BuildBot using systemd Service unit

This post shows how to create Service unit files for systemd which let start and restart BuildBot on Linux distributions using systemd. This unit files depend on a working VirtualEnv installation of BuildBot in the /srv/buildbot directory. It also runs BuildBut with the user/group “buildbot”. Two unit files are necessary to start the master and slave instance respectively. Instead of using the buildbot/buildslave commands, the twistd binary is executed directly in foreground. twistd is an application/service framework for Python, which BuildBot makes use of.

buildbot-master.service

[Unit]
Description=BuildBot master service
After=network.target

[Service]
User=buildbot
Group=buildbot
WorkingDirectory=/srv/buildbot/
Environment="VIRTUAL_ENV=/srv/buildbot/sandbox" "PATH=/srv/buildbot/sandbox/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
ExecStart=/srv/buildbot/sandbox/bin/twistd \
          --nodaemon --no_save --pidfile= --python=master/buildbot.tac

[Install]
WantedBy=multi-user.target

buildbot-slave.service Read more »