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!

 

 

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

  1. Pingback: How to Fix ‘setkeycodes 00’ and ‘Unknown key pressed’ Console Errors on OpenStack! – Serenity-Networks

  2. Pingback: Install OpenStack on a Single Ubuntu 16.04.1 Xenial Xerus Server Using Conjure-up – Serenity-Networks

  3. Randy Mukti says:

    Im facing error like this

    2016-11-19 18:16:44.526 | ++inc/python:_setup_package_with_constraints_edit:317 awk ‘/^name.*=/ {print $3}’ /opt/stack/horizon/setup.cfg
    2016-11-19 18:16:44.527 | awk: fatal: cannot open file `/opt/stack/horizon/setup .cfg’ for reading (No such file or directory)
    2016-11-19 18:16:44.533 | +inc/python:_setup_package_with_constraints_edit:317 name=

    Reply
    • Mike Smith says:

      Are all of the errors python related? What is your server setup? (is it a virtual machine, if so what hypervisor, etc..)

      Thanks,
      Mike

      Reply
  4. Langerak says:

    Works very good, but only after a reboot the Horizon interface is working, the OpenStack services are not started, nor can I find systemd services for it :(. Any ideas?

    Reply
    • Mike Smith says:

      Interesting. Did you give it sufficient time to boot all needed containers? this can take 15 minutes, or significantly more time, depending on resources.

      Reply
      • Langerak says:

        Hi, I did and even waited for up to 2 hours but nothing. According to some references I’ve found on the web it seems that this is supposed to be normal behaviour. According to the developers devstack should only be used for one-time-use testing only which it’s exactly doing here :). Based on your experiences I assume that on your system it was actually started again at boot-time?

        Reply
  5. nacazo says:

    This worked on an older laptop with 8G RAM. Thanks!

    Reply
    • Mike Smith says:

      It’s great to hear that! Good luck on your endeavors.

      Reply
  6. Srinivas Bonu says:

    Hi Mike,

    Thanks a lot for this blog. It helped me in installing Devstack (newton – the latest release), however I am facing issues.

    I have created a virtual machine as a server n my laptop. Used VirtualBox as Hypervisor and created a virtual machine using Vagrant. I have installed ubuntu16.04, the bento/ubuntu-16.04 distribution provided by VirtualBox. Then followed the steps provided by you in the blog and I am able to complete the installation successfully as I have seen the following message.

    This is your host IP address: 10.0.2.15
    This is your host IPv6 address: ::1
    Horizon is now available at http://10.0.2.15/dashboard
    Keystone is serving at http://10.0.2.15/identity/
    The default users are: admin and demo
    The password: openstack

    however, my host is not reachable after this installation. I was able to ping from cmd prompt windows and putyy into 10.0.2.15 before I installed devstack.

    Then I rebooted my vritual machine and was able to ping 10.0.2.15 and was able to log into the dashboard. However, I was not able to retrieve any data from any devstack servcies and was not to create any instances.

    Please help, I am new bee and trying to setup the devstack on VM on my desktop and learn Openstack environment. Appreciate any kind of help to resolve this issue.

    Reply
  7. dadawasozo says:

    Hi Mike,

    I follow the steps but not able to get it installed successfully as others. I need to change the GIT_BASE (-git to -http) in stackrc and start the installation with FORCE=yes. now i’m stuck at the error Could not determine a suitable URL for the plugin. Could you provide suggestion?

    Reply
  8. Mike Smith says:

    What are the ~10 lines before the error? Can you post those here? Also, what version of Openstack are you trying to deploy?

    Thanks,
    Mike

    Reply
  9. Sachin Kumar Sharma says:

    Thanks dear, I finally able to setup openstack newton in VM machine. it was fun and easy with your guide.

    Reply
  10. Boaty Mcboatface says:

    Just wanted to thank you for the guide, I now have the basic installation and I am looking forward to seeing what I can get out of it, thanks mate.

    Reply
  11. Mirai neeku says:

    I have tried it like 10 to 15 times but not able to download openstack. It is showing the error of HTTP 500 (internal server error)
    Plz help

    Reply
  12. Cale Cale says:

    Receiving this error:

    2017-05-19 14:37:59.468 | with open(path, ‘rb’) as stream:
    2017-05-19 14:37:59.468 | IOError: [Errno 2] No such file or directory: ‘/opt/stack/tempest/.tox/tempest/lib/python2.7/site-packages/appdirs-1.4.3.dist-info/METADATA’

    Reply
  13. Paulo R. Galego says:

    I got this error when I tried to create an instance using user demo:

    Error: Failed to perform requested operation on instance “debian”, the instance has an error status: Please try again later [Error: No valid host was found. There are not enough hosts available.].

    Does anyone know what is happening?

    Reply
  14. Michael A Cooper says:

    Hello Mike,

    Thanks for your article very good, Is there a way to add compute nodes to this setup?

    Michael

    Reply
  15. Fernando Silva Maransatto says:

    Hello,

    I have installed is successfully here, but I was trying to understand how to configure other things on it, but now I thing I’ll have to install it everything again, can you tell me how should I start it from the beginning?

    Reply
  16. manas pal says:

    Hi Mike,

    Fantastic documentation. I followed your earlier document (deploying OpenStack using conjure-up) also, but could not proceed after a certain point. Did you already write how to proceed further once the Horizon is up and accessible using uname and pwd?

    Reply

Leave a Reply