WobblyStack – A Single Node OpenStack Install

For a couple of years now I’ve run a small VMWare virtualization system for my business. Broadly speaking it’s gone well and been fairly uneventful. The only panic came when I transitioned from the free to the small business version of the software – I installed more memory than was allowed in the free version, rather than just ignoring it the system refused to boot any VMs! Unfortunately I’ve never really had the time to fully explore what I could do with the system and I’ve long felt that there was more to be had. Rather than shell out more money on VMWare toys though I thought it was high time I learnt about OpenStack.

Note: This is called WobblyStack because I by the name WobblyCogs not because it’s a bit, erm, wobbly.


When there’s an easy way and a hard way to do something you can be pretty certain that I’m going to pick the hard way and this was no exception. On the plus side I have learnt a lot about OpenStack and how Linux networking works, on the minus side I’ve spent a lot of time finding things that don’t work. My day job is as a software developer so infrastructure is generally someone else’s problem but before embarking on this hair brained project I did at least know one end of an Ethernet cable from the other* which really helped.

If you are planning a big-boys-toys installation of OpenStack this article and the scripts I link to aren’t for you – this article it designed to get you up and running quickly and show you step by step how a basic install works. Additionally, if you are doing a real production install you should look at something like Puppet or Chef to automate the install there are also systems like JuJu which go even further.

This first install of OpenStack is an all-in-one solution in to a virtual machine running under VirutalBox configured with a single network interface card. I’m installing Icehouse and using Neutron networking rather than the (much easier to configure) nova-networking. The virtual machine is configured to have 4GB of ram (because that’s all I can spare) and 4 processor cores (because that’s what my target physical machine has).

Ideally OpenStack would be installed across a minimum of three nodes: controller, network and compute but it’s easy enough to combine the controller and network into a single machine if the workload is fairly light, combining everything into a single box is not so great but it does work. This article discusses a single machine install just to learn about OpenStack. When I go into “production” I’ll probably get a machine to use as a controller + network combo, a single controller and network node can run many compute nodes and it’s unlikely I’ll ever have more than one or two compute nodes. A three node install is all well and good if you have money to burn but for me three nodes is out of the question, I could probably afford the hardware but I’m not willing to pay for the electricity to run them all 24/7. What I can probably stretch to is a very low power Intel Atom based machine that combines the controller and network nodes (as mentioned in the networking administrators guide).

I also have an old Dell PowerEdge 860 that I have sitting around not doing anything which I’ll probably run these scripts on. The PowerEdge is good because it gives me experience of working with real metal which is much faster at virtualization. VirtuaBox uses VT-x to speed up the virtualiztion of the machines it runs but it can’t pass that onto the virtual machines running under a virtual machine.

When reading this / these article(s) keep in mind that I’m fairly new to OpenStack so there may be errors and omissions which I will correct in due course.

Base Install

First things first, you need to get yourself the latest and greatest version of Ubuntu Server LTS, at the time of writing that’s 14.04, other Linux distributions will work but Ubuntu is widely used so help is easy to get. Don’t be tempted to go for a desktop version or one of the non-LTS versions as you are asking for trouble, the desktop version will install additional network configuration which will make life harder down the road.

A note on installing on the PowerEdge: The PowerEdge has a single, dual core, processor, 4GB ram and a pair of 160GB drives. The machine isn’t exactly the fastest around any more but it’s fast enough to handle a proof of concept install. A real world minimum for a compute node would be more like a quad core processor with 8GB ram and I’d aim for an 8 core with 16GB ram. Once you’ve downloaded Ubuntu install it onto a USB (or burn it to a CD if you are old school) and install it on to the server. I find Universal USB Installer to be a very simple solution for creating a USB install image.

Start off by installing Ubuntu 14.04 on the virtual machine, applying updates, installing SSH and then taking a snapshot. I emphasize taking a snapshot because the first time through you will probably make a mistake somewhere and it’s good to be able to go back a few steps. To install SSH run:

sudo aptitude install ssh

