glance simplestreams sync

  • By hopem
  • Latest version (#0)
  • trusty, xenial, bionic, cosmic
  • Stable


Automatically keep your glance mirror in sync with any (multiple) source(s)
of simplestreams data.

Known Issues


This charm provides a service that syncs your OpenStack cloud's
available OS images in OpenStack Glance with the available images from
a set of simplestreams mirrors, by default using

It will create a user named 'image-stream' in the 'services' tenant.
If swift is enabled, glance will store its images in swift using the
image-stream username.

It can optionally also store simplestreams metadata into Swift for
future use by juju. If enabled, it publishes the URL for that metadata
as the endpoints of a new OpenStack service called 'product-streams'.
If using Swift is not enabled, the product-streams service will still
exist, but nothing will respond to requests to its endpoints.

The charm installs a cron job that repeatedly checks the
status of related services and begins syncing image data from your
configured mirrors as soon as all services are in place.

It can be deployed at any time, and upon deploy (or changing the 'run'
config setting), it will attempt to contact keystone and glance and
start a sync every minute until a successful sync occurs.


This charm requires a relation to keystone. It also requires a
running glance instance, but not a direct relation to glance. It
connects to glance via its endpoint as published in keystone.


juju deploy glance-simplestreams-sync [--config optional-config.yaml]
juju add-relation keystone glance-simplestreams-sync


The charm has the following configuration variables:


run is a boolean that enables or disables the sync cron script. It
is True by default, and changing it from False to True will schedule
an immediate attempt to sync images.


use_swift is a boolean that determines whether or not to store data
in swift and publish the path to product metadata via the
'product-streams' endpoint.

NOTE Changing the value will only affect the next sync, and does not
currently remove an existing product-streams service or delete
potentially stale product data.


frequency is a string, and must be one of 'hourly', 'daily',
'weekly'. It controls how often the sync cron job is run - it is used
to link the script into /etc/cron.$frequency.


region is the OpenStack region in which the product-streams endpoint
will be created.


mirror_list is a yaml-formatted list of options to be passed to
Simplestreams. It defaults to settings for downloading images from, and is not yet tested with other mirror
locations. If you have set up your own Simplestreams mirror, you
should be able to set the necessary configuration values.


This is used, optionally, to verify the certificates when in ssl mode for
keystone and glance. This should be provided as a base64 encoded PEM


(string) A comma-separated list of nagios servicegroups. If left empty, the nagios_context will be used as the servicegroup
(boolean) Should the sync be running or not?
(string) Optional configuration to support use of additional sources such as: - ppa:myteam/ppa - cloud:trusty-proposed/kilo - main The last option should be used in conjunction with the key configuration option.
(string) Openstack region to operate in.
(string) Used by the nrpe-external-master subordinate charm. A string that will be prepended to instance name to set the host name in nagios. So for instance the hostname would be something like: juju-myservice-0 If you're running multiple environments with the same services in them this allows you to differentiate between them.
(string) RabbitMQ virtual host to request access on rabbitmq-server.
(boolean) Enable configuration of hypervisor-type on synced images. . This is useful in multi-hypervisor clouds supporting both LXD and KVM.
(string) base64-encoded SSL CA to use to verify certificates from keystone and glance if using SSL on the services.
(string) Cloud name to be used in simplestreams index file
(string) cron job frequency - one of ['hourly', 'daily', 'weekly']
(string) User agent to use when requesting images from image servers listed in the mirror_list.
(string) Key ID to import to the apt keyring to support use with arbitary source configuration from outside of Launchpad archives or PPA's.
(string) Username to request access on rabbitmq-server.
(string) A Python-style .format() template to use when generating content_id properties for images uploaded to glance. The content_id is considered when matching images between the source and destination to decide which images to mirror. By varying this value you can mirror disjoint sets of images from the same source into a single glance, either by using multiple deployments of this charm, or by using a tool such as sstream-mirror-glance, and they will not interfere with each other. Here is a more interesting example value: com.example.customstack.{region}:ubuntu:celery-worker Currently the only available substitution is "region". Any other attempted substitutions will break the sync script.
(string) This is prefixed to the object name when uploading to glance.
(boolean) Should the charm set up the product-streams endpoint with swift's URLs?
(string) YAML-formatted list of simplestreams mirrors and their configuration properties. Defaults to downloading the released images from
[{url: '', name_prefix: 'ubuntu:released', path: 'streams/v1/index.sjson', max: 1, item_filters: ['release~(trusty|xenial|bionic)', 'arch~(x86_64|amd64)', 'ftype~(disk1.img|disk.img)']}]