Tuesday, March 17, 2015

Running Katana

I have been developing features on top of buildbot on a project that we internally called Katana, which is a custom version based on 0.8.7.p1. Here Na’tosha gives a very good explanation about the project

Now, I’m going to quickly go over some of the features and  provide a more detailed explanation on how to get started running katana.

Overall features
Some of the features and customizations we have developed for katana:
  • Multiple project support
  • Build status page filters the information by project / branches
  • Trigger builds and upload / download artifact dependencies
  • New UI design
  • Real-time data
  • Authentication AD/LDAP, etc

Get the code
git clone https://github.com/Unity-Technologies/buildbot.git src
git checkout katana (this is our stable branch)

Development environment
You can run katana in the same way as you do with buildbot (with a few differences):

Setup python virtual environment
virtualenv --no-site-packages katana-venv/
source katana-venv/bin/activate

Python modules
We are using the following modules
pip install -Iv SQLAlchemy-migrate==0.7.2
pip install -Iv SQLAlchemy==0.7.9
pip install python-ldap
pip install mock
pip install mysql-python

Setup the master and slave
pip install -e master
pip install -e slave

Check the running version
buildbot --version
buildslave --version

Run the tests
trial buildbot.test
trial buildslave.test

Create the buildmaster
buildbot create-master buildmaster

Change configuration file
mv master.cfg.sample master.cfg

Change html folder
Set the public_html folder to the one matching the resources (src)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg,

Running the master
You should be able to see katana  at http://localhost:8010/ after running:
buildbot start

You should be able to login to katana using pyflakes user and password, the default example configuration should look this:

   # change any of these to True to enable; see the manual for more
   # options
   gracefulShutdown = False,
   forceBuild = 'auth', # use this to test your slave once it is set up
   forceAllBuilds = False,
   pingBuilder = False,
   stopBuild = False,
   stopAllBuilds = False,
   cancelPendingBuild = False,

If you sign in using pyflakes usr/password you will see Katana running

That's all, next time will bring more examples of using Katana.