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
If you make changes, push to this repository so it's (a) backed up and (b) visible.
Slaves
Cygwin slave setup
- Installed cygwin 1.7 with:
- curl
- cvs
- gcc4
- gcc4-g++
- git
- libsqlite3-devel
- mercurial
- nano
- python
- sqlite3
- subversion
- (optional)
- make
- openssh
- screen
- vim
- Setup Tools (easy_install)
- Latest from http://pypi.python.org/pypi/setuptools#files
- -or-
- curl -O http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg
- sh setuptools-0.6c11-py2.5.egg
- 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
- Create and start slave
- mkdir ~/slave
- cd ~/slave
- buildbot create-slave . host:port slavename pwd
- make start
- If you want to have the user auto-login
- run "control userpasswords2"
- Uncheck "User must enter username and password to use this computer", click OK and enter the user credentials
- Add a shortcut in startup to 'c:\cygwin\bin\bash.exe --login -c "cd slave && make start log"'
- 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.
- Python 2.6
- Update PATH
- WinKey-Pause
- Advanced Settings
- Environment variables
- Add to PATH: ;c:\python26;c:\python26\scripts
- Twisted and Zope
- http://twistedmatrix.com/trac/wiki/Downloads#Windows
- Install everything in the Windows section.
- When you can't install, just copy it into C:\Python26\Lib\site-packages
- PyWin32
- Jinja2
- http://pypi.python.org/pypi/Jinja2
- (You may need 7zip to extract the tgz)
- 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.
- buildbot
- get the zip from http://buildbot.net/trac
- unzip it
- python setup.py install
- msysgit
- http://code.google.com/p/msysgit/downloads/list
- Use the Bash in PATH option
- Use the "Checkout as-is, commit as-is" option.
- Subversion
- hack trial.bat
- in C:\Python26\Scripts, create a file named "trial.bat" with only this line:
- @"%~dp0..\python" "%~dp0trial.py" %*
- hack trial.py
#if hasattr(os, "getuid") and os.getuid() != 0: sys.path.insert(0, os.curdir)
- If you want to have the user auto-login
- run "control userpasswords2"
- Uncheck "User must enter username and password to use this computer", click OK and enter the user credentials
- Add a shortcut in startup to 'c:\slave\build_slave.bat' with this script containing 'buildbot start'
- Reboot
- run "buildbot start"
![[Buildbot Logo]](/trac/chrome/site/header-text-transparent.png)