Deploying OpenStack on Ubuntu 16.04 with VirtualBox

I wanted to deploy my own OpenStack on a VM to do development testing. I initially faced a lot of issues with the deployment. Hence I wanted to document my steps to help others out.

OpenStack has their own Devstack that you can use for development testing.  So this documentation covers installing the Devstack on a Ubuntu 16.04 on VirtualBox.

  1. Install Ubuntu on VirtualBox and add 3 network adapters. 
    • NAT interface (enp0s3)
    • Host-Only interface (enp0s8)
    • Bridge Network
  2. Once you boot up into Ubuntu, run the command "sudo ifconfig" and it should give you the network adaptor names (shown above). Then add the following lines to the /etc/network/interfaces file.

    auto enp0s8
    iface enp0s8 inet static
    auto enp0s3
    iface enp0s3 inet dhcp

  3. Restart your network using
    sudo systemctl restart networking

  4. sudo apt-get update && sudo apt-get install git

  5. Configure the stack user (stack user would be running the Devstack)
    sudo useradd -s /bin/bash -d /opt/stack -m stack
    echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack

  6. Download devstack
    sudo su - stack
    git clone -b stable/pike

  7. Configure Devstack
    create a file named local.conf in the devstack directory and add the following minimal configurations. (cd devstack/ vi local.conf)

    FLAT_INTERFACE= enp0s8

  8. Run Devstack
This will take a 15 - 20 minutes, largely depending on the speed of your internet connection. At the end you should have a working Devstack!


Popular Posts