Our Private Cloud Core deployments provide workload orchestration through the use of kolla-ansible which deploys OpenStack services and infrastructure components in Docker containers. Should you want to make a change to an OpenStack service’s configuration or add a new OpenStack service, you will need to use kolla-ansible. Read along to learn how to reconfigure your OpenStack cloud using kolla-ansible. This guide introduces you to the basics of using kolla-ansible and links to examples of what can be done using it.
Please note! — You should have an understanding of how both Docker and Ansible work before working with kolla-ansible. Making changes using kolla-ansible can potentially cause degradation of services or the cloud to be inoperable. Be careful!
To start using kolla-ansible, an environment needs to be created. This section explains the steps needed to create that environment.
To get a quick idea of what is required, here is a high-level overview of the steps:
# Copy kolla-ansible configuration from fm-deploy docker container $ docker cp fm-deploy:/opt/kolla-ansible /opt/kolla-ansible # Navigate to /opt/kolla-ansible $ cd /opt/kolla-ansible # Initialize a Python virtual environment $ virtualenv .venv # Activate the virtual environment $ source .venv/bin/activate # Update pip pip install --upgrade pip # Install kolla-ansible using requirements.txt $ pip install -r requirements.txt
Once prepared, make the needed changes and perform the kolla-ansible run:
# Reconfigures kolla-ansible using specified inventory file $ kolla-ansible -i /etc/fm-deploy/kolla-ansible-inventory reconfigure
These steps are explained in more detail below.
Prepare and use kolla-ansible
Follow these steps to learn how to prepare and use kolla-ansible.
- Globals file:
- Inventory file:
Note! — The above files may not be present on each host. Inspect each host until you find the above, and perform the kolla-ansible run from this host.
Before Making Changes
Before any changes are made to the kolla-ansible configuration, the following
globals.yml should not be modified, otherwise they will be
Step 1 – Prepare environment
From the Docker container called
the local file system:
$ docker cp fm-deploy:/opt/kolla-ansible /opt/kolla-ansible
Step 2 — Prepare Python virtual environment
Create a Python virtual environment from which
kolla-ansible will be used:
$ cd /opt/kolla-ansible $ virtualenv .venv $ source .venv/bin/activate
Step 3 — Update pip
If pip is not up to date, packages may not install.
Pip can be updated using:
pip install --upgrade pip
Step 4 — Install kolla-ansible using
requirements.txt file is used to install kolla-ansible. The release of
OpenStack your cloud is running will determine the version of kolla-ansible to
install. This means you need to inspect
requirements.txt and ensure the
right version of kolla-ansible is installed.
At the time of writing this guide, the OpenStack release used in Private Cloud Core is Victoria.
To determine the release your cloud is using, as root from a hardware node,
docker ps to get a list of all Docker containers running. In that
output is shown each OpenStack service’s image, appended with the OpenStack
$ docker ps cf9e23cef540 harbor.imhadmin.net/kolla/centos-binary-mariadb-clustercheck:victoria "dumb-init --single-â€¦" 8 days ago Up 8 days mariadb_clustercheck c19964a28b4e harbor.imhadmin.net/kolla/centos-binary-mariadb-server:victoria "dumb-init -- kolla_â€¦" 8 days ago Up 8 days mariadb
In this output, the second column represents a kolla-ansible image and there are two entries. The output has been truncated and you should see many more Docker containers running than two. At the end of the image name the version of OpenStack for which that image is built can be seen following the colon:
The above indicates this OpenStack cloud is on the Victoria release.
Next, in a text editor load
requirements.txt and uncomment the appropriate
version for kolla-ansible.
The contents of this file appears this way:
ansible>=2.9,<2.10,!=2.9.10 # Use one of the following supported OpenStack versions: #git+https://github.com/openstack/kolla-ansible@stable/train #git+https://github.com/openstack/kolla-ansible@stable/ussuri #git+https://github.com/openstack/kolla-ansible@stable/victoria
For the purpose of this demonstration, the OpenStack release is Victoria, so
within this file needs to be uncommented, or, in other words, remove the
The file should now appear this way:
ansible>=2.9,<2.10,!=2.9.10 # Use one of the following supported OpenStack versions: #git+https://github.com/openstack/kolla-ansible@stable/train #git+https://github.com/openstack/kolla-ansible@stable/ussuri git+https://github.com/openstack/kolla-ansible@stable/victoria
requirements.txt is prepared and can be used to install
(.venv) $ pip install -r requirements.txt
Step 5 — Make needed adjustments
Typically at this stage you need to adjust the appropriate file to enable or disable a service, such as central logging for example. As an example, this section demonstrates enabling central logging.
To enable central logging, pull up
/etc/kolla/globals.yml in a text editor,
Step 6 — Perform the kolla-ansible reconfigure run
The base kolla-ansible command takes this form:
kolla-ansible -i $INVENTORY <command>
$INVENTORY— This is
<command>— In this guide,
reconfigurewill be used.
Perform the kolla-ansible run:
$ kolla-ansible -i /etc/fm-deploy/kolla-ansible-inventory reconfigure
This concludes the steps needed to have a base understanding of how to use kolla-ansible.
The following guides go into detail about specific things you can configure using kolla-ansible, such enabling TLS for Horizon or enabling Central Logging: