Clustering allows you to install MicroStack on several machines (“nodes”) and create an OpenStack cloud by combining the nodes together. At this time the cloud roles that can be assigned to each node are control and compute.

These respectively translate to the cloud’s control plane and data plane. A cloud can consist of a single control node and multiple compute nodes.

A control node also acts as a compute node.

The setup of nodes must be done from a freshly installed MicroStack snap. See the Installation and Quickstart page for how to install MicroStack.

At this time, clustering requires the snap installation to use the --beta channel.

Initialising a control node

If not already done, on the machine designated as the control node, begin initialisation:

sudo microstack init --auto --control

Alternatively, omit the options to get an interactive session that allows for extra features to be enabled:

sudo microstack init 

You’re done. Now wait for the process to finish. It can take between 10 and 15 minutes depending on the resources available on the host system.

The control node must have completed its initialisation phase prior to the addition of any compute nodes.

Generating a connection string

On the control node generate a connection string that the prospective compute node will need in order to join the cluster:

sudo microstack add-compute

Sample output:

Use the following connection string to add a new compute node to the cluster (valid for 20 minutes from this moment):

Initialising a compute node

On the machine designated as a compute node, begin initialisation (use the previously generated connection string):

sudo microstack init --auto --compute --join <connection-string>

Alternatively, omit the options to get an interactive session that allows for extra features to be enabled:

sudo microstack init 

The initialisation process for a compute node is much shorter than that of a control node. It can take as little as 20 seconds.

List the cluster’s hypervisors. There should be two. One that is bundled with the control node and one that was just added:

microstack.openstack hypervisor list

Sample output:

| ID | Hypervisor Hostname | Hypervisor Type | Host IP       | State |
|  1 | node-gadomski.maas  | QEMU            | | up    |
|  2 | node-pytheas.maas   | QEMU            |  | up    |

Cluster verification

Once the cluster is set up you can perform a verification of it by launching a test instance based on the CirrOS image. The instance will be created on a compute node which the control node sees as an availability zone.

The command to use is the same as in the non-clustered case except that option --availability-zone is added. The name of the AZ is based on the hostname of the target compute/hypervisor node (e.g. ‘node-pytheas.maas’):

From the control node (keypair ‘microstack’ is the default):

microstack launch cirros --name cluster-1 --availability-zone nova:node-pytheas.maas

To create an instance from a compute node you will need to ensure an OpenStack keypair is available. Similarly, for connecting to the instance over SSH, OpenStack security groups need to be configured.

The output will provide the instance’s floating IP address (here

To SSH to the instance from the control node:

ssh -i /home/ubuntu/snap/microstack/common/.ssh/id_microstack cirros@

Last updated 3 months ago. Help improve this document in the forum.