Mehic.info

How to install OpenStack on Ubuntu with DevStack

Installation

The first thing you must do is create a new non-root user that can be used for the installation. Open up a terminal window and issue the command:

sudo useradd -s /bin/bash -d /opt/stack -m stack

Give that user sudo privileges with the command:

echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
usermod -aG sudo stack

Change to that user with the command:

sudo su - stack

Next we’ll checkout Devstack from Github. First install git with the command:

sudo apt install git

Now you can checkout DevStack (we’ll use the most recent stable version, queens) with the command:

git clone https://github.com/openstack-dev/devstack.git 

This will create a new directory, devstack. Change into that directory with the command 

cd devstack
nano inc/python

locate the line "$cmd_pip $upgrade \" and replace it with "$cmd_pip $upgrade $install_test_reqs --ignore-installed \"

Bxefore you issue the installation command, you need to configure the local.conf file. Open this file with the command nano local.conf. Make sure that contains the following:
HOST_IP=SERVER_IP
SERVICE_PASSWORD=PASSWORD
ADMIN_PASSWORD=PASSWORD
SERVICE_TOKEN=PASSWORD
DATABASE_PASSWORD=PASSWORD
RABBIT_PASSWORD=PASSWORD
ENABLE_HTTPD_MOD_WSGI_SERVICES=True
KEYSTONE_USE_MOD_WSGI=True

# Logging
LOGFILE=$DEST/logs/stack.sh.log
VERBOSE=True
ENABLE_DEBUG_LOG_LEVEL=True
ENABLE_VERBOSE_LOG_LEVEL=True
GIT_BASE=${GIT_BASE:-https://git.openstack.org}

TACKER_MODE=standalone
USE_BARBICAN=True
TACKER_BRANCH=stable/queens
enable_plugin networking-sfc ${GIT_BASE}/openstack/networking-sfc $TACKER_BRANCH
enable_plugin barbican ${GIT_BASE}/openstack/barbican $TACKER_BRANCH
enable_plugin mistral ${GIT_BASE}/openstack/mistral $TACKER_BRANCH
enable_plugin tacker ${GIT_BASE}/openstack/tacker $TACKER_BRANCH

You need to replace each instance of PASSWORD with a unique and challenging password, and SERVER_IP with the IP address of your OpenStack server. Once you’ve done that, save and close the file.

Now we run the command for the installation. That command is ./stack.sh. This is where the installation takes a significant amount of time. You can expect this command to take between 30-60 minutes to complete.

Once the installation completes, open up a web browser that’s on the same network as your OpenStack server and point it to http://SERVER_IP/dashboard (where SERVER_IP is the IP address of your OpenStack server). You should be greeted by the login window. Log in with the username admin and the password you used in the local.conf configuration file.