Skip to content

Installing Ubuntu OpenStack on a Single Machine, Instead of 7

For an updated guide click here to read “Install OpenStack on a Single Ubuntu 16.04 Xenial Xerus Server – Updated!”

If you’ve read my other recent posts, you’ve probably notice I’ve been spending a lot of time with different cloud architectures. My previous guide on using DevStack to deploy a fully functional OpenStack environment on a single server was fairly involved, but not too bad. I’ve read quite a bit about Ubuntu OpenStack and it seems that Canonical has spent a lot of energy development their spin on it. So, now I want to set up Ubuntu OpenStack. All of Ubuntu’s official documentation and guides state a minimum requirement of 7 machines (server). However, although I could probably round up 7 machines, I really do not want to spend that much effort and electricity. After scouring the internet for many hours, I finally found some obscure documentation stating that Ubuntu OpenStack could in fact be installed on a single machine. It does need to be a pretty powerful machine; the minimum recommended specifications are:

  • 8 CPUs (4 hyperthreaded will do just fine)
  • 12GB of RAM (the more the merrier)
  • 100GB Hard Drive (I highly recommend an SSD)

With the minimum recommended specs being what they are, my little 1u server may or may not make the cut, but I really don’t want to take any chances. I’m going to use another server, a much larger 4u, to do this. Here are the specs of the server I’m using:

  • Supermicro X7DAL Motherboard
  • Xeon W5580 4 Core CPU (8 Threads)
  • 12GB DDR3 1333MHz ECC Registered RAM
  • 256GB Samsung SSD
  • 80GB Western Digital Hard Drive

I have installed Ubuntu 14.04 LTS, with OpenSSH Server being the only package selected during installation. So, if you have a machine that is somewhat close to the minimum recommended specs, go ahead and install Ubuntu 14.04 LTS. Be sure to run a sudo apt-get upgrade before proceeding.

Lets Get Started

First, we need to add the OpenStack installer ppa. Then, we need to update app. Do the following:

$ sudo apt-add-repository ppa:cloud-installer/stable

$ sudo apt-get update

Now that the cloud-installer ppa has been added, we can start the installation of OpenStack.

$ sudo apt-get install openstack

$ sudo openstack-install

Once you run openstack-install, you will see a text based GUI and will be prompted to select an OpenStack password. After you have entered, and rentered a password, select Confirm.

Screen Shot 2015-04-23 at 5.55.37 PM

Now you will be asked to select an Install Type. Since we want to install everything on a single machine, there is only one option that will work, “Single.” Select Single, then Confirm.

Screen Shot 2015-04-23 at 6.02.44 PM

Now the installation will kick off. It’s going to take a little time. Grab a cup of coffee, or a beer, and watch an episode of Stargate SG-1. It took about an hour on my hardware. You will know the hard part is over when you see this:
Screen Shot 2015-04-23 at 9.06.30 PM

And everything will be completely finished when you see this:

Screen-Shot-2015-04-23-at-9.29.20-PM

Now, you’re finished with the installation but you’re not quite finished. The installer created a private network for the cloud with a 10.x.x.x range. It is not accessible anywhere except from the cloud machine by default. To make the dashboard available from the rest of your actual network, you need to create an iptables port forward. This is the command to do that. You need to change the IP addresses in the command to the IP addresses listed in the bottom left corner when your installation finished, and the IP of your host machine. As you can see, mine was 192.168.1.250 and 10.0.6.241. So my command looks like this:

$ sudo iptables -t nat -A PREROUTING -p tcp -d 192.168.1.250 --dport 8000 -j DNAT --to-destination 10.0.6.241:443

I forwarded port 443, because it is an https address, and secure http uses port 443. The source address, 192.168.1.250, is the ip of my host. You will need to change those IP addresses so your command is correct.

After you do that, you can connect to the horizon dashboard from another workstation on your network. You will enter the IP address of the host and not the VM directly. Think of your host as a router, with its IP being the public IP and the node, or horizon, being the internal IP. In my case, it would be https://192.168.1.250/horizon

