Synnefo Developer’s Guide

This is the complete Synnefo Developer’s Guide.

Environment set up

First of all you have to set up a developing environment for Synnefo.

1. Create a new VM

It has been tested on Debian Wheezy. It is expected to work with other releases (e.g., Squeeze) too, as long as they are supported by snf-deploy.

2. Build your own Synnefo installation

Follow the instructions here to build Synnefo on a single node using snf-deploy.

3. Install GitPython

# pip install gitpython

4. Install devflow

Devflow is a tool to manage versions, helps implement the git flow development process, and builds Python and Debian packages. You will need it to create your code’s version.

# pip install devflow

5. Get Synnefo code

First you need to install git

# apt-get install git

And now get the Synnefo code from the official Synnefo repository

# su some_regular_user
$ git clone https://code.grnet.gr/git/synnefo

Make sure you clone the repository as a regular user. Otherwise you will have problems with file permissions when deploying.

6. Code and deploy

  1. Configure the version
$ devflow-update-version
  1. Code
  2. In every component you change, run as root
# python setup.py develop -N

This does not automatically install dependencies, in order to avoid confusion with Synnefo packages installed by snf-deploy. External dependencies have already been installed by snf-deploy; if you introduce a new dependency, you will have to explicitly install it.

  1. You will need to restart the server with
# service gunicorn restart
  1. If your changes affected snf-dispatcher (from package snf-cyclades-app) or snf-ganeti-eventd (from snf-cyclades-gtools) you will need to restart these daemons, too. Since step 3 installed the former under /usr/local/, you need to make sure that the correct version is evoked. You can override the version installed by snf-deploy with
# ln -sf /usr/local/bin/snf-dispatcher /usr/bin/snf-dispatcher

and then restart the daemons

# service snf-dispatcher restart
# service snf-ganeti-eventd restart
  1. Refresh the web page and see your changes

Table Of Contents

Previous topic

Upgrade to Synnefo v0.15.1

Next topic

Synnefo REST API Guide

This Page