Setting up a Cider-CI Development Environment
- Prerequisites
- Project Checkout
- Database - PostgreSQL
- Reverse Proxy
- User-Interface Service
- Clojure Services
- Executor
- Running a Job
Prerequisites
Project Checkout
A running instance of Cider-CI is composed of several services. See the Architecture page for an overview.
The source code for each service is a git submodule of the main Cider-CI project.
git clone --recursive https://github.com/cider-ci/cider-ci.git
Database - PostgreSQL
We set up the cider-ci
role within psql:
CREATE ROLE "cider-ci" PASSWORD 'secret' createdb superuser login;
We change into the directory of the Cider-CI User-Interface, configure, create the database and load some initial data to work with.
Reverse Proxy
A deployed environment of Cider-CI uses the Apache HTTP server as a reverse proxy. We use the same technology during development and in the integration tests. Installing and starting the reverse proxy for development is operating system specific. Details are discussed in the Cider-CI Integration-Tests Project.
User-Interface Service
The Cider-CI User-Interface is a Ruby on Rails application.
We start the web-server from within the directory of the Cider-CI User-Interface.
bundle
bundle exec rails s -p 8880
We visit the url http://localhost:8888/cider-ci/ui/public in a browser and should see a similar page as shown.
We sign in with the user admin
and password secret
and follow the links Administration
→ Server status
. http://localhost:8888/cider-ci/ui/admin/status reveals that the message queue is running but non of the services are:
Clojure Services
All of the remain services Cider-CI API, Cider-CI Builder, Cider-CI Dispatcher, Cider-CI Executor, Cider-CI Notifier, Cider-CI Repository, and Cider-CI Storage are written in clojure. Each of them comes with a ./bin/run
script which will start a headless server.
We can alternatively start a REPL from inside each directory and then start the service therein with (-main)
.
cd SERVICE_DIRECTORY
./bin/run
or
cd SERVICE_DIRECTORY
lein repl
(-main)
The services use relative paths to access files. It is crucial that they are started from within their own top level directory!
All of the services should now be listed OK
at http://localhost:8888/cider-ci/ui/admin/status.
Executor
Status of the Executor-Service
The Executor-Services are listed on the Administration
→ Executors
page http://localhost:8888/cider-ci/ui/admin/executors. There is only one configured in the default data set. It matches the parameters of the default development executor and hence it should be up and running.
Note: other parameters, like the traits
e.g., are taken from the default setup when an executor is installed via the Cider-CI Deploy. They might not match the given development environment.