Now, this is VERY IMPORTANT. The last screen of the installation says the username is ubuntu. IT IS NOT. The username is admin, and the password is the password you selected (also listed correctly on the last installation screen). After you login, you will see this:

Screen Shot 2015-04-23 at 9.40.39 PM

Now you can get your hands dirty and start playing around. Have fun and let me know if you get stuck, in the comments.

 

Subscribe to future posts and updates!

16 thoughts on “Installing Ubuntu OpenStack on a Single Machine, Instead of 7

  1. Peter says:

    Thanks for the tutorial, I can’t wait to try this. There is a lot of high level overview on how the cloud works but not enough hands on material like this.

    I’m new to cloud tech, but I’m curious why the need for so many servers for a normal openstack build? I’ve seen presentations that say that openstack is the virtualization of the datacenter. What’s the point if you still need a team of 7 servers?? So the raw details on build config is what I’m trying to understand now, should I install an ESX host and virtualize my 7 servers or am I alright running it all on one like your tutorial shows?

    Reply
  2. huyhuyt says:

    Thanks for sharing information. Installation is very straight forward but I am still not able to access dashboard after apply new rule for iptables as you mentioned. Not sure what I am missing anything?

    Reply
    • Mike Smith says:

      Have you tried disabling iptables all together to see if the issue is firewall related or not? I would start there.

      Reply
  3. Michael Cooper says:

    Hey there very nice article, I started this install this morning, How ever it has been stuck on 1 pending and 2 unknown for several hours, Any ideas?

    Reply
    • Mike Smith says:

      Which step in the process are you in?

      Reply
  4. Pingback: External access to Ubuntu single-node openstack horizon dashboard - ubuntutextbook

  5. Pingback: Install OpenStack on a Single Ubuntu 16.04.1 Xenial Xerus Server – Updated! – Serenity-Networks

  6. Pingback: Installing OpenStack on a Single CentOS 7 Server – Serenity-Networks

  7. Pingback: Install OpenStack on One Virtual Machine, the Easy Way, On Ubuntu 16.04 LTS! – Serenity-Networks

  8. Mustafa says:

    Hi, Thanks for the tutorial but it seems i have a problem. after openstack-install nothing happens. when i check the logs i see that no lxc was created in /var/lib/lxc. why is this?

    Reply
    • Mike Smith says:

      Mustafa,

      This particular guide is a bit dated. You will definitely want to use devstack to deploy OpenStack on one system. I just wrote an updated guide to install OpenStack Newton on Ubuntu 16.04 LTS. You should defeinately purse that guide. You can find it here: http://serenity-networks.com/install-openstack-on-one-virtual-machine-the-easy-way-on-ubuntu-16-04-lts/ If you absolutely must use Ubuntu 14.04, the same guide will work with Ubuntu 14.04 LTS. This is a newer method for deploying a development / testing environment for OpenStack and it’s MUCH more efficient and will use far less resources. It will also run a lot faster for you. Give it a shot and let me know how it works out for you. Thanks!

      Reply
  9. Evio Fragoso says:

    When trying to install i get this message and then the installation stops :Starting cloud deployment…Error starting openstack-status:while scanning an aliás
    Session still open, not unmounting

    Reply
    • Maaz Ansari says:

      this may happen because of the resources getting exhausted
      so better try to increase few memory and then give it a try

      Reply
      • Yap says:

        I have 32gb ram i5 4cpu but I still stuck at deploying stage. May I know why?
        OS host: Ubuntu Server 14.04.5 LTS

        Reply
  10. Michael A Cooper says:

    Hello, Nice Tutorial/Article, However this is what I got when I tried it.

    [email protected]:~# apt-add-repository ppa:cloud-installer/stable
    Cannot add PPA: ‘ppa:~cloud-installer/ubuntu/stable’.
    The team named ‘~cloud-installer’ has no PPA named ‘ubuntu/stable’
    Please choose from the following available PPAs:
    * ‘simplestreams-testing’: Simplestreams Changes Testing

    Any ideas? https://uploads.disquscdn.com/images/791b2b72b3fe2fc37cf272280121dea9f04b4693e653b3dd5464291a15df7340.png

    Reply

Leave a Reply