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.
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.
- Install Ubuntu on VirtualBox and add 3 network adapters.
- NAT interface (enp0s3)
- Host-Only interface (enp0s8)
- Bridge Network
- 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
address 192.168.9.6
netmask 255.255.255.0
#gateway 192.168.9.1
auto enp0s3
iface enp0s3 inet dhcp - Restart your network using
sudo systemctl restart networking - sudo apt-get update && sudo apt-get install git
- 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 - Download devstack
sudo su - stack
git clone https://git.openstack.org/openstack-dev/devstack -b stable/pike - Configure Devstack
create a file named local.conf in the devstack directory and add the following minimal configurations. (cd devstack/ vi local.conf)
[[local|localrc]]
HOST_IP=192.168.9.6
FLAT_INTERFACE= enp0s8
ADMIN_PASSWORD=stack
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD - Run Devstack
./stack.sh
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!
Comments
Post a Comment