ReleaseEngineering/Applications/BuildbotBridge

Buildbot Bridge (BBB)

The Buildbot Bridge is a set of services that allow us to schedule jobs in Taskcluster but run them in Buildbot. The Taskcluster Listener listens for pending Taskcluster Tasks and creates BuildRequests for them. The Buildbot Listener listens for Buildbot events for those jobs, and updates the Taskcluster Tasks accordingly. The Reflector reclaims Taskcluster Tasks and polls for changes that can't be detected by listening for Taskcluster on Buildbot events.

Interactions with other systems

The Bridge interacts with and has credentials for many different systems:

  • Taskcluster - To claim and resolve Tasks
  • Buildbot Scheduler DB - To create BuildRequests
  • Buildbot Bridge Database - To track ongoing jobs
  • Pulse - To subscribe to Taskcluster and Buildbot exchanges
  • Self Serve - To cancel Builds and BuildRequests

Deployment

The Buildbot Bridge services run on multiple machines for redundancy and increased throughput. The installations are fully deployed and managed by Puppet. The running services are managed by supervisord. You can find them in "/builds/bbb" on the following Buildbot masters:

  • buildbot-master70.bb.releng.use1.mozilla.com
  • buildbot-master72.bb.releng.usw2.mozilla.com
  • buildbot-master82.bb.releng.scl3.mozilla.com

How to update

To deploy new Buildbot Bridge code you must generate a new Python package and have Puppet deploy it. Once your code has been reviewed and landed, do the following to deploy it:

  1. Bump the version in setup.py
  2. Run "python setup.py sdist" to generate a new tarball.
  3. Copy the tarball to the puppet server
  4. Update the package list in the Buildbot Bridge puppet module
  5. Wait for Puppet to update the installations
  6. Restart the services with the following command:
for i in bblistener tclistener reflector; do supervisorctl restart buildbot_bridge_$i; done

What to expect in /builds/bbb

root@buildbot-master70.bb.releng.use1.mozilla.com bbb]# ls -tlr
total 2756
drwxr-xr-x 3 cltbld cltbld    4096 May  5 08:18 lib
lrwxrwxrwx 1 cltbld cltbld      15 May  5 08:18 lib64 -> /builds/bbb/lib
drwxr-xr-x 2 cltbld cltbld    4096 May  5 08:18 include
-rw------- 1 cltbld cltbld    1241 May 21 05:41 config.json
drwxr-xr-x 2 cltbld cltbld    4096 May 25 07:07 bin
-rw-r--r-- 1 cltbld cltbld 2372446 May 25 10:55 reflector.log
-rw-r--r-- 1 cltbld cltbld  359635 May 25 11:48 bblistener.log
-rw-r--r-- 1 cltbld cltbld   56047 May 26 07:12 tclistener.log

As you can see, each service has its own log file. The supervisord logs sometimes have additional information in error cases, and can be found in /var/log/supervisord.