Thursday, August 4, 2022

Adventures of a Small Time OpenStack Sysadmin Chapter 037 - Glance Image Service

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 037 - Glance Image Service

First, links to some reference docs I used:

Main Documentation Page

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

Projects Deployment Configuration Reference for Glance

https://docs.openstack.org/kolla-ansible/yoga/reference/shared-services/glance-guide.html

Common Image Properties

https://docs.openstack.org/glance/yoga/user/common-image-properties.html

Useful Image Properties

https://docs.openstack.org/glance/yoga/admin/useful-image-properties.html

Common Image Properties are props you probably use on most images.  The Useful Image Properties should be retitled "Reference List of Properties" and you will occasionally need to review it in unusual circumstances or to prep for trivia contests.

Glance Client Tools

https://docs.openstack.org/glance/yoga/user/glanceclient.html

CLI reference

https://docs.openstack.org/python-openstackclient/yoga/cli/command-objects/image-v2.html

You can get pretty far with Glance, just by reviewing the PDCR, which is the second link above.  I implemented the Swift backend option and did not implement the cache, property protection, or interop options.

Globals.d config

My /etc/kolla/globals.d/glance.yml looks like this:

# /etc/kolla/globals.d/glance.yml
#
# On OS6 for cluster 2
#
---

enable_glance: "yes"

glance_backend_file: "no"

glance_backend_swift: "yes"

#

As you can see at this link into the openstack-scripts repo:

https://gitlab.com/SpringCitySolutionsLLC/openstack-scripts/-/blob/master/backups/os6.cedar.mulhollon.com/globals.d/glance.yml

CLI

I think by default, because Glance is a fundamental part of the CLI, the glance-specific addon library for the CLI is always automatically loaded.  None the less you can see how in my installcli.sh script how to manually install or upgrade it on Ubuntu if you want, and it doesn't hurt to repeat this to verify you have the latest version:

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

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

glance-loader repo

You will need something to load images into glance in a repeatable, at least semi-secure, documented manner.  So I created this Gitlab repo full of helpful scripts for various open source operating systems:

https://gitlab.com/SpringCitySolutionsLLC/glance-loader

A trivial demonstration script for Glance

After you've loaded a couple OS images into Glance, perhaps a couple versions of the Cirros demonstration system, you could try the demo script as linked to here:

https://gitlab.com/SpringCitySolutionsLLC/openstack-scripts/-/blob/master/demos/glance/cirros.sh

This is a pretty simple three line script demonstrating the openstack-cli and some grep and sort commands to list all the cirros operating system images sorted by version number, newest first.

Glance is a great way to troubleshoot MTU problems on Swift

I found Glance easy to use and trouble free. The only problem I've ever experienced adjacent to Glance but not actually Glance's fault, was if you have a MTU mismatch on your Swift object storage VLAN, then loading images into Glance is probably the first time you'll stress the network out and cause the usual MTU mismatch weirdness (slowdowns, complete stalls, ultra low performance if it works at all, lots of dropped packets on the stat counters, the usual)

Tomorrow, the adventure of Barbican.

Stay tuned for the next chapter!

No comments:

Post a Comment

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