Wednesday, August 10, 2022

Adventures of a Small Time OpenStack Sysadmin Chapter 043 - Zun and Kuryr Container Services

Adventures of a Small Time OpenStack Sysadmin relate the experience of converting a small VMware cluster into two small OpenStack clusters, and the adventures and friends I made along the way.

Adventures of a Small Time OpenStack Sysadmin Chapter 043 - Zun and Kuryr Container Services

First, links to some reference docs I used:

Zun Docs Page

https://docs.openstack.org/zun/yoga/

Zun Launchpad Bugs Page

https://bugs.launchpad.net/zun

Kolla-Ansible Deployment Configuration Reference for Zun

https://docs.openstack.org/kolla-ansible/yoga/reference/compute/zun-guide.html

Kolla-Ansible Deployment Configuration Reference for Kuryr

https://docs.openstack.org/kolla-ansible/yoga/reference/containers/kuryr-guide.html

Main Zun Repository

https://opendev.org/openstack/zun

Installation

In /etc/kolla/globals.d/zun.yml I needed to add:

enable_zun: "yes"
enable_kuryr: "yes"
enable_etcd: "yes"
docker_configure_for_zun: "yes"
containerd_configure_for_zun: "yes"

As seen here:

The Kolla-Ansible install itself was surprisingly uneventful.  I had to kolla-ansible bootstrap-servers before running a kolla-ansible deploy to make the necessary network changes.

Installing the Python support in the CLI for Zun

Run:

pip install python-zunclient -c https://releases.openstack.org/constraints/upper/yoga

As seen here:

https://gitlab.com/SpringCitySolutionsLLC/openstack-scripts/-/blob/master/installcli/installcli.sh

Note that the docs for "openstack appcontainer cp" and "zun cp" are technically correct although in my opinion they mislead sysadmins into thinking that a Zun CP uses "scp" syntax (which will not work).  See openstack-scripts/demos/zun/pingtest/read-file.sh and save-file.sh.  I would summarize the issue to "when doing a zun cp, the source is always one specific file and the destination is always a directory".  Or just remember that the CLI looks like scp syntax, but it isn't scp.

I am looking into the detailed instructions at:

https://docs.openstack.org/contributors/code-and-documentation/index.html

such that I can submit a documentation fix as per the above for: 

https://docs.openstack.org/python-openstackclient/yoga/cli/plugin-commands/zun.html

Demo

See openstack-scripts/demos/zun/pingtest at:

https://gitlab.com/SpringCitySolutionsLLC/openstack-scripts/-/tree/master/demos/zun/pingtest

Its pretty simple to use.  Early on I was storing Docker images in Glance which scales well to large numbers of identical images, although I later stopped using Glance.

Another difference between the demo and my production containers is the demo uses the CLI exclusively whereas my production images use HEAT orchestration templates exclusively.

There's a good example of a Zun HEAT template at:

https://opendev.org/openstack/heat-templates/src/branch/master/hot/zun/webapp.yaml

A typical real world Heat template orchestrated Zun container deployment can be seen here:

https://gitlab.com/SpringCitySolutionsLLC/openstack-scripts/-/tree/master/projects/iot/nodered

This runs Node-RED very well indeed...

Overall I was pleasantly surprised how well Zun works at hosting container workloads.

Tomorrow, Designate DNS service.

Stay tuned for the next chapter!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.