wiki:HowtoContributeABuildbot

Version 39 (modified by exarkun, at 2018-05-10T18:33:04Z) (diff)

modernize installation instructions

Contributing a buildbot improves the quality of Tahoe-LAFS and also is integral to defining out supported platforms, as described in Buildbot Policy. You can see the results of our buildbot network in the the Buildbot output page.

Prerequisites

  1. Install git (ideally using your OS package manager)
  2. Install Python 2.7 (ideally using your OS package manager)
  3. Install virtualenv (ideally using your OS package manager)
  4. Create a virtualenv for the Buildbot slave: virtualenv /path/to/environment
  5. Install the Buildbot slave software and dependencies in the virtualenv: /path/to/environment/bin/pip install buildbot-slave==0.8.14
  6. Use buildslave and buildbot commands from /path/to/environment/bin/ in the steps detailed below to configure and start your buildslave (activate the virtualenv to put them on your $PATH: . /path/to/environment/bin/activate).

A buildslave makes TCP connections to the buildmaster, which tahoe-lafs.org operates. You do not need a publicly routable IP address.

Configuration

Anyone who can get their code into the development repos can take control the of the user account running the buildslave process. Therefore, create a dedicated user account to run this process.

Name The Buildslave

Choose a name for your buildslave which will fit into the list of buildslave names: buildbot-tahoe-lafs/buildslaves. It should follow the pattern "YourName OperatingSystemAndVersion py2.x" -- see existing buildslave names for examples.

Get a Password

Email Tahoe-Dev (tahoe-dev_at_tahoe_-_lafs_dot_org) with your slave name and ask for a password.

Create a Buildslave

Execute the following commands:

  • tahoe-lafs: buildslave create-slave $BASEDIR_TAHOE tahoe-lafs.org:9987 $SLAVENAME $PASSWORD
  • zfec: buildbot create-slave $BASEDIR_ZFEC tahoe-lafs.org:12987 $SLAVENAME $PASSWORD
  • pycryptopp: buildbot create-slave $BASEDIR_PYCRYPTOPP tahoe-lafs.org:10998 $SLAVENAME $PASSWORD

Those three use the same $SLAVENAME, $PASSWORD and hostname, but a different $BASEDIR and a different port number.

For the $BASEDIR your can use whatever directory you want.

Then buildbot start $BASEDIR.

Monitor Output

Okay, once you've gotten all this working then we'll see your machine on the buildbot pages and we'll see how well Tahoe-LAFS passes unit tests on your platform.

Optional Configurations

You can use other mechanisms to limit the privileges available to the buildslave process/account, such as jail, chroot, or Solaris Zones. You can optionally use a different user account or other privilege-limiting mechanisms to keep the tahoe-lafs, pycryptopp, and zfec buildslaves separated from each other.