Installation
============

Wheeljack can be installed use one of two methods. The first is to
setup everything yourself. The other is to use the provided
installation template. People unfamiliar with Django are probably best
off with an installation using the template. Read the next section on
how to use this template. The rest of this section assumes a certain
familiarity with Django.

To use Wheeljack you can create a Django project. Wheeljack ships with
a pre-configured project you can use to import or copy from. The
application itself is a normal Django app. The already setup project
can be found under the `src/wheeljack/project` directory.

You can install the code by running `python2.5 setup.py`. This will
also create a script called `wheeljack`. That script is the build
slave.

The build slave needs to be executed periodically. You could set it up
to run uninterrupted or from a cron job. Please look at the options it
supports by executing::

  $ wheeljack --help


Installing Wheeljack using the template
=======================================

To easiest way to get started is to follow along with the instructions
in this guide.

Download the `Wheeljack installation template`__. After extracting the
archive you need to edit a few files.

__ : http://launchpad.net/wheeljack/trunk/0.1/+download/wheeljack-install.tgz

Open a terminal and execute the following line from within the
directory that contains `buildout.cfg`::

  $ python2.5 bootstrap.py

This will create a new script which will start with the
installation. The installation can be ran as a normal system user and
will not try to install anything outside of it's current directory.

  $ ./bin/buildout

Within the directory called `autobot` there is a file named
`settings.py`. Open this file and change the settings for
`EMAIL_HOST`, `DEFAULT_FROM_EMAIL`, `ADMINS`, `TIME_ZONE` and
`LANGUAGE_CODE`.

Create an initial database which will store the project info. This will ask you to create a new admin user. Answer yes to this.

  $ ./bin/django syncdb

Edit `etc/supervisord.conf` and change the user and password options
to ones you entered earlier.

Now you are ready to start Wheeljack. This example configuration uses
Supervisord to manage it's processes. Run the following command to
start both a builder and the web server.

  $ ./bin/supervisord -c etc/supervisord.conf

The webserver is automatically started at port 8000. This can be
changed from the `etc/supervisord.conf` file.

Now you can visit the Wheeljack-interface_. If everything works O.K. there is only one thing left to do. Please reopen `settings.py`. Remove or comment the line that says `DEBUG = True`.

.. _Wheeljack-interface: http://localhost:8000
