Installing OpenStack with DevStack
OpenStack is open source software for building private and public clouds. There are several ways to install OpenStack. This guide will walk you through the installation of DevStack, which is a documented shell script to build complete OpenStack development environments.
We will start with the installation of Ubuntu 12.04 (LTS). Make sure that you create a user called ‘stack’. When the installation is completed, add the git program:
sudo apt-get -y install git
Then download the latest source code of DevStack and pick a stable version of it (nicknamed Havana):
git clone https://github.com/openstack-dev/devstack.git cd devstack git checkout stable/havana
There has been a shift from the old localrc file to the newer local.conf file to make changes to the default settings of DevStack:
rm localrc
Edit the local.conf file with your favorite editor and give it the following contents:
[[local|localrc]] HOST_IP=1.2.3.4 FLOATING_RANGE=1.2.3.128/25 FIXED_RANGE=10.11.12.0/24 FIXED_NETWORK_SIZE=256 FLAT_INTERFACE=eth0 ADMIN_PASSWORD=stack MYSQL_PASSWORD=stack RABBIT_PASSWORD=stack SERVICE_PASSWORD=stack SERVICE_TOKEN=1a672b16de58d47d45d7
Make sure that you change the values of HOST_IP and FLOATING_RANGE. It is advisable to change the other values as well, but that is not strictly necessary. Virtual machines are always given an internal IP address from the FIXED_RANGE. If you want the VM to be accessible from the outside as well, you need to assign a floating IP address to it. This will be one of the IP addresses from FLOATING_RANGE.
If you want VMs to always get a floating IP address at creation time, edit the file /etc/nova/nova.conf:
auto_assign_floating_ip = True
And then restart nova-network:
kill `ps ax | grep nova-network | awk 'NR==1{print $1}' | cut -d' ' -f1` /usr/bin/python /usr/local/bin/nova-network --config-file /etc/nova/nova.conf &
Now login to the website, located at http://HOST_IP, using the username admin and the password stack.
If you want to able to SSH into your VMs from the outside, add a rule to the default security group rules: