Frequently Asked Question

How to create a cluster ?
Last Updated 2 years ago

These instructions are scalable and can be extended to create a cluster of any number of machines.

Make sure your security group has a rule that allows you ssh access from your base machine and don't forget to add this security group while launching an instance.

1: Create a single Master Instance with an OS of your choice. Here you can use a key-pair of your base machine or a machine you will always have access to.
2(i): Associate a floating IP to your master instance so you can access it from outside the OpenStack network.

3: Log into your new instance using the command
ssh username*@'floating_ip of your instance

*(username depends on your choice of OS, for Ubuntu and CentOS the default usernames are ubuntu and centos respectively.

4: Create a key-pair on your Master instance.


5: Switch to the ssh folder with : cd ~./ssh. Open the file which contains your public key

Copy the contents onto your clipboard, we will be using this public key at a later stage.
The file will be something like this:


6: Lets import key we just created on OpenStack. Click on 'Import Key Pair '


7: Add the name you want and paste the public key of your master instance into the public key section ( the key you previously copied in step 5). Then click on 'Import Key Pair'

8: Lets create the first node in the cluster. Click on 'Launch Instance'. Select your OS , flavor and other details according to your requirements.
The Master and the node you are creating should be on the same network.

At the Key Pair section choose the key you created in step 7, in my case its cluster-key.

Finish launching the instance.

9: Launch more instances using the same key and the same network if your cluster needs more nodes.

What we have done is basically injected the public key of the master node ( the first instance you launched) into the authorized_keys file on every node in your cluster. This way your master always has password-less ssh access into your nodes.

10: Verify if you have ssh access by doing a : ssh username@'internal_network_address' the master to every node.

Please read these points before deciding to launch your cluster

  • Please note this method assumes that you need outside access to only the master node.
  • Please note that your base machine is not a part of the cluster, it is just used to access the master node.
  • If you want your base machine to be the master , use the public key of that machine while launching your other instances.

Please Wait!

Please wait... it will take a second!