Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: c113ef8213
Fetching contributors…

Cannot retrieve contributors at this time

170 lines (115 sloc) 4.634 kb

Install Buildbot

This section provides information for CKAN core developers setting up buildbot on an Ubuntu Lucid machine.

If you simply want to check the status of the latest CKAN builds, visit

Apt Installs

Install CKAN core dependencies from Lucid distribution:

sudo apt-get install build-essential libxml2-dev libxslt-dev
sudo apt-get install wget mercurial postgresql libpq-dev git-core
sudo apt-get install python-dev python-psycopg2 python-virtualenv
sudo apt-get install subversion

Maybe need this too:

sudo apt-get install python-include

Buildbot software:

sudo apt-get install buildbot

Deb building software:

sudo apt-get install -y dh-make devscripts fakeroot cdbs


sudo apt-get install -y fabric

If you get errors with postgres and locales you might need to do these:

sudo apt-get install language-pack-en-base
sudo dpkg-reconfigure locales

Postgres Setup

If installation before failed to create a cluster, do this after fixing errors:

sudo pg_createcluster 8.4 main --start

Create users and databases:

sudo -u postgres createuser -S -D -R -P buildslave
# set this password (matches buildbot scripts): biomaik15
sudo -u postgres createdb -O buildslave ckan1
sudo -u postgres createdb -O buildslave ckanext

Buildslave Setup

Rough commands:

sudo useradd -m -s /bin/bash buildslave
sudo chown buildslave:buildslave /home/buildslave
sudo su buildslave
cd ~
git clone
ssh-keygen -t rsa
cp /home/buildslave/.ssh/  ~/.ssh/authorized_keys
mkdir -p ckan/build
cd ckan/build
python ~/
buildbot create-slave ~ localhost:9989 okfn <buildbot_password>
vim ~/info/admin
vim ~/info/host
mkdir /home/buildslave/pip_cache
virtualenv pyenv-tools
pip -E pyenv-tools install buildkit

Buildmaster Setup

Rough commands:

mkdir ~/buildmaster
buildbot create-master ~/buildmaster
ln -s /home/buildslave/master/master.cfg ~/buildmaster/master.cfg
cd ~/buildmaster
buildbot checkconfig


Setup the daemons for master and slave:

sudo vim /etc/default/buildbot

This file should be edited to be like this:

BB_NUMBER[0]=0                  # index for the other values; negative disables the bot
BB_NAME[0]="okfn"               # short name printed on startup / stop
BB_USER[0]="okfn"               # user to run as
BB_BASEDIR[0]="/home/okfn/buildmaster"          # basedir argument to buildbot (absolute path)
BB_OPTIONS[0]=""                # buildbot options
BB_PREFIXCMD[0]=""              # prefix command, i.e. nice, linux32, dchroot

BB_NUMBER[1]=1                  # index for the other values; negative disables the bot
BB_NAME[1]="okfn"               # short name printed on startup / stop
BB_USER[1]="buildslave"               # user to run as
BB_BASEDIR[1]="/home/buildslave"          # basedir argument to buildbot (absolute path)
BB_OPTIONS[1]=""                # buildbot options
BB_PREFIXCMD[1]=""              # prefix command, i.e. nice, linux32, dchroot

Start master and slave (according to /etc/default/buildbot):

sudo /etc/init.d/buildbot start

Now check you can view buildbot at http://localhost:8010/

Connect Ports

It's preferable to view the buildbot site at port 80 rather than 8010.

If there is no other web service on this machine, you might connect up the addresses using iptables:

sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8010

Otherwise it is best to set up a reverse proxy. Using Apache, edit this file:

sudo vim /etc/apache2/sites-available/

to look like this:

<VirtualHost *:80>

   ProxyPassReverse ts Off
     <Proxy *>
             Order deny,allow
             Allow from all
     ProxyPass         /
     ProxyPassReverse  /
     ProxyPreserveHost On

or the old one had:

<VirtualHost *:80>
    DocumentRoot /var/www/
    <Location />
        Order allow,deny
        allow from all
    RewriteEngine On
    RewriteRule /(.*) http://localhost:8010/$1 [P,L]


sudo apt-get install libapache2-mod-proxy-html
sudo a2enmod proxy_http
sudo a2ensite
sudo /etc/init.d/apache2 reload
Jump to Line
Something went wrong with that request. Please try again.