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,
                                 public_html="../src/www"))


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:


authz_cfg=authz.Authz(
   # change any of these to True to enable; see the manual for more
   # options
   auth=auth.BasicAuth([("pyflakes","pyflakes")]),
   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.

4 comments:

  1. Hi,
    thank you for this great recipe…
    However, there is a problem if I use the "SQLAlchemy==0.7.9"
    I had to install "SQLAlchemy==0.7.10" ( by "pip install -Uv SQLAlchemy" ) for buildbot to work

    My config : Ubuntu 14.04.2 LTS
    pip list :
    alabaster (0.7.6)
    argparse (1.2.1)
    Babel (1.3)
    buildbot (1.2.12-2-g791f32d)
    buildbot-slave (1.2.12-2-g791f32d)
    decorator (3.4.2)
    docutils (0.12)
    funcsigs (0.4)
    Jinja2 (2.7.3)
    MarkupSafe (0.23)
    mock (1.1.3)
    MySQL-python (1.2.5)
    pbr (1.3.0)
    pip (1.5.4)
    pyflakes (0.9.2)
    Pygments (2.0.2)
    python-dateutil (1.5)
    pytz (2015.4)
    setuptools (2.2)
    six (1.9.0)
    snowballstemmer (1.2.0)
    Sphinx (1.3.1)
    sphinx-rtd-theme (0.1.8)
    SQLAlchemy (0.7.10)
    sqlalchemy-migrate (0.7.2)
    Tempita (0.5.2)
    Twisted (15.2.1)
    wsgiref (0.1.2)
    zope.interface (4.1.2)

    regards

    jmb

    ReplyDelete
  2. I've been trying to get katana installed and running on Ubuntu server 14.04.3 LTS, but I'm getting stuck after executing:
    "pip install -e master"

    I'ts complaining about SQLAlchemy-migration:

    "Could not find a version that satisfies the requirement sqlalchemy-migrate==0.6.1,==0.7.0,==0.7.1,==0.7.2 (from buildbot===1.1.8-275-g804d540) (from versions: 0.3.0, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.5.1.2, 0.5.2, 0.5.3, 0.5.4, 0.6, 0.6.1, 0.7, 0.7.1, 0.7.2, 0.8.1, 0.8.2, 0.8.4, 0.8.5, 0.9, 0.9.1, 0.9.2, 0.9.4, 0.9.5, 0.9.6, 0.9.7, 0.9.8, 0.10.0)
    Some externally hosted files were ignored as access to them may be unreliable (use --allow-external sqlalchemy-migrate to allow).
    No matching distribution found for sqlalchemy-migrate==0.6.1,==0.7.0,==0.7.1,==0.7.2 (from buildbot===1.1.8-275-g804d540)"

    My pip list does show that SQLAlchemy (0.7.10) and sqlalchemy-migrate (0.7.2) are available.
    You have any clue what could be causing this?

    ReplyDelete
  3. Hola Mariangela, muchas gracias por el tutorial, me ha ayudado bastante!

    Saludos desde Venezuela

    ReplyDelete
  4. I am Alecia,from what I can read. It has been sad news and scam to everyone about Voodoo casters or so. But to me they are so real cause one worked for me not quite two weeks.i met this man on a blog his name is Dr Abalaka is a very powerful man.I traveled down to where his shrine his and we both did the ritual and sacrifice.he had no website site, and now me and my ex are living very ok now.I don't know about you but Voodoo is real;love marriage,finance, job promotion ,lottery Voodoo,poker voodoo,golf Voodoo,Law & Court case Spells,money voodoo,weigh loss voodoo,diabetic voodoo,hypertensive voodoo,high cholesterol voodoo,Trouble in marriage,Barrenness(need a child),Luck, Money Spells,it's all he does. I used my money to purchase everything he used he never collected a dime from. He told me I can repay him anytime with anything from my heart. Now I don't know how to do that. If you can help or you need his help write him on (dr.abalaka@outlook.com) i believe that your story will change for better,or if you have any question you can contact me here as 1001madonado@gmail.com if you have any question Thank you.

    ReplyDelete