Commit edc9c837 authored by Marios Kogias's avatar Marios Kogias
Browse files

Improve dev-guide

Update the developer's guide to include an initial section about
how to set up a developing environment.
parent 3e4293bd
......@@ -3,7 +3,73 @@
Synnefo Developer's Guide
This is the complete Synnefo Developer's Guide. Here, we document all Synnefo
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 Squeeze VM**
**2. Build your own Synnefo installation**
Follow the instructions `here <>`_
to build Synnefo on a single node using ``snf-deploy``.
**3. Install GitPython**
.. code-block:: console
# 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.
.. code-block:: console
# pip install devflow
**5. Get Synnefo code**
First you need to install git
.. code-block:: console
# apt-get install git
And now get the Synnefo code from the official Synnefo repository
.. code-block:: console
$ git clone
Make sure you did the previous as a regular user. Otherwise you will have problems
with file permissions when deploying.
**6. Code and deploy**
1. Configure the version
.. code-block:: console
$ devflow-update-version
2. Code
3. In every component you change run
.. code-block:: console
# python develop
4. Refresh the web page and see your changes
Synnefo REST APIs
Here, we document all Synnefo
REST APIs, to allow external developers write independent tools that interact
with Synnefo.
......@@ -231,23 +297,23 @@ Syncing
Consider the following algorithm for synchronizing a local folder with the
server. The "state" is the complete object listing, with the corresponding
.. code-block:: python
# L: Local State, the last synced state of the object.
# Stored locally (e.g. in an SQLite database)
# C: Current State, the current local state of the object
# Returned by the filesystem
# S: Server State, the current server state of the object
# Returned by the server (HTTP request)
def sync(path):
L = get_local_state(path) # Database action
C = get_current_state(path) # Filesystem action
S = get_server_state(path) # Network action
if C == L:
# No local changes
if S == L:
......@@ -271,7 +337,7 @@ attributes.
# Conflicting changes exist
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment