Cloud Computing 14 min read

Step-by-Step Guide to Deploying an OpenStack Cloud with Kolla (All‑in‑One)

This article walks you through building an OpenStack Stein cloud on a single host using Kolla, covering environment preparation, Docker and Ansible setup, configuration files, password generation, deployment commands, and final login verification, all with detailed code snippets and images.

Open Source Linux
Open Source Linux
Open Source Linux
Step-by-Step Guide to Deploying an OpenStack Cloud with Kolla (All‑in‑One)

1 Introduction

We set up an OpenStack cloud platform for a friend using the Kolla project to deploy the Stein release.

Kolla automates OpenStack deployment with Docker and Ansible; Docker handles image building and container management, while Ansible manages environment provisioning.

2 Experiment Environment

Because of limited laptop resources, we use an all‑in‑one mode where all services run on a single host.

Mastering the all‑in‑one deployment makes multi‑node setups much easier.

2.1 System Preparation

2.2 Logical Topology Diagram

3 Deployment Steps

3.1 Linux System Configuration

Configure host network interfaces

Disable firewalld, SELinux and libvirtd services

[root@qll251 ~]# systemctl stop firewalld
[root@qll251 ~]# systemctl disable firewalld

[root@qll251 ~]# vim /etc/selinux/config
# change SELINUX=enforcing to SELINUX=disabled

[root@qll251 ~]# systemctl stop libvirtd.service
[root@qll251 ~]# systemctl disable libvirtd.service

[root@qll251 ~]# reboot # apply changes

Install EPEL repository yum -y install epel-release Install common CentOS utilities

yum install -y vim net-tools bash-completion-extras git
Question: What does the bash-completion-extras package provide?

Set hostname and /etc/hosts

[root@qll251 ~]# hostname qll251
[root@qll251 ~]# echo "qll251" > /etc/hostname
[root@qll251 ~]# echo "192.168.1.251  qll251" >> /etc/hosts

Synchronize time

[root@qll251 ~]# yum -y install ntp
[root@qll251 ~]# systemctl start ntpd
[root@qll251 ~]# systemctl enable ntpd

Configure pip mirror for faster Python package downloads

[root@qll251 ~]# mkdir ~/.pip
[root@qll251 ~]# vim ~/.pip/pip.conf
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com

3.2 Install Base Packages and Docker

Install development tools

yum -y install python-devel libffi-devel gcc openssl-devel python-pip

Upgrade pip to avoid later warnings

Install Docker CE

Install dependencies

yum -y install yum-utils device-mapper-persistent-data lvm2

Add Docker CE repository

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

Install Docker CE yum -y install docker-ce Start Docker service

systemctl start docker
systemctl enable docker

Configure Docker image registry mirror

[root@qll251 ~]# vim /etc/docker/daemon.json
# add:
{
  "registry-mirrors": ["https://0i6rnnzu.mirror.aliyuncs.com"]
}

This mirror address was obtained from Alibaba Cloud and can be used directly.

Set Docker volume mount mode

[root@qll251 ~]# mkdir /etc/systemd/system/docker.service.d
[root@qll251 ~]# vim /etc/systemd/system/docker.service.d/kolla.conf
# add:
[Service]
MountFlags=shared
MountFlags=shared allows Docker to recognize new host partitions without restarting, which is convenient when using Cinder storage later.

Reload systemd and restart Docker

systemctl daemon-reload
systemctl restart docker
systemctl enable docker

3.3 Get Kolla and Kolla‑Ansible from GitHub

Install Ansible yum -y install ansible Clone the repositories

git clone https://github.com/openstack/kolla -b stable/stein
git clone https://github.com/openstack/kolla-ansible -b stable/stein
# If images already exist, only the second step is needed

Manually install kolla‑ansible python ~/kolla-ansible/setup.py install Install kolla‑ansible dependencies

[root@qll251 ~]# pip install -r /root/kolla-ansible/requirements.txt

If the above fails, force‑install the required package:

[root@qll251 ~]# pip install --ignore-installed PyYAML

Install Kolla dependencies

[root@qll251 ~]# pip install -r /root/kolla/requirements.txt

If you encounter version conflicts (e.g., requests 2.20.0 requires idna<2.8,>=2.5), force‑upgrade:

[root@qll251 ~]# pip install --ignore-installed requests

Copy configuration files

[root@qll251 ~]# cd ~/kolla-ansible/
[root@qll251 kolla-ansible]# cp -r ./etc/kolla/* /etc/kolla/
[root@qll251 kolla-ansible]# cp ./ansible/inventory/* /etc/kolla/
# List copied files
[root@qll251 ~]# ls /etc/kolla/
all-in-one  globals.yml  multinode  passwords.yml

Explanation of the files:

all-in-one : Ansible playbook for single‑node OpenStack deployment

multinode : Playbook for multi‑node deployment

globals.yml : Custom OpenStack configuration

passwords.yml : Service passwords

Generate random passwords

[root@qll251 ~]# kolla-genpwd
Kolla’s password generator creates passwords for all OpenStack services; missing passwords will cause later checks to fail.

Modify the generated passwords file

[root@qll251 ~]# vim /etc/kolla/passwords.yml
# For easier Dashboard login, change the admin password to 123123
keystone_admin_password: 123123

Edit globals.yml to match the environment

[root@qll251 ~]# vim /etc/kolla/globals.yml
kolla_base_distro: "centos"
kolla_install_type: "binary"
openstack_release: "stein"
# All‑in‑one mode, no HA; set host IP
kolla_internal_vip_address: "192.168.1.251"
network_interface: "eth0"
neutron_external_interface: "eth1"
enable_haproxy: "no"

3.4 Deploy OpenStack

Generate SSH key and authorize the node

ssh-keygen
ssh-copy-id [email protected]

Adjust the all‑in‑one inventory file

[root@qll251 ~]# vim /etc/kolla/all-in-one
# Replace all occurrences of localhost with qll251
:1,$s/localhost/qll251/
# Remove lines containing ansible_connection=local
:1,$s/ansible_connection=local//
This step is optional for single‑node deployment, but we walk through it for completeness.

Bootstrap the Kolla server

[root@qll251 ~]# kolla-ansible -i /etc/kolla/all-in-one bootstrap-servers

Result screenshot omitted for brevity.

Run pre‑deployment checks

[root@qll251 ~]# kolla-ansible -i /etc/kolla/all-in-one prechecks

If this succeeds, the rest of the deployment should proceed without major issues.

Congratulations if you reach this point!

Pull OpenStack Docker images

[root@qll251 ~]# kolla-ansible -i /etc/kolla/all-in-one pull

Images are downloaded from the official repositories.

Deploy OpenStack kolla-ansible -i /etc/kolla/all-in-one deploy Post‑deployment verification

kolla-ansible -i /etc/kolla/all-in-one post-deploy
If the command finishes successfully, the OpenStack environment is ready.

The admin credentials are stored in /etc/kolla/admin-openrc.sh and look like this:

4 Access the OpenStack Dashboard

Open a browser and navigate to http://192.168.1.251.

Username: admin

Password: 123123 (change this in production environments).

The password was set in passwords.yml ; using a simple password is only for demonstration.

Deployment is complete; the next article will cover basic OpenStack usage and creating a test VM via the CLI.

5 Final Remarks

Even though the deployment went smoothly for us, you may encounter errors; careful attention to configuration details (extra spaces, mixed character sets, etc.) is essential.
Most errors are caused by small oversights; with patience and diligence you can successfully deploy OpenStack.
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DockerLinuxcloud deploymentOpenStackAnsibleKollaAll-in-One
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.