Friday, November 15, 2013

How to install Mozilla Releng's Buildbot on my Ubuntu machine

I've found myself many times in the last few years having to setup buildbot on a clean machine.
Setting buildbot up is easy, however, setting it up to match Mozilla's Release Engineering requires more work.

Install it inside of a virtual environment

Unfortunately, I never documented it. This is one of the many ways to be setup and I hope I haven't missed any steps:
mkdir repos && cd repos
hg clone http://hg.mozilla.org/build/buildbotcustom
hg clone http://hg.mozilla.org/build/tools
# add this to your .bashrc
# export PYTHONPATH=~/repos/tools/lib/python:~/repos/buildbotcustom:$PYTHONPATH
sudo apt-get install python-virtualenv libpython-devel libssl-dev
virtualenv ~/venvs
source ~/venvs/bin/activate
cd ~/venvs
pip install pyOpenSSL
hg clone http://hg.mozilla.org/build/buildbot && cd buildbot/master
hg up -r production-0.8
python setup.py install
# The previous step will install the latest Twisted which won't work
pip install Twisted=="10.1.0"

From here on you will need to use "source ~/venvs/bin/activate" before you can use buildbot.
You can also avoid having to use virtualenvs and install it system wide.

How can you know if it is working?

Check that you have the right versions:
$ buildbot --version
Buildbot version: 0.8.2-hg-5dda15da8f5d-production-0.8-hg-a3f25f0d508d+-default
Twisted version: 10.1.0

Also check that checkconfig returns success:
cd ~/repos/buildbot-configs
./setup-master.py master bm67-tests1-linux
cd master
buildbot checkconfig .

How to install through your distro's packaging system?

If you want to install the normal available buildbot through Ubuntu's package manager you just have to do this:
sudo apt-get install buildbot

You probably need libpython-devel as well as libssl-dev.

Update: added title "How to install through your distro's packaging system?"
Update: improved section "How can you know it is working?"


Creative Commons License
This work by Zambrano Gasparnian, Armen is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

No comments:

Post a Comment