Note that essentially all of the instructions and scripts here need to be run as root so either get used to typing “sudo …” or use “sudo su -” to switch to the root user.

The installation instructions for OpenStack tell you to run the command:

sudo add-apt-repository cloud-archive:icehouse

But that gives the error message:

cloud-archive only supported on precise

Precise is the previous LTS version of Ubuntu and it was possible to install OpenStack IceHouse (the current version) on Precise. Since the release of Trusty (14.04) the OpenStack packages are now in the main repository so it’s no longer necessary to add them manually. This page gives information on supported versions.

A quick way of getting multiple machines set up is to set up one as above, stop it and then clone it under VirtualBox. Optionally you can install Emacs or some other vaguely friendly editor. Since you are currently running under VirtualBox you may also want to install the VirtualBox additions which give you access to shared space if you need it.

Network Configuration

Designing and configuring the network correctly is probably one of the more difficult aspects of the OpenStack install since it defines the shape of your final solution. You essentially have two options, either go with the legacy Nova-Network or work with the new Neutron package. There’s nothing wrong with Nova-Network, it’s simple and quick to set up and for small to medium installs it is fine, however, in the not to distant future it will be deprecated. The reality is that it will be around for a long time but you’ll have to upgrade at some point if you choose it now.

Now modify your /etc/network/interfaces file so that it looks something like this (choose an IP address on your local network):

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

This assigns eth0 a fixed IP address which you’ll want to jot down for later. After Neutron is installed this needs changing because the eth0 port has to be bridged – that’s the price to pay for only having a single network card. Now restart the eth0 interface with:

sudo ifdown eth0
sudo ifup eth0

You should now be able to SSH into the machine on or whatever IP address you chose.

Next, stop the virtual machine and double check that the virtual ethernet port is in promiscuous mode and that you have all the appropriate settings for memory, cpu etc. If everything is correct snapshot it.

Installing OpenStack

First switch to super user (I got fed up typing sudo) then install git so that you can get the install scripts:

sudo su -
apt-get install git

To get the scripts down load the repository from GitHub:

git clone https://github.com/wobblycogs/wobblystack.git
cd wobblystack

You will almost certainly want to review the settings in one-box-settings.sh at this point to ensure the install will proceed as expected. Things to check include:

  • Flags indicating what should be installed. Everything down to Horizon should work fine.
  • There is a setting that picks the location and version of Splunk that will be installed. You can choose local for a fast install or web if you don’t have a local copy – I found the download servers to be very slow.
  • At the bottom of the settings file is the the CONTROLLER_IP setting. The system can generally figure this out for itself but it will fail if asked to do it automatically after Neutron has been installed because it can’t get the IP address from eth0 at that point.
  • You can pick whether to install KVM or QEMU. Only QEMU will work when installing on VirtualBox.
  • You probably want the system to generate an admin token rather than using the fixed one currently in the script.

The script will typically take about 10 minutes to run on my machine but it’s highly dependent on how fast your internet connection is (and whether you use a local Splunk package, that takes 5 minutes to download on it’s own). While it runs the script will produce an admin-openrc.sh file which can be sourced later to run admin commands. The script will also replace your /etc/network/interfaces file with a version that assigns the IP address to the bridge rather than the ethernet port. The script doesn’t, however, restart the systems networking (in case you lose connectivity) so you’ll need to restart it manually once the script has finished (an ifdown/up of be-eht0 and eth0 should do it) or better restart the machine.

Once you’ve edited the settings perform the install with:


Note: if you can’t execute the script try adding the execute permissions. I developed the scripts on a Windows machine and it looks like they didn’t get the correct permissions (sorry, I’ll fix this at some point):

chmod u+x one-box.sh
chmod u+x one-box-settings.sh
chmod u+x secure_mysql.exp
chmod u+x admin-vm-install.sh

You should now have a working OpenStack install. If this is the first time you’ve installed OpenStack I suggest you run the admin-vm-install.sh script which will install a Cirros VM into the admin project and make it accessible from the outside world. That will give you something to play with while doing more reading up on OpenStack.

* Ethernet cables are symmetrical.