Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (2023)

Table of Contents


Overview on Kolla Ansible

In this tutorial I'll teach you how to install Openstack Kolla Ansible on Ubuntu 20.04 on a VMware workstation step by step.

The Kolla project is described as a service that provides production-ready containers and deployment tools to operate OpenStack clouds that are scalable, fast, reliable, and upgradable using community best practices.

In order to deploy OpenStack, Kolla has three projects as follows:

  • kolla:All the Docker container images for OpenStack projects are maintained in this project. Kolla provides an image building tool called kolla-build to build container images for most of the projects.
  • kolla-ansible: This provides Ansible playbooks for deploying OpenStack inside Docker containers. It supports both the all-in-one and multi-node setups of the OpenStack cloud.
  • kolla-kubernetes: This deploys OpenStack on Kubernetes. This aims to leverage the self-healing, health checks, upgrade, and other capabilities of Kubernetes for managing containerized OpenStack deployment. kolla-kubernetes uses Ansible playbooks and the Jinja2 template to generate configuration files for the services.
ALSO READ: Solved "No valid host was found. not enough hosts available"

Kolla’s advantages

On the market, there are several OpenStack deployment tools and solutions. The advantages of Kolla are mostly due to container technology:

Rapid deployment, smooth upgrade, and upgrade impact time is very short.

The upgrade granularity is small. It can be upgraded in units of components. For example, to upgrade the nova component, use the kolla-ansible -i ~/kolla/all-in-one upgrade -t nova command.

Only the operating system is compatible with docker.

Docker reduces a lot of conflicts between the openstack installation package and the basic installation package.


The kolla project has better community support.

(Video) Deploy All-In-One Openstack using Kolla-Ansible project

What we intend to do

We are planning to deploy All in One OpenStack deployment using Ubuntu 20.04 as our host server, where:

  • kolla-ansible uses the installation package.
  • The kolla-ansible runtime environment uses virtualenv instead of the local python environment.
  • Docker's registry uses the public Docker Hub instead of building it yourself.
  • The openstack components deployed in this experiment are nova, neutron and some neutron plug-ins, heat, glance, cinder-volume , and horizon.

By the end of this tutorial, you will have an up and running OpenStack deployment with all the services running on the same Ubuntu server.

Host Machine Requirements

Here the host machine is the server on which we will be installing the kolla ansible to deploy openstack. In our case the host server is Ubuntu 20.04 Virtual Machine running on VMware Workstation.

