THIS POST HAS BEEN SUPERCEDED BY A NEW POST ON KOLLA-ANSIBLE DEPLOYMENT
OpenStack Kolla?
What is OpenStack Kolla?
This project was started back in the Liberty release of OpenStack that “provides production-ready containers and deployment tools for operating OpenStack clouds that are scalable, fast, reliable, and upgradable using community best practices” [The Kolla project’s own definition].
There is a sub-project called kolla-ansible
that deploys the Kolla container images using Ansible.
FlashArray Support
At the time of writing [Yoga release], Kolla does not include upstream support for the Pure Storage FlashArray as a Cinder backend.
[There is a patch in place to amend this and hopefully, this will be included in the upcoming Zed release]
So how do you configure a FlashArray as a Cinder backend in your Kolla deployment of OpenStack?
As part of the kolla-ansible
project there is the ability to add additional configuration options into your OpenStack deployment. Additionally, this is also the way to override any configuration settings, which we do need to do…
The Pure FlashArray configuration for Cinder requires a new stanza be added to the cinder.conf
file created by the Kolla deployment, defining the FlsashArray backend, and also to update the [DEFAULT]
stanza with information about the new FlashArray stanza.
The steps to add the new backend are pretty simple:
- Go to the directory
/etc/kolla/config/
and create a file calledcinder.conf
, assuming it doesn’t already exist. - Update this file with the following information
[DEFAULT]
enabled_backends = pure_backend
default_volume_type = pure-volume
[pure_backend]
volume_driver = cinder.volume.drivers.pure.PureISCSIDriver
san_ip = <FlashArray Management VIP>
pure_api_token = <FlashArray API Token>
volume_backend_name = pure_backend - These are the minimum parameters required to configure a FlashArray as a Cinder backend, but there are a number of other useful parameters that you may wish to use, such as:
use_multipath_for_image_xfer
image_volume_cache_enabled
use_chap_auth
pure_eradicate_on_delete
pure_automatic_max_oversubscription
- If you have multiple Flasharray backends you can even configure Cinder replication. These and other features and parameters are detailed in the FlashArray driver OpenStack documentation.
- Deploy your OpenStack cloud.
Rebuilding your Image
So now you have configured Kolla to deploy Cinder with your FlashArray backend…
Well, not quite. The Pure Storage FlashArray driver has a pre-requisite of the purestorage
Python SDK module and this needs to be added to the cinder-volume
container that Kolla uses. This you have to do by creating a custom image and storing this in a local repo that Kolla will then pull the image from.
Kolla provide documentation on how to build custom container images, but in general the steps you need to take to install the purestorage
SDK module are:
- Make sure you have a local registry where you can store your custom image
- Ensure you have a machine with
docker-ce
, or equivalent, installed and running - Follow these commands to build your Kolla environment from the source code:
cd /
git clone https://opendev.org/openstack/kolla.git kollagit
cd kollagit
git checkout <your preferred branch or master>
python3 -m venv /kollagit
source /kollagit/bin/activate
pip install /kollagit/
pip install tox
cd /kollagoit/kolla
tox -e genconfig
cd /kollagit - Now we have to create a file to define the custom configuration, so lets create a file called
cinder-overrides.j2
that contains the following information:{% extends parent template %}
{% set cinder_base_packages_append = ['python3-pip'] %}
# cinder - add purestorage pip module
{% block cinder_base_footer %}
RUN python3 --version && pip3 --no-cache-dir install purestorage
{% endblock %} - Now we rebuild the
cinder-volume
image with the following command:kolla-build --template-override cinder-overrides.j2 --base centos --base-tag 8 --registry <your local registry> --push --tag <your personal tag>
- I should note that it is advisable to have the
tag
be thekolla-ansible
release number
- I should note that it is advisable to have the
- Finally we need to tell Kolla to use your new custom
cinder-volume
image when deploying OpenStack and this is done by modifying the/etc/kolla/globals.yml
file to contain the following line:cinder_volume_image_full: <your local registry>/kolla/centos-binary-cinder-volume:<your personal tag>-centos8
- Redeploy your OpenStack cloud.
If all is well then your Kolla deployment will now use your customized cinder-volume
image wit the purestorage
module installed and with your FlashArray backend configured within Cinder.