Qinling, an installation with Kolla!

Gaëtan Trellu
3 min readJun 5, 2019

--

In my previous post about Qinling I explained how to run a packaged function, how to pass argument to the function and how to get the output. If you followed the series then you should now be pretty familiar with the Qinling concepts.

In this post I will go through the steps to deploy and configure Qinling with one of the OpenStack deployment tool which will be (drum rolls)… Kolla. Qinling just got merged within Kolla[1] and Kolla Ansible[2].

I assume that you already have some experiences with Kolla (even if I cover the basics) and that you already deployed the core such as RabbitMQ, MariaDB, memcached, keepalived, HAproxy and Keystone (at least).

The connection between Qinling and Kubernetes has already been discussed in the first post related to the journey so don’t expect to see information about this here.

Always Coca-Kolla (la la la)!

First of all, what is Kolla and what is the purpose of it? Quote from the official documentation.

Kolla provides Docker containers and Ansible playbooks to meet Kolla’s mission. Kolla’s mission is to provide production-ready containers and deployment tools for operating OpenStack clouds.

To achieve the deployment we have to go through three major steps:

  1. Install the Kolla requirements (Docker and Python must be installed before)
  2. Build the Docker images, etcd, qinling-api and qinling-engine
  3. Deploy and configure Qinling containers (nothing to do with etcd)

Let’s install it, pip cannot be used to install kolla and kolla-ansible (there is no tag on PyPi related to the Train release yet), git will our sexy friend.

$ sudo mkdir -p /etc/kolla/config/qinling/qinling-engine
$ mkdir -p ~/git && cd ~/gi
$ virtualenv ~/.venv
$ source ~/.venv/bin/activate
$ git clone https://github.com/openstack/kolla.git
$ git clone https://github.com/openstack/kolla-ansible.git
$ pip install -U pip ansible docker
$ pip install -r kolla/requirements.txt
$ pip install -r kolla-ansible/requirements.txt
$ sudo cp -r ~/git/kolla-ansible/etc/kolla/* /etc/kolla
$ sudo cp -r ~/git/kolla-ansible/ansible/inventory/* /etc/kolla

From there we are ready to start the second step, build the Docker Qinling and etcd images.

$ cd ~/git/kolla
$ ./tools/build.py --type source --base ubuntu --base-arch x86_64 --nocache --use-dumb-init --threads 4 qinling etcd

After few minutes if the build is successful then you should see something like that in the screen output:

INFO:kolla.common.utils:=========================
INFO:kolla.common.utils:Successfully built images
INFO:kolla.common.utils:=========================
INFO:kolla.common.utils:base
INFO:kolla.common.utils:etcd
INFO:kolla.common.utils:openstack-base
INFO:kolla.common.utils:qinling-api
INFO:kolla.common.utils:qinling-base
INFO:kolla.common.utils:qinling-engine

Try to run docker images, few images should have been created. These images have not been pushed to any Docker Registry, they are local to where you ran the build command.

Let’s go to step three, Qinling deployment and configuration, before running the commands below make sure you understand them. For example replace 200.100.50.25:6443 by your Kubernetes cluster address.

$ sudo cp ~/k8s/certs/* /etc/kolla/config/qinling/qinling-engine
$ sudo bash -c 'cat << EOF > /etc/kolla/config/qinling/qinling-engine.conf
[kubernetes]
kube_host = https://200.100.50.25:6443
ssl_ca_cert = /etc/qinling/pki/kubernetes/ca.crt
cert_file = /etc/qinling/pki/kubernetes/qinling.crt
key_file = /etc/qinling/pki/kubernetes/qinling.key
EOF'
$ cd ~/git/kolla-ansible
$ ./tools/generate_passwords.py
$ ./tool/kolla-ansible deploy -i /etc/kolla/multinode --forks 4 -e enable_qinling=yes -e enable_etcd=yes -e qinling_kubernetes_certificates=yes -t qinling,etcd

The kolla-ansible command will deploy and configure Qinling and etcd, Qinling will be configured with an external Kubernetes cluster. As for step two, if you run docker ps -a you should few new containers.

The last action will be to install the Qinling CLI and test if the API is working/responding as expected.

$ pip install python-qinlingclient
$ . /etc/kolla/admin-openrc.sh
$ openstack runtime list
$ openstack function list

Conclusion

In this post I covered the Docker build images, the deployment and configuration of Qinling via Kolla.

Qinling will be officially available in Kolla for the OpenStack Train cycle (and of course it’s already in master).

As mentioned in the first post, having Qinling integrated to Kolla should help the project adoption, people will don’t have anymore excuses to not try it (except if they don’t use Kolla ^^).

Resources

--

--