Skip to content

How to Install Openstack Ocata on a Single Server, Using Devstack

Deploying an Openstack test or development platform can be a very daunting task.  A traditional installation of an Openstack infrastructure requires many servers and is quite complex.  However, there are a few methods that can make this task much easier, and possible with access to a single physical server or virtual machine that has enough resources.  Today, we’ll deploy an Openstack Ocata infrastructure using a single virtual machine (in my case, a VMware ESXi based virtual machine) using Devstack.  I’ve found this to be the most stable, repeatable, and reliable method to get an Openstack infrastructure up as quickly as possible.  Keep in mind, this same guide can be used to install almost any release of Openstack, simply by adjusting one word.  More on that later.

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.  18GB or more will provide the best results.
  • 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/ocata

 

Note: If you want to install a different release of Openstack, such as newtonpike, mitaka or queens, simply swap out “ocata (in the command 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!