ALSO READ: OpenStack Command Line Cheat Sheet (Beginner's Guide)

The following minimal criteria must be met by the host machine:

  • 2 network interfaces
  • 8GB main memory
  • 40GB disk space


This article assumes that you already have fair idea of using Ansible. You may follow our detailed ansible tutorial to get more insights.

The host server (Ubuntu 20.04) must have an active internet connection as during the course of this tutorial, we will also download and install certain packages.

My Lab Environment

To demonstrate the steps to deploy OpenStack using Kolla Ansible, we will be using VMs created using VMware Workstation. So, I have already installed VMware Workstation on my Windows Desktop on which I have created a VM using the following specs:


  • OS: Ubuntu 20.04
  • RAM: 16GB
  • Disk: 100 GB
  • CPU: Quad Core
  • ens33(Bridge):
  • ens34(NAT): Make sure no IP Address is assigned to this interface

Step-1: Install dependency packages

Always install stable version of python to avoid conflicts and errors. Before installation update you Ubuntu machine to get latest packages and dependencies.

Run the following command in your terminal to update the packages.

golinuxcloud@ubuntu:~$ sudo apt update

In the next step I am going to install python build and dependencies.

golinuxcloud@ubuntu:~$ sudo apt install python3-dev libffi-dev gcc libssl-dev
ALSO READ: How to troubleshoot OpenStack ironic introspection

Step-2: Create Python Virtual Environment

In this step I am going to create a virtual environment to avoid any conflicts with the system and site packages. When the virtual environment is created I am going to install Kolla Ansible and its dependencies.

First I need to install Python virtual environment package and we need “pip” and for that I am going to use the following commands.

golinuxcloud@ubuntu:~$ sudo apt install python3-pip

Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (1)

Then install virtual environment.


(Video) openstack Deployment through kolla-ansible | For Beginners | openstack Installation | shivamtomar10
golinuxcloud@ubuntu:~$ sudo apt install python3-virtualenv

Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (2)

Verify your virtual environment installation with following command.

golinuxcloud@ubuntu:~$ virtualenv --versionvirtualenv 20.0.17 from /usr/lib/python3/dist-packages/virtualenv/

In the next step I am going to create a virtual environment and name it” golinux” with the following command. I have created my environment in “home” directory.

golinuxcloud@ubuntu:~$ python3 -m venv golinux

Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (3)
This command will create the following directory structure:

golinuxcloud@ubuntu:~$ ls -l golinux/total 20drwxrwxr-x 2 golinuxcloud golinuxcloud 4096 Nov 27 23:01 bindrwxrwxr-x 2 golinuxcloud golinuxcloud 4096 Nov 27 23:01 includedrwxrwxr-x 3 golinuxcloud golinuxcloud 4096 Nov 27 23:01 liblrwxrwxrwx 1 golinuxcloud golinuxcloud 3 Nov 27 23:01 lib64 -> lib-rw-rw-r-- 1 golinuxcloud golinuxcloud 70 Nov 27 23:01 pyvenv.cfgdrwxrwxr-x 3 golinuxcloud golinuxcloud 4096 Nov 27 23:01 share

Now we will activate our virtual environment that we have created and will configure everything in that environment.

golinuxcloud@ubuntu:~$ source golinux/bin/activate(golinux) golinuxcloud@ubuntu:~$

Once you activate the virtual environment, your terminal prompt will change as shown above which would mean that you are inside the virutal environment.

ALSO READ: Check Openstack version and mapped release information

Step-3: Install dependency packages using virtual environment

Next we must handle some more dependencies before we go ahead and install Kolla Ansible. Upgrade the pip to the latest version using the command.

golinuxcloud@ubuntu:~$ pip install -U pip

Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (4)

Install Ansible. Kolla Ansible requires at least Ansible 2.10 and supports up to 4.

golinuxcloud@ubuntu:~$ pip install 'ansible<5.0'

Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (5)

Step-4: Install and Setup Kolla Ansible

Next we will install Kolla-ansible using pip command:

golinuxcloud@ubuntu:~$ pip install kolla-ansible

Create the /etc/kolla directory for the configuration of kolla and Openstack projects

golinuxcloud@ubuntu:~$ sudo mkdir -p /etc/kolla

Change the ownership of the directory. Here replace golinuxcloud with the user you are using for the deployment.


golinuxcloud@ubuntu:~$ sudo chown golinuxcloud:golinuxcloud /etc/kolla

Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (6)

For our deployment, the most crucial files are globals.yml and passwords.yml, copy these two files to the /etc/kolla directory.

(Video) Deploy latest multinode openstack using Kolla-ansible on centos7/ubuntu tutorial - 1

(golinux) golinuxcloud@ubuntu:~/golinux$ cp -r /home/golinuxcloud/golinux/share/kolla-ansible/etc_examples/kolla/* /etc/kolla/

Copy the inventory file to the /etc/kolla folder as well. Inventory files are simply used to notify kolla-ansible which are our hosts and type of installation we need on these hosts.The inventory file defines the division of ansible host groups. If it is an all-in-one environment, use the all-in-one file directly without modification.

(golinux) golinuxcloud@ubuntu:~/golinux$ cp /home/golinuxcloud/golinux/share/kolla-ansible/ansible/inventory/* /etc/kolla/

In our case we will use all-in-one file because we use multinode file when we are deploying OpenStack on more than one host

(golinux) golinuxcloud@ubuntu:~$ ls -l /etc/kolla/total 64-rw-rw-r-- 1 golinuxcloud golinuxcloud 8980 Nov 27 23:14 all-in-one-rw-rw-r-- 1 golinuxcloud golinuxcloud 30991 Nov 27 23:14 globals.yml-rw-rw-r-- 1 golinuxcloud golinuxcloud 9446 Nov 27 23:14 multinode-rw-rw-r-- 1 golinuxcloud golinuxcloud 4854 Nov 27 23:14 passwords.yml
ALSO READ: How to Configure Tripleo Undercloud to deploy Overcloud in OpenStack

Step-5:Configure Ansible

Create an ansible directory and ansible.cfg file

golinuxcloud@ubuntu:~$ sudo mkdir /etc/Ansible

Here is the sample content of ansible.cfg file:

golinuxcloud@ubuntu:~$ sudo vi /etc/ansible/ansible.cfg

Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (7)

Step-6:Create Inventory

I am deploying everything in one machine. Therefore, I will use all-in-one inventory file.

The file being kept as it is because we are only using one host for installation you can change the file as you need for you OpenStack installation.The inventory file defines the division of ansible host groups. If it is an all-in-one environment, use the all-in-one file directly without modification.

golinuxcloud@ubuntu:~$ cat /etc/kolla/all-in-one# These initial groups are the only groups required to be modified. The# additional groups are for more control of the environment.[control]localhost ansible_connection=local[network]localhost ansible_connection=local[compute]localhost ansible_connection=local[storage]localhost ansible_connection=local...

Step-7: Configure globals.yml

globals.yml is the most important file in kolla Ansible. There are few options that we need to add in the file.

  • enable_haproxy:
  • kolla_internal_vip_address(ens33): Next we need to provide floating IP for management traffic. This IP will be managed by keepalived to provide high availability, and should be set to be not usedaddress in management network that is connected to ournetwork_interface.
  • network_interface: This is the default interface for multiple management-type networks
  • neutron_external_interface(ens34): Second interface required is dedicated for Neutron external (or public) networks, can be vlan or flat, depends on how the networks are created. This interface should be active without IP address.
  • enable_cinder: Kolla Ansible provides a bare compute kit, however it does provide support for a vast selection of additional services. To enable them, setenable_*to “yes”
  • kolla_base_distro: Kolla provides choice of several Linux distributions in containers. But if you are deploying for the first time i will recommend that you should use Ubuntu or Centos.
ALSO READ: Steps to Install and configure Controller Node in OpenStack – Part 2

Sample output:

$ cat /etc/kolla/globals.ymlenable_haproxy="no"kolla_internal_vip_address: ""network_interface: "ens33"neutron_external_interface: "eth1"enable_cinder: "yes"kolla_base_distro: "Ubuntu"

Step-8: Generate Password

In the next step generate the password for the services. These generated passwords will be stored in /etc/kolla/passwords.yml file


golinuxcloud@ubuntu:~$ kolla-genpwd

Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (8)

Step-9: Perform Deployment

Once the passwords are generated and every thing is done without getting errors. Now in the next step we are going to install bootstrap servers.

golinuxcloud@ubuntu:~$ kolla-ansible -i /etc/kolla/all-in-one bootstrap-servers

Ansible playbooks will be running using this command. This will take some time if you get “failed=0” at your terminal when the command is finished and you will see the following output.
Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (9)

Always do deployment checks.

golinuxcloud@ubuntu:~$ kolla-ansible -i /etc/kolla/all-in-one prechecks

You would get the same output like bootstraping if everything’s goes without any errors.

(Video) Deploy latest multinode openstack using Kolla-ansible on centos7/ubuntu tutorial - 3

In the last step we will perform deployment.

golinuxcloud@ubuntu:~$ kolla-ansible -i /etc/kolla/all-in-one deploy

Now install the Openstack client and its dependencies using pip.

(golinux) golinuxcloud@ubuntu:/$ pip install python-openstackclient

Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (10)

Step-10: Post Deployment

Now createadmin-openrcfile that basically contains admin credentials.

(golinux) golinuxcloud@ubuntu:/etc/kolla$ kolla-ansible post-deploy /etc/kolla/

Now in the next step we will run the deployment.

(golinux) golinuxcloud@ubuntu:~$ source /etc/kolla/

Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (11)

(golinux) golinuxcloud@ubuntu:~$ cd /home/golinuxcloud/golinux/share/kolla-ansible

The initialization script will create virtual machine resources such as cirros image, network, subnet, routing, security group, specification, quota, etc.

(golinux) golinuxcloud@ubuntu:~/golinux/share/kolla-ansible$ ./init-runonce

Mange your Openstack using the Graphical User Interface.

ALSO READ: How to configure HAProxy in Openstack (High Availability)

Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (12)

Use Openstack client commands list different images, host and services. You can do a lot of things with Openstack client.

Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (13)

Deploy Openstack using Kolla Ansible [Step-by-Step] | GoLinuxCloud (14)


This method of deployment of Openstack using Kolla Ansible is easiest way of using cloud services and you can learn a lot. I hope my article was helpful to you in understanding the Openstack deployment on Ubuntu 20.04 using Kolla Ansible. Let me know how I can improve more to help you on cloud services.

What’s Next

How to Install TripleO Undercloud (Openstack) on RHEL 7
How to Configure Tripleo Undercloud to deploy Overcloud in OpenStack



Openstacl CLI List
Operating Kolla

Further Reading

You can use the above references to get understanding of Openstack commands and other services that are running in the Openstack.

(Video) A Universe from Nothing: Containerised OpenStack deployment using Kolla, Ansible and Kayobe


1. Deploy latest multinode openstack using Kolla-ansible on centos7/ubuntu tutorial - 2
2. Openstack Horizon Dashboard ‑ (Deployed by Kolla-Ansible)
3. Install OpenStack Rocky in your laptop using kolla-ansible
(Yemen Linux)
4. Deploying & Operating your OpenStack Cloud with Ansible
(Rackspace Technology)
5. KTOS 120 Kolla Multi-node Deployment Tutorial - OpenStack Ocata
(Kumulus Technologies)
6. Deploying OpenStack with Ansible
(Open Infrastructure Foundation)
Top Articles
Latest Posts
Article information

Author: Tuan Roob DDS

Last Updated: 16/06/2023

Views: 6530

Rating: 4.1 / 5 (42 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Tuan Roob DDS

Birthday: 1999-11-20

Address: Suite 592 642 Pfannerstill Island, South Keila, LA 74970-3076

Phone: +9617721773649

Job: Marketing Producer

Hobby: Skydiving, Flag Football, Knitting, Running, Lego building, Hunting, Juggling

Introduction: My name is Tuan Roob DDS, I am a friendly, good, energetic, faithful, fantastic, gentle, enchanting person who loves writing and wants to share my knowledge and understanding with you.