PK \C0! ! zeusci-latest/installation.html
This application requires Django 1.5 or higher.
In order to install zeus-ci simply use pip:
pip install zeus-ci
Now you can follow up instructions on how to initialize a project.
zci is a command line tool allowing initialization and management of zeus-ci project.
Initializes zeus-ci project at given <PROJECT_PATH>. If no argument is given, current directory is used.
Note
Following subcommands need to be run within project directory. It doesn’t matter if it’s run at the root of the project or at some subdirectory.
Here we will cover a process of zeus-ci development.
We use tox for running tests against supported Python versions. tox.ini file defines exactly what and how is tested.
We need to make sure we have tox installed:
pip install tox
Now we can run full tox suite:
tox
In order to list all test environments:
tox -l
It is also possible to run single test environment:
tox -e TEST_ENV
See also
This document describes how to include zeus-ci into existing Django project. It assumes user knows how to manage Django project and is familiar with it’s basic concepts.
Note
Make sure you have zeus-ci Python package already installed:
$ pip install zeusci
Include zeusci.zeus in INSTALLED_APPS at settings.py file:
INSTALLED_APPS = (
# other apps
'zeusci.zeus',
)
zeus-ci uses Celery. Refer to it’s documentation on how to configure message broker and integrate Celery with Django project.
We need to hook zeusci endpoints (including API) at our urls.py. This can be done as follows:
from django.conf.urls import patterns, url, include
from zeusci import zeus
urlpatterns = patterns('',
# other url patterns
url(r'^', include(zeus.site.urls)),
)
You can also include API and UI endpoints separately:
urlpatterns = patterns('',
# other url patterns
url(r'^', include(zeus.site.api_urls)),
url(r'^', include(zeus.site.ui_urls)),
)
Once zeus-ci is installed command line tool zci is available.
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:
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.
For running commands we will use manage.py script. For example run:
$ app/manage.py
to list all available commands.
$ app/manage.py syncdb
This will prepare our database. It will also ask to create administrator user which we should do now.
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.
Date: | October 28, 2013 |
---|
Documentation: