Personal tools

UAB Openstack Tutorial

From UABgrid Documentation

Revision as of 11:29, 28 February 2020 by (Talk | contribs)

Jump to: navigation, search


UAB Openstack Tutorial

This tutorial is meant as a guide for deploying VMs in UAB's OpenStack environment.


1. Send email to and request an account

2. Log into to get application credentials

3. Use terraform to create and deploy a VM to UAB OpenStack

4. Provision your VM with ansible


Create Application Credentials


1. In Openstack, go to Identity -> Application Credentials

2. Click Create Application Credential

3. Name the credential, add a description, and check the box making it unrestricted (Leave the rest blank. It is important not to add an expiration date.)

4. Download the credentials as an RC file.

5. Save credentials RC file in your terraform-first-instance directory.

Using Terraform to Create and Deploy VM

1. May be easiest to do from a cheaha node?

2. Download Terraform

3. See for some templates. May want to git clone.

4. See /Users/ozborn/code/repo/ccts-bmi-incubator/openstack/ for an example, shown below:

       # Test web server for CCTS Informatics
       resource "openstack_compute_instance_v2" "mice" {
           name = "mice"
           image_name = "CentOS-7-x86_64-GenericCloud-1905"
           flavor_name = "m1.medium"
           key_pair = var.admin_key_pair
           security_groups = ["default", "web"]
       # Work around race condition.
       # See
           network {
               uuid = openstack_networking_subnet_v2.foo_subnet.network_id
       resource "openstack_compute_floatingip_associate_v2" "mice_fip" {
           floating_ip = var.mice_floating_ip
           instance_id =
       # See
       resource "openstack_networking_secgroup_v2" "web" {
           name = "web"
           description = "A security group for managing rules and access to a standard HTTP web server."
       resource "openstack_networking_secgroup_rule_v2" "web_std_port" {
           direction = "ingress"
           ethertype = "IPv4"
           protocol = "tcp"
           port_range_min = 80
           port_range_max = 80
           remote_ip_prefix = ""
           security_group_id =

Using Ansible to Provision VM

1. Take a look at /Users/ozborn/code/repo/ccts-bmi-incubator/openstack/setup-httpd.yml for Apache web server provisioning

2. ansible-configure after doing ansible-lint to verify setup

Current Bugs Feb 2020 (per JPR)

There are two bugs that we are working on in the web ui:

1. launching instances fails unless "Create new volume" is set to "no" on the source tab

2. attaching volumes to instances fails in both the ui and cli.

Networking Setup (per JPR)

The assigned IP addresses (floating public) will be in the range These should be mapped to 164.111.161.x where x repeats the last octet of the assigned 192 number. The networking is set up to allow ingres from on-campus only. The instances can go out to anywhere though.

References (per JPR)

We don't have official getting started docs for now We pretty much just follows the Bright Cluster Manager docs for testing the openstack API from the cli. (Section 1.4 of

Louis has created some notes in a readme that may be useful as well: