Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 70 lines (44 sloc) 1.998 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
Installation and Setup
======================

Install ``buildapi`` using easy_install::

    easy_install buildapi

Then install either redis or memcached:

    easy_install redis
    easy_install python-memcached

Make a config file as follows::

    paster make-config buildapi config.ini

Tweak the config file as appropriate::

    email_to = your email
    port = something available, eg. 6005
    update the sqlalchemy db urls and the carrot info as needed for staging/dev
    # add the following lines to have your url be http://cruncher.build.mozilla.org/~(username)/wsgi
    [filter:proxy-prefix]
    use = egg:PasteDeploy#prefix
    prefix = /~(username)/wsgi

Also set up your cache configuration:

    buildapi.cache = redis:HOSTNAME:PORT

or

    buildapi.cache = memcached:HOSTNAME:PORT,HOSTNAME:PORT,..

You'll need to set up some scheduler and status DB's. The schema for these
DBs are in the root directory, although you may want to fill them with test
data which is not included.

    sqlite3 statusdb.sqlite3 < statusdb_schema.sql
    sqlite3 schedulerdb.sqlite3 < schedulerdb_schema.sql
    sqlite3 buildapi.sqlite3 < buildapi_schema.sql

And point the proper DB strings

Now setup the application::

    paster setup-app config.ini

Edit your config.ini to add to the [app:main] section::

    filter-with = proxy-prefix

Now you can start/stop your application::

    paster serve --daemon config.ini
    paster serve --stop-daemon

You should be able to load pages like http://cruncher.build.mozilla.org/~(username)/wsgi/self-serve

Installing google viz::

    wget http://google-visualization-python.googlecode.com/files/gviz_api_py-1.7.0.tar.gz
    tar -xvf gviz_api_py-1.7.0.tar.gz
    cd gviz_api_py-1.7.0
    python setup.py install
    python setup.py test

Now you should be able to see reports like http://cruncher.build.mozilla.org/~(username)/wsgi/reports/pushes
which use the google visualization library (make sure you have the statusdb set in your config.ini
Something went wrong with that request. Please try again.