How to use OpenStack

Page

OpenStack is an open source platform for cloud computing. In this guide we will discuss how to use OpenStack to deploy a VM and then connect to it. 

What is a VM? 

A virtual machine (VM for short) can contain any operating system environment that can run on top of (or inside) another operating system that contains physical hardware. The operating system running the actual hardware is known as a hypervisor (or bare-metal operating system), and the VM is known as the guest. 

What is a research VM environment?

A research VM environment allows users to create pre-built virtual machines. These machines contain NAT IP addresses, meaning it can only be accessed while on campus or through the VPN. They are intended for short-term virtual machine environments for developing code, running experiments, etc. This environment should not be used for general purpose desktop computing tasks. Please talk to your local IT support person if you are looking for a VM for general purpose computing. This environment is maintained for research computing, so if the IT department detects or is notified of security incidents, you will lose access to the VM while we investigate the problem.

Signing up for for OpenStack

To sign up for OpenStack, you must first have a Pronto lab group account.

Then visit this link:

https://diy.las.iastate.edu/openstack/

The page will look like this:

openstack_signup

 

You will need to provide your lab group name (ending in -lab) and provide a use case/purpose in the fields below. You should receive and email saying that your self-service VM project is available.

Logging in

To login to OpenStack, you will need to use the following link:

https://openstack.las.iastate.edu/

You will be redirected to this page:

login

The domain name is: IASTATE

The username and password is your NetID and password. If you cannot login, please email researchit@iastate.edu. Once you have logged in, you will be redirected to this page:

homepage

 

Deploying a VM

We will need to generate a key pair first. Click on the Key Pairs tab and then click on Create Key Pair.

key_pair

When you create this Key Pair, a .pem file should automatically be downloaded. Take note of where this is downloaded, we will need this for later. This .pem file will allow us to SSH into our VM. 

 

To get a VM, we need to create an instance for it. Click on the Compute tab, then select Instances. Next, click on Launch Instance.

launch_instance

You will be required to provide details, a source, flavor and configure networks. You may tailor the settings to however you wish, but you must provide a selection for each of those categories in order to launch an instance.

launch_config

Under Source you will need to select an operating system for your virtual machine. (The available sources will most likely change over time).

You should also select 'Yes' for 'Delete Volume on Instance Delete' so that the disk space used by your VM will be freed when you delete it.

source

Under Flavor, pick one of the available flavors. Click on the arrow on the left if you would want to see its specifications:

flavor_list

 

Note that for networks, you will need to select "campus-low" as your allocated network.

network

 

Under the Key Pair tab, verify that the key pair you generated from earlier is under the Allocated section:

key_pair_verify

Once you are satisfied with your settings, click on Launch Instance. Wait a few minutes until your VM is readily available.
 

When the VM is available, take note of the VM's IP address:

ip_capture

You will need to SSH the VM's IP address and set our desired username and password. 

 

Using Powershell/Terminal, navigate to where you downloaded your .pem file from earlier. Next, SSH to the IP address associated with your Instance (or in other words, your VM) using:

$ ssh -i <Pemfile_Name>.pem cloud-user@<IP_ADDRESS>

 

Lets say if I was running a centOS VM with the IP address 10.90.20.1 and I have a .pem file named Linux.pem. I would connect to my VM by typing in:

$ ssh -i Linux.pem cloud-user@10.90.20.1

 

Once you have connected to the VM, you will need to change the password so you can login. You can do so by using:

$ sudo passwd root

You will be prompted to change your password. 

 

Note that this password is meant for accessing the terminal console via your browser, which is explained more in detail below. If you plan on connecting to your VM via SSH/terminal, you will need to use the .pem file you downloaded. 

 

You have now successfully setup a VM in OpenStack!

 

Accessing the Terminal Console via browser

To access your VM's terminal via your web browser, you can start by clicking on the instance name of your VM. 

Click on Click here to show only console to pull up the console. Use root or cloud-user as your username, and then the password is the one you had set earlier. You can now access and use your Linux VM on your browser now!

linux_terminal

 

Category: