Setup a Zeus-CI project

Once zeus-ci is installed command line tool zci is available.

Initialization

In order to initialize a project we need to run:

$ zci init [PROJECT_PATH]

By invoking this command we create a zeus-ci project. It would create a following structure of files and directories:

PROJECT_ROOT/
    app/
        zeusapp/
            __init__.py
            settings.py
            urls.py
            wsgi.py
        manage.py
    var/
        builds/
        logs/
    venv/
        ... (content of Python sandbox)

Let’s describe briefly what those are:

  • app/ directory contains skeleton for zeus-ci, Django-based project. Read more on how to integrate with existing Django project.
  • venv/ directory contains sandboxed Python environment. Our project would use only Python packages and linked binary from this environment. Read more on virtualenv.
  • var/ here all various files would be stored. By default, zeus-ci would store here all logs and builds-related files.

Configuration

We need to configure our project first. By default, our project would use sqlite database and RabbitMQ server as message broker (needed for communication between web server and build workers).

Note

Make sure to configure project for your needs before using it in production.

After configuration

For running commands we will use manage.py script. For example run:

$ app/manage.py

to list all available commands.

Prepare database

$ app/manage.py syncdb

This will prepare our database. It will also ask to create administrator user which we should do now.

Running web server

Development server is invoked by running:

$ app/manage.py runserver

Running worker

In another terminal run:

$ app/manage.py celery worker

Add project

We need to go to http://127.0.0.1:8000/ and log in with credentials provided at the database preparation step. As admin user we can follow instructions on main page in order to create a project.