Kyle Pericak

"It works in my environment."

Mon 26 August 2019

Modifying OpenStack Kolla Docker Images

Posted by Kyle Pericak in cloud   

This post is linked to from the OpenStack Deep Dive Project


OpenStack Cinder needs some special software installed to work with certain storage backends.

Kolla builds Docker containers for OpenStack.

This post documents the steps to customize how Kolla builds containers. In particular, these steps add the Pure Storage plugin to the Cinder-Volume service's Docker image.


Install Kolla

This example uses the Rocky checkout to make Rocky based images. Use the stable branch matching your OpenStack version else things get weird.

apt-get install -y git python python-pip
git clone https://github.com/openstack/kolla.git
get checkout stable/rocky
cd kolla
pip install .

Configure Kolla

Use tox's genconfig envlist to generate a commented config file:

tox -e genconfig
mkdir -p /etc/kolla
mv etc/kolla/kolla-build.conf /etc/kolla/

Then make any changes to the new config file as needed.


Add the Modifications

Here's an example of adding the Pure Storage's plugin to the cinder_volume image.

vi /etc/kolla/template-overrides.j2

{% extends parent_template %}

# Cinder Volume
{% block cinder_volume_ubuntu_setup %}
RUN pip install purestorage
{% endblock %}

Build the Image w/ Modifications

kolla-build \
  --tag rocky-test-20190826-01 \
  --template-override /etc/kolla/template-overrides.j2  \
  cinder-volume

That's it. You can now use this image with the included plugin.


Javascript appears to be disabled. Comments can't load.