
DevStack is a project whose purpose is to quickly deploy a development and testing environment for OpenStack. DevStack supports Ubuntu 16.04/17.04, Fedora 24/25, CentOS/RHEL 7, as well as Debian and OpenSUSE. In this article, we will install the Ocata version of OpenStack.
DevStack installs the following modules by default:
- Keystone: Identity service.
- Nova: Virtualization management module.
- Cinder: Storage.
- Neutron: Network module.
- Horizon: Web interface.
Warning: DevStack is not designed to be restarted. It cannot be used as a production environment.
Warning 2: Given the modifications made by the DevStack script, it should only be used on a machine dedicated to this purpose.
Installation
Update repositories and already installed packages:
apt-get update
apt -y dist-upgrade
Install some packages required for the DevStack script:
apt install -y sudo vim vim-nox lynx zip binutils wget openssl ssl-cert ssh
apt install -y bridge-utils git python-pip
Update the Python package manager:
pip install --upgrade pip
Install the Python dependency “os-testr”:
pip install -U os-testr
Create the “stack” user and verify its settings:
groupadd stack
useradd -g stack -s /bin/bash -d /home/stack -m stack
Configure “stack”:
echo "stack ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/50_stack_sh
chmod 440 /etc/sudoers.d/50_stack_sh
Clone the DevStack repository into /home/stack:
cd /home/stack
git clone https://git.openstack.org/openstack-dev/devstack
Switch git branch to select the “Ocata” version of OpenStack:
cd devstack
git checkout stable/ocata
Create the “local.conf” configuration file:
echo '[[local|localrc]]' > local.conf
echo 'ADMIN_PASSWORD=stack' >> local.conf
echo 'DATABASE_PASSWORD=stack' >> local.conf
echo 'RABBIT_PASSWORD=stack' >> local.conf
echo 'SERVICE_PASSWORD=stack' >> local.conf
echo 'GIT_BASE=https://git.openstack.org' >> local.conf
echo 'USE_SCREEN=FALSE' >> local.conf
echo 'PIP_UPGRADE=True' >> local.conf
Change ownership of the DevStack directory:
chown -R stack.stack /home/stack/devstack
Finally, run the DevStack installation with the “stack” user. The script takes approximately 20 minutes to complete:
su -l stack -c "cd devstack; ./stack.sh"
In Case of Installation Issues
If the installation fails, a cleanup script is included:
./clean.sh
Quick Install Script
#!/bin/bash
apt-get update
apt -y dist-upgrade
apt install -y sudo vim vim-nox lynx zip binutils wget openssl ssl-cert ssh
apt install -y bridge-utils git python-pip
pip install --upgrade pip
pip install -U os-testr
groupadd stack
useradd -g stack -s /bin/bash -d /home/stack -m stack
echo "stack ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/50_stack_sh
chmod 440 /etc/sudoers.d/50_stack_sh
cd /home/stack
git clone https://git.openstack.org/openstack-dev/devstack
cd devstack
git checkout stable/ocata
echo '[[local|localrc]]' > local.conf
echo 'ADMIN_PASSWORD=stack' >> local.conf
echo 'DATABASE_PASSWORD=stack' >> local.conf
echo 'RABBIT_PASSWORD=stack' >> local.conf
echo 'SERVICE_PASSWORD=stack' >> local.conf
echo 'GIT_BASE=https://git.openstack.org' >> local.conf
echo 'USE_SCREEN=FALSE' >> local.conf
echo 'PIP_UPGRADE=True' >> local.conf
chown -R stack.stack /home/stack/devstack
su -l stack -c "cd devstack; ./stack.sh"
Accessing the Web Interface
Once installation is complete, the Horizon web interface is available at: http://machineIP.