pithos: Fix tests

Fix tests challenging partial content update that used to fail with
ValueError: empty range for randrange().
deploy/ci: Make vcluster use debootstrap

Introduce a new helper script, mkimage.sh that creates a debian base
raw image with debootstrap so that it can be used in a virtual
cluster.

Install network-manager and a hook to update hostname with info
provided by DHCP responce.

Add new conf setting for the size of the image.

Create another empty image as well so that the VM can use it for
LVM.

Remove unused settings.

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

..that creates the debian base image needed by the vcluster command.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Support dry-run in vcluster

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Check vcluster node's IP and subnet

..and abort if some node's IP does not reside inside the vcluster's
subnet.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Allow passwordless ssh in vcluster nodes

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy/ci: Change conf files for easy setup

Update conf files to support three basic setups:

 synnefo: Used by ci in order to install the whole stack in one node
with --autoconf

 qa: Three node setup with one development node and two ganeti nodes

 vc: Four node setup to test synnefo deployment on multinode virtual
cluster

So, we now have:

 snf-deploy synnefo --setup synnefo --autoconf

 snf-deploy ganeti-qa --setup qa

 snf-deploy vcluster --setup vc

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy/ci: Add dummy node

Remove all roles from DEFAULT section in setups.conf. This way each
setup has only the roles/nodes that are included in the corresponding
section. Since currently the Context() class expects to find all
roles in each setup (db, mq, etc.) we have to introduce a dummy node
that eventually should not be used.

Set DEFAULT_NODE and DEFAULT_CLUSTER to None. One should only
specify the desired setup (with --setup option) and the nodes, and
clusters should be derived from it.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Print ssh/vnc info after vcluster command

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy/ci: Remove dummy password in nodes.conf

Since snf-deploy image does passwd -d root the nodes will have
empty password.

Set UsePAM no and PermitEmptyPasswords yes in sshd_config in
vcluster image.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Fix context issue in update_admin

In case of a multinode setup update_admin() initialized the admin
components with wrong context since each component's constructor
used to manipulate the given and common context object.

To fix this create a copy of the context and then make any necessary
changes.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Better snf-deploy setup support

Use the setup command to add another Ganeti cluster
to an existing synnefo installation. For instance:

 snf-deploy setup --setup synnefo --cluster ganeti2

For a more fine grained use, try something like:

 snf-deploy setup --setup synnefo --role vmc \
   --node new --cluster ganeti

to setup a specific component/role on a given node of a
given setup and cluster.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
docs: Update snf-deploy docs

..to reflect to latest deploy/vcluster changes.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Make Archip require Mount

Since archipelago needs the /srv/archip directory make it require
the Mount (nfs client) component.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Introduce LVM and DRBD components

Move both out of Ganeti component and make VMC depend on them.

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

..to avoid Fabric error: No handlers could be found for logger
“paramiko.transport”.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Split gnt-node add

..into gnt-node add, that adds the node if not already added
and gnt-node modify that makes it vm-capable and master-capable.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Reset status and cleanup before vcluster

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Configure locale to vcluster image

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy: Some fixes related to Haskell packages

..used in dev node for ganeti development.

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