UAB Openstack Tutorial: Difference between revisions
(Initial Page Creation) |
m (Add info on getting creds) |
||
Line 12: | Line 12: | ||
4. Provision your VM with ansible | 4. Provision your VM with ansible | ||
== Using Terraform to Create and Deploy VM == | == Steps == | ||
1. May be easiest to do from a cheaha node | |||
=== Create Application Credentials === | |||
See https://gitlab.rc.uab.edu/rrand11/terraform-openstack | |||
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 https://www.terraform.io/downloads.html | 2. Download Terraform https://www.terraform.io/downloads.html | ||
3. See https://gitlab.rc.uab.edu/jelaiw/ccts-bmi-incubator for some templates. May want to git clone. | 3. See https://gitlab.rc.uab.edu/jelaiw/ccts-bmi-incubator for some templates. May want to git clone. | ||
4. See /Users/ozborn/code/repo/ccts-bmi-incubator/openstack/mice.tf for an example | |||
4. See /Users/ozborn/code/repo/ccts-bmi-incubator/openstack/mice.tf for an example, shown below: | |||
Line 56: | Line 76: | ||
== Using Ansible to Provision VM == | === 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 | 1. Take a look at /Users/ozborn/code/repo/ccts-bmi-incubator/openstack/setup-httpd.yml for Apache web server provisioning | ||
Revision as of 17:29, 28 February 2020
UAB Openstack Tutorial
This tutorial is meant as a guide for deploying VMs in UAB's OpenStack environment.
Overview
1. Send email to support@listserv.uab.edu and request an account
2. Log into ruffner.rc.uab.edu to get application credentials
3. Use terraform to create and deploy a VM to UAB OpenStack
4. Provision your VM with ansible
Steps
Create Application Credentials
See https://gitlab.rc.uab.edu/rrand11/terraform-openstack
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 https://www.terraform.io/downloads.html
3. See https://gitlab.rc.uab.edu/jelaiw/ccts-bmi-incubator for some templates. May want to git clone.
4. See /Users/ozborn/code/repo/ccts-bmi-incubator/openstack/mice.tf 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 https://github.com/terraform-providers/terraform-provider-openstack/issues/775. 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 = openstack_compute_instance_v2.mice.id }
# See https://www.terraform.io/docs/providers/openstack/r/networking_secgroup_rule_v2.html. 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 = "0.0.0.0/0" security_group_id = openstack_networking_secgroup_v2.web.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 192.168.16.128-250. 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 https://support.brightcomputing.com/manuals/8.2/openstack-deployment-manual.pdf).
Louis has created some notes in a readme that may be useful as well:
https://gitlab.rc.uab.edu/louistw/cluster-installation-note/blob/master/openstack.md