Skip to content

Install OpenStack on One Virtual Machine, the Easy Way, On Ubuntu 16.04 LTS!

Many of you have emailed me or posted to voice your gripes about the painful process of installing an OpenStack environment to play around with. I feel your pain! My recent article on deploying OpenStack using conjure-up worked great until a developer committed some defective code.  Some of you even reverted to my old guide on deploying OpenStack on Ubuntu 14.04 from last year.  So, I set out to give you a fool proof, 100% guaranteed deployment method that’s EASY, STABLE, and works on Ubuntu 16.04 Xenial.  Here you go!

Requirements

 

For this guide, you will need a server at least as good as these specs.

  • Virtual Machine on a real hypervisor (ESXi, KVM, Xen, etc) or a bare metal server with virtualization support.
  • 14GB of RAM is the recommended minimum.
  • 100GB of hard disk space, at least.
  • Ubuntu 16.04 LTS server, having already ran sudo apt update && sudo apt upgrade
  • About an hour and a cup of coffee.

 

Installing OpenStack

 

Right now, the current version of Ubuntu OpenStack Canonical is running is Newton.  So, that’s what we will install.  I will let you know how to specify a different version if you like.  It only requires changing a single command.

First, we need to use the git command to clone devstack.  Devstack will do all of the magic that installs this all on one server.  SSH to your server and run these commands.

 

cd /

sudo git clone https://git.openstack.org/openstack-dev/devstack -b stable/juno

 

Note: If you want to install the bleeding edge, omit -b stable/juno entirely.  If you would like to install kilo, liberty or mitaka, simply swap out “juno” above with the release name you’d like.  You can check here to see what’s available; they are listed at the top of the page.

 

Next, we need to copy the sample local.conf file and set a password that will be used during the automated deployment.

 

cd devstack/

sudo cp samples/local.conf local.conf

sudo nano local.conf

 

Scroll down until you see the password variables.  You need to set your password after ADMIN_PASSWORD=, and change the other three to $ADMIN_PASSWORD.  This makes everything use the same password during the installation.

 

ADMIN_PASSWORD=yourpassword

MYSQL_PASSWORD=$ADMIN_PASSWORD

RABBIT_PASSWORD=$ADMIN_PASSWORD

SERVICE_PASSWORD=$ADMIN_PASSWORD

 

Be sure it looks like this before saving and exiting. (Ctrl-X, Y, Enter).

 

local.conf password variables

 

Next, we’ll run a script to create a new user for OpenStack, then make that new user the owner of the devstack folder.

 

sudo /devstack/tools/create-stack-user.sh

sudo chown -R stack:stack /devstack

 

Now it’s time to kick off the installation.  It’s a good time to grab some coffee or a good book.

 

sudo su stack

/devstack/stack.sh

 

After a half hour to an hour, you will eventually end up looking at something like this.

 

devstack_deployment_finished

 

As you can see, two users have been created for you; admin and demo.  Your password is the password you set earlier.  These are the usernames you will use to login to the OpenStack Horizon Dashboard.  Take note of the Horizon web address listed in your terminal.

 

Fire up a browser, and put the Horizon Dashboard address in your address bar.  Mine is http://192.168.0.116/dashboard

 

You should see a login page like this.

 

openstack_newton_dashboard_login

To start with, log in with the admin user so you can poke around.  If all goes well you should be in your dashboard.

 

 

openstack_horizon_dashboard

You will need to use the demo user, or create a new user, to create and deploy instances.  I’ll be writing some more tutorials soon that will cover some of those types of things.

 

NOTE:  If you are try to use the console through the web browser and you get a bunch of “atkbd serio0: Use ‘setkeycodes 00” and “Unknown key pressed” errors and are unable to use the console, click here to read my tutorial about fixing the console on a fresh Openstack install.  There’s a bug in noVNC that causes this to happen.  It’s a quick and easy fix!

 

I hope this was fairly pain free for you.  If you ran into any problems or have any questions, please feel free to post in the comments below.  I enjoy hearing from my readers.  Thanks!