cyclades: Create volumes initialized from a source

Extend the 'volume-create' management command with the '--source' option
which can be used to create a volume which is initialized with data from
an image, snapshot or volume. Currently, this option is useful only
for volumes that have been created with the 'ext_archipelago' disk template.

Closes: #45
cyclades: Fix typo
Switch license to GPLv3

According to the decision of the GRNET Board of Directors,
switch license to GPLv3.

This commit will be propagated to the release
and master branches based on git flow, and the next
release will be licensed as GPLv3.
ci: Add more fine-grained control on tests

Allow to test only an app of a component, if the input has the following
form:

    component.app

e.g. astakos.im
ci: Handle Images with many users

Choose from the user list of an Image the first user as the admin user.
ci: Update configuration

Update the url for the Synnefo repo and add a flavor with more RAM as
default.
ci: Add coverage in packages needed for testing
ci: Add nosetests for astakosclient

Use nosetests to test astakosclient. If coverage is present in the
system, use coverage in cojunction with nosetests.

Also, fix reports generated by coverage as well as other coverage
issues.
deploy: Update /etc/default/snf-network tmpl

..to include constants introduced in 0.16.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Fix Mount component

..to actually mount the dirs exported by nfs node and not pithos.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Update hostname in DNS component

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Add missing ganeti command

..from choices of command positional argument and thus
support: `snf-deploy ganeti`.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Extract synnefo's components from ganeti

The components PithosBackend, Image, GTools, and GanetiCollectd
are related to Ganeti but used only by Synnefo.

Define new role, named 'snf-ganeti' to include those components and use
it with the `snf-deploy ganeti` command.

Install ganeti-instance-debootstrap so that we have a working os
provider.

snf-image takes a lot of time to be configured (curl,
snf-image-update-helper, wget debian-base image) and is not needed
for a simple Ganeti cluster (i.e. QA cluster).

Move wget of debian base image to Image component and not nfs.
In order not to download many times check if it already exists
in the proper path.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy/ci: Setup lvm in case extra disk exists

Ganeti needs a VG in order to support plain/drbd disk templates.
In case an extra disk exists, deploy will create a PV and a VG
on this disk.

Use options `extra_disk` in nodes.conf and `vg` in ganeti.conf for
this purpose.

VMs spawned currently during ci do not have extra disks. Update the
corresponding schema.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Add ganeti-qa command

To install a minimal Ganeti cluster for QA run:

 snf-deploy ganeti-qa

This will create a ganeti cluster. The test instances will resolve on
the local nameserver. On the client node it clones the official repo
and installs all required packages required for ganeti development.
A sample qa json file is uploaded under /tmp.

To run the qa go to the client node and run:

 # cd ganeti
 # python ganeti-qa.py /tmp/qa-sample.json --yes-do-it

Note that the installed version in the qa cluster should be the same
used in the qa source.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Add new component GanetiDev

This is used to create a development environment for Ganeti.
It clones the official repo, installs all packages needed,
and adds a qa-sample.json file that reflects to the
Ganeti cluster found in the configuration.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Make conf files proper ConfigParser files

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Add constants module

Use constants to refer to roles defined in conf files.
Add constants related to snf-deploy state.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Add config module

This module reads the configuration and includes
several methods for extracting info. It gets
initialized with the command line arguments.

It reads the DEFAULT section of synnefo, vcluster, and deploy conf
files and evaluates their options in a sense that once it gets
imported, one has easy access to generic configuration variables,
e.g. config.synnefo_user.

On the other hand the setups, nodes, ganeti and packages conf files
are proper ConfigParser files with sections and default values.

nodes: All info needed for each node.
ganeti: All info needed for each cluster.
setups: All role-nodes mappings for each setup and each cluster.
packages: All special package versions for each OS.

The get_info() helper method gets a node or cluster identifier
(e.g. node2, ganeti1) and returns a FQDN object with all related
options as attributes.

The get_package() helper method is used to get the special version
(if any) of a package.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Add status module

This is used to keep track of the deployment status. The status file
is kept under the 'state' dir. The check() method is used to find
conflicting components or the ones that have already been installed.
The update() method adds an entry in the node's section. If in dry-run
this file is not written back to permanent storage (kept in memory).

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>