Distributed CI control server
This repository is used for the development of the API of Distributed CI. It contains the source code, tests, development and building scripts.
If you are using the development environment provided here you can directly start at step 5.
To run the api in development mode follow those steps:
- clone the repository: http://softwarefactory-project.io/r/dci-control-server
- ensure that a postgresql database is running and accessible on the URI defined in the
src/settings.py(if no database is running see database installation)
- install the python requirements:
pip install -r requirements.txt
- run the dev server:
- provision the database:
python bin/dci-dbprovisioning(BEWARE: it will erase the previous db)
Assuming that we are running on a fedora based distribution here are the steps for installing the database which will be used by the API and its tests.
install and configure PostgreSQL:
$ yum install postgresql-server postgresql-contrib $ postgresql-setup initdb
Allow local account with password:
$ editor /var/lib/pgsql/data/pg_hba.conf
Add the following line on the top of the file:
host all all 127.0.0.1/32 md5
Restart PostgreSQL with the new settings:
$ systemctl restart postgresql.service
Connect with the postgres user:
$ sudo su - postgres $ createuser -P dci Enter password for new role: Enter it again: $ createdb dci_control_server -O dci
The REST API is available for any type of objects. You can browse the database on http://127.0.0.1:5000/.
See API doc for details.
Distributed-CI Team firstname.lastname@example.org