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>
deploy: Remove parallel from fabfile

Running with parallel on a multinode setup we bumped into a
fabric/paramiko bug that freezes deployment. Specifically
we got:

paramiko.transport:Success for unrequested channel! [??]

This seems to be related with issue:

https://github.com/fabric/fabric/issues/19

So until someone fixes it, we remove parallelism from setup_cluster
and setup_vmc. This will make a multinode deployment obviously slower
but will not affect the basic use case of --autoconf.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy/ci: Fix storage issues in Ganeti

Ganeti requires at least 20G for LVM storage (yes this is a hardcoded
constant MIN_VG_SIZE). This check is done during cluster related
operations (init, modify) on all VM capable nodes.

Ganeti also checks for installed drbd module on all nodes (and NOT olny VM
capable ones; Ganeti bug to be fixed).

snf-deploy avoids these checks and initiates a cluster with
--no-lvm-storage and --no-drbd-storage. In Ganeti 2.10 these
options are removed in favor of --enabled-disk-templates.

This patch introduces a new configuration option in ganeti.conf
that reflects the Ganeti version to be installed. Currently only
two options are available; old (2.8) and new (2.10).

To deal with the storage issues, we still initialize the cluster
with only ext and file disk templates enabled, then we modify
master node with --vm-capable=no.

After each VMC setup we add the node to the cluster, and then we
cluster wide enable lvm and drbd. In the case where the master node
is a VMC as well the bug will not get triggered.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
deploy/ci: Some changes wrt disk sizes

vcluster.conf:

  disk0_size is the size of base vcluster image to debootstrap
  disk1_size if the size of the extra disk to use for LVM

ganeti.conf:

  vg_size is the size of the VG to create if an extra disk is not
found

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