FutureSystems OpenStack Kilo - Quickstart Guide

OpenStack Kilo is the current cloud offering from FutureSystems. Here are the quickstart guide on using the kilo cloud.

Nova Client on India

Load the nova client by:

module load openstack

Then load your account information for Kilo. The Kilo account information is enabled by:

source ~/.cloudmesh/clouds/india/kilo/openrc.sh

You will see instances or images on Kilo now by nova client tools, e.g. nova list.

Start a New Instance

Starting a new instance is not difficult but requires a few steps like keypair registration and floating ip association. The simple instructions will be provided in this page.

SSH Key Pair Registration

If this is a first time to run an instance, the keypair registration is required. We assume you have a key registered on India Juno which is a previous release of OpenStack. Let’s register your key on OpenStack Kilo. Juno and Kilo are separate clouds so we need to register your key on both sides.

Note

If you don’t have one, don’t worry. It is easy to create a new one. Please follow the instructions here.

nova keypair-add --pub-key $HOME/ssh/id_rsa.pub $USER-india-key

Once you register your key, you can confirm the registration by:

nova keypair-list

Let’s continue to start a VM in the next section.

Tip

The following commands will create a new SSH key pair. Provide passphrase when prompts appear.

ssh-keygen -t rsa -C $USER-india-key

Start a VM Instance

The nova boot simple command will start a VM instance. Note that NETID is required on OpenStack Kilo which is different from OpenStack Juno.

NETID=`nova network-list | grep $OS_TENANT_NAME-net | awk {'print $2'}`
nova boot --image Ubuntu-14.04-64 --key-name $USER-india-key --flavor m1.small $USER-first-instance --nic net-id=$NETID

Note

replace $USER-india-key if you have a different name for your registered key. Replace other options e.g. image or flavor as you wish.

Floating IP Address

Now your VM instance is up and running but can’t be accessible because it only has an internal IP address. We will associate a floating IP address here to get SSH access to a VM instance.

nova floating-ip-create ext-net
+--------------------------------------+-----------------+-----------+----------+---------+
| Id                                   | IP              | Server Id | Fixed IP | Pool    |
+--------------------------------------+-----------------+-----------+----------+---------+
| 030bf69d-88a4-41b6-90c5-9c6e7d5be442 | 149.165.159.112 | -         | -        | ext-net |
+--------------------------------------+-----------------+-----------+----------+---------+

Now we have a IP address to assign to a VM instance. In this example, we will associate 149.165.159.112 to our $USER-first-instance VM instance by.

nova floating-ip-associate $USER-first-instance 149.165.159.112

Once you completed this step, you are now able to SSH into your VM instance.

ssh ubuntu@149.165.159.112

Note

ubuntu is login name your your VM if you start a VM with Ubuntu image. Try other names if you used other distributions like CentOS or CoreOS. For example, centos is for CentOS and core is for CoreOS image.

Horizon Web Interface

OpenStack provides a web interface to manage cloud resources easily. Usage reports, current quota or Heat stacks are visible on the web.

Termination of VM Instance

If you completed your work on your VM instance, you may terminate your VM and release a floating IP address associated with. For example, we terminate our first instance and the IP address by:

nova delete $USER-first-intance
nova floating-ip-delete 149.165.159.112

FAQ

  1. My ssh connection was denied with the message like below. What should I do?
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  1. SSH checks ssh server’s fingerprint to verify the identity of the machine that you connect to. You will see the message above if the fingerprint doesn’t match with one saved on your local machine (~/.ssh/known_hosts) when you ssh into the machine first time. In the cloud computing, however, you may encounter this message very often without a real vulnerability. It is because that you use the same ip address with a newly deployed virtual machine which has a new fingerprint. We can ignore the host key checking or remove the fingerprint saved on a local machine by:
  • Add the following options to ssh command
-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no

OR

  • Remove the fingerprint in your ~/.ssh/known_hosts file
ssh-keygen -f $HOME/.ssh/known_hosts -R HOSTNAME_OR_IPADDRESS

Note

Replace HOSTNAME_OR_IPADDRESS with your destination

  1. I am seeing the following error when I run nova command:
You must provide a username or user id via --os-username, --os-user-id, env[OS_USERNAME] or env[OS_USER_ID]
  1. You see the error because the nova client does not recognize you. Import your credential on india by:

    source ~/.cloudmesh/clouds/india/kilo/openrc.sh

This file contains your os-username, etc. regarding your account and the source command imports and keeps these information while your ssh session alive.