OpenStack deployment on Ubuntu 18.04 with DevStack

Do you want to deploy a single server Openstack Cloud on Ubuntu 18.04 for development and testing? This guide is suitable for developers and SysAdmins who are looking for a simple Openstack deployment for learning, PoC and development. DevStack is a collection of scripts that enable you to deploy a complete OpenStack environment from a git master, virtual machine, home desktop, or laptop.

For CentOS, check: How to deploy OpenStack cloud on CentOS 7 using Packstack RDO

DevStack minimum requirements

  • Fresh install Ubuntu 18.04
  • 4 GB minimum memory
  • At least 2 vCPUs
  • A storage capacity of 10 GB should be sufficient.
  • Internet connection
  • sudo user

Step 1: Update the Ubuntu system

Log in to your Ubuntu system – it can be a desktop or cloud VM and update it.

sudo apt updatesudo apt -y upgradesudo apt -y dist-upgrade

Restart after upgrading.

sudo reboot

Step 2: Add a stack user

Devstack should run as a non-root user with sudo enabled. If you are running an instance in the cloud, a standard login to the cloud image, such as “center“Or”ubuntu“Or”Cloud userUsually fine.

For other installations of Ubuntu 18.04, run the following command to create a DevStack deployment user.

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

No password is required to enable sudo privileges for this user.

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

Switch to stack Users test.

[email protected]:~$ sudo su - stack[email protected]:~$  sudo su -[email protected]:~# 

Step 3: Download DevStack

Clone the Destack deployment code from Github.

su - stacksudo apt -y install gitgit clone

Create local.conf File with 4 passwords and host IP address.

cd devstacknano local.conf



# Password for KeyStone, Database, RabbitMQ and Service

# Host IP - get your Server/VM IP address from ip addr command

Step 4: Use DevStack to launch Openstack deployment on Ubuntu 18.04

Now that you have configured the minimum configuration required to start using DevStack, you are ready to install Openstack.

cd devstack./

DevStack will be installed;

  • Keystone – Identity Services
  • Glance –Photo Services
  • Nova – Computing Services
  • Place –Placement API
  • cinder – Block storage services
  • neutron –Network Services
  • horizon – Openstack dashboard

This will take 15 to 20 minutes, it depends a lot on your internet connection speed. At the end of the installation process, you should see the following output:

This is your host IP address: is your host IPv6 address: 2a01:4f8:c2c:308e::1Horizon is now available at is serving at default users are: admin and demoThe password: StrongAdminSecretWARNING: Using lib/neutron-legacy is deprecated, and it will be removed in the futureServices are running under systemd unit files.For more information see: Version: steinChange: 8bdbf850967b90ebdca428247bb93ad2eb6478c0 Merge "Set ownership of /etc/pki/ files for TLS" 2019-03-26 08:07:26 +0000OS Version: Ubuntu 18.04 bionic2019-03-26 21:32:56.743 | completed in 1761 seconds.

Step 5: Visit the OpenStack dashboard

Copy the Horizon URL shown in the installation output and paste it into your web browser:

Use default user demo or admin And configure the login password.

After logging in, you should see the Openstack Management Web console.

OpenStack deployment on Ubuntu 18.04 with DevStack

If you want to use the openstack command line tool to manage devstack. you must source openrc In your shell.

source openrc

You can now add instance images to Glance to use when creating virtual machines with Nova. We have a comprehensive guide on adding images to Openstack Glance.

Add Cirros test image

Download the virtual image.


Upload it to Glance.

openstack image create 
    --container-format bare 
    --disk-format qcow2 
    --file cirros-0.4.0-x86_64-disk.img 

Confirm the image upload.

$ openstack image list +--------------------------------------+--------------------------+--------+ | ID                                   | Name                     | Status | +--------------------------------------+--------------------------+--------+ | 3c1e6e1e-a997-4f1a-a70d-06c4a6dafc37 | cirros-0.4.0-x86_64-disk | active | +--------------------------------------+--------------------------+--------+

It should be visible from the web UI

OpenStack deployment on Ubuntu 18.04 with DevStack

To learn more about DevStack customization, check out the System Configuration Guide. This includes adjustments to the default network. See also the Openstack Documentation for administration guidance.

We have a production deployment guide based on CentOS: Install Openstack three-node cluster on CentOS 7

More information about OpenStack:

How to create an OpenStack instance with a fixed / static IP address

How to create OpenStack projects, users and roles

How to migrate OpenStack instances from one compute host to another

How to resize an OpenStack instance / virtual machine

Add SSH key pair to OpenStack using CLI

How to add flavor to OpenStack using the CLI