The buildbot master is configured in /var/lib/buildbot, and runs PB on port 9989 and web on port 8010.

The Buildbot config itself is fairly straightforward. All info about slaves goes in near the top, and the builders are calculated from there.

nginx

Nginx is configured to proxy the /metabuildbot URI on port 80 to the buildbot's port 8010.

GitHub Receive hook

/var/lib/buildbot/github_buildbot.py is started automatically by the upstart script, /etc/event.d/github_buildbot. It uses /home/buildbot/github-buildbot-post-receive. Restart it with

initctl stop github_buildbot; initctl start github_buildbot

Master

To start the buildmaster:

initctl start buildbot

I don't know enough about event.d to figure out how to stop it, other than

su buildbot -c "/usr/bin/buildbot stop /var/lib/buildbot"

There is a shortcut to restart the buildbot:

bbrestart

Config

The metabuildbot's configuration files, sans passwords, are on github at

 http://github.com/buildbot/metabbotcfg/tree/master

If you make changes, push to this repository so it's (a) backed up and (b) visible.

Slaves

Cygwin slave setup

  1. Installed cygwin 1.7 with:
    • curl
    • cvs
    • gcc4
    • gcc4-g++
    • git
    • libsqlite3-devel
    • mercurial
    • nano
    • python
    • sqlite3
    • subversion
    • (optional)
      • make
      • openssh
      • screen
      • vim
  2. Setup Tools (easy_install)
  3. Install python dependencies
    • easy_install zope.interface
    • easy_install twisted
    • easy_install Jinja2
    • easy_install buildbot
    • easy_install simplejson
    • easy_install pysqlite
    • easy_install mock
  4. Create and start slave
    • mkdir ~/slave
    • cd ~/slave
    • buildbot create-slave . host:port slavename pwd
    • make start
  5. If you want to have the user auto-login
    1. run "control userpasswords2"
    2. Uncheck "User must enter username and password to use this computer", click OK and enter the user credentials
    3. Add a shortcut in startup to 'c:\cygwin\bin\bash.exe --login -c "cd slave && make start log"'
    4. Reboot

Pure Windows setup

These are probably insufficient, for instance I seems I forgot to include the easy_install step. But easy_install is really fucked up on Windows so it's probably better to not even try this route.

  1. Python 2.6
  2. Update PATH
    • WinKey-Pause
    • Advanced Settings
    • Environment variables
    • Add to PATH: ;c:\python26;c:\python26\scripts
  3. Twisted and Zope
  4. PyWin32
  5. Jinja2
  6. mock
    • easy_install mock
    • If you can "import mock" as an admin but not as an user, fix the DACL (access rights) on c:\python26\lib\site-packages\mock-0.6.0-py2.6.egg.
  7. buildbot
  8. msysgit
  9. Subversion
  10. hack trial.bat
    • in C:\Python26\Scripts, create a file named "trial.bat" with only this line:
    • @"%~dp0..\python" "%~dp0trial.py" %*
  11. hack trial.py
      #if hasattr(os, "getuid") and os.getuid() != 0:
      sys.path.insert(0, os.curdir)
    
  12. If you want to have the user auto-login
    1. run "control userpasswords2"
    2. Uncheck "User must enter username and password to use this computer", click OK and enter the user credentials
    3. Add a shortcut in startup to 'c:\slave\build_slave.bat' with this script containing 'buildbot start'
    4. Reboot
  13. run "buildbot start"