Juju Charm - Glance Simplestreams Sync
Go to file
James Page c749054e03 Fix compatibility with Jinja2 >= 2.10
The indentfirst parameter of the indent helper was renamed
to first at Jinja2 2.10 - update template to follow this
change.

Change-Id: I4299a72646a602720689b4f3c3075de8c21b0811
2022-05-23 14:23:13 +01:00
actions Switch to using snap for simplestreams tools 2020-06-18 08:50:02 +01:00
charmhelpers Updates to enable jammy and finalise charmcraft builds 2022-04-11 11:33:05 +01:00
files Fix the trailing-slash issue on for product-streams endpoint 2022-04-11 18:57:17 +01:00
hooks Add support for juju resources 2021-10-05 06:04:44 +00:00
lib Update tox, requirements, add initial func tests framework 2018-04-06 22:06:49 +00:00
templates Fix compatibility with Jinja2 >= 2.10 2022-05-23 14:23:13 +01:00
tests Update to classic charms to build using charmcraft in CI 2022-02-17 12:30:08 -05:00
unit_tests Use unittest.mock instead of mock 2021-12-15 10:22:52 +00:00
.gitignore Update to classic charms to build using charmcraft in CI 2022-02-17 12:30:08 -05:00
.gitreview OpenDev Migration Patch 2019-04-19 19:40:14 +00:00
.stestr.conf Replace ostestr with stestr in testing framework. 2019-03-07 17:11:21 -05:00
.zuul.yaml Updates to enable jammy and finalise charmcraft builds 2022-04-11 11:33:05 +01:00
HACKING.md Add doc pointing contributors to charm-guide 2019-07-16 09:42:57 +02:00
LICENSE Relicense to Apache2 2018-05-08 12:30:29 -05:00
Makefile Migrate from Amulet to Zaza 2019-09-12 22:41:32 +12:00
README.md Add support for juju resources 2021-10-05 06:04:44 +00:00
actions.yaml Switch to using snap for simplestreams tools 2020-06-18 08:50:02 +01:00
build-requirements.txt Update to classic charms to build using charmcraft in CI 2022-02-17 12:30:08 -05:00
charm-helpers-hooks.yaml Updates to enable jammy and finalise charmcraft builds 2022-04-11 11:33:05 +01:00
charmcraft.yaml Updates to enable jammy and finalise charmcraft builds 2022-04-11 11:33:05 +01:00
config.yaml Add use-internal-endpoints as a new config option 2021-09-02 11:03:32 -07:00
copyright Update copyright date 2018-05-08 12:37:36 -05:00
metadata.yaml Updates to enable jammy and finalise charmcraft builds 2022-04-11 11:33:05 +01:00
osci.yaml Updates to enable jammy and finalise charmcraft builds 2022-04-11 11:33:05 +01:00
pip.sh Add xena bundles 2021-09-23 10:50:27 +01:00
rename.sh Update to classic charms to build using charmcraft in CI 2022-02-17 12:30:08 -05:00
requirements.txt Updates to enable jammy and finalise charmcraft builds 2022-04-11 11:33:05 +01:00
setup.cfg Initial baseline from bzr 2017-04-10 09:00:27 +01:00
test-requirements.txt Use unittest.mock instead of mock 2021-12-15 10:22:52 +00:00
tox.ini Updates to enable jammy and finalise charmcraft builds 2022-04-11 11:33:05 +01:00

README.md

Overview

The glance-simplestreams-sync charm keeps OpenStack cloud images (in Glance) synchronised with the latest available images from a Simplestreams mirror(s). It uses Cron to do this.

The charm places simplestreams metadata in Object storage for future use by Juju. It then publishes the URL for that metadata as the endpoints of a new OpenStack service called 'product-streams'.

The charm installs Simplestreams from a snap.

Usage

Configuration

This section covers common and/or important configuration options. See file config.yaml for the full list of options, along with their descriptions and default values. See the Juju documentation for details on configuring applications.

run

The run option enables the synchronisation cron script. This option accepts Boolean values ('true' or 'false') with the default value being 'false'. Changing the value from 'false' to 'true' will immediately schedule an image sync.

Note: Enabling this option at cloud deploy time may cause a race condition with the set up of a possible storage backend for Glance.

frequency

The frequency option controls how often the sync cron job is run. It is used to link the cron script into /etc/cron.<frequency>. Valid string values are: 'hourly', 'daily', and 'weekly'. The default is 'daily'.

region

The region option states the OpenStack region to operate in. The default value is 'RegionOne'.

mirror_list

The mirror_list option is a YAML-formatted list of Simplestreams mirrors and their configuration properties. The default behaviour is to download images from https://cloud-images.ubuntu.com.

ssl_ca

The ssl_ca option verifies (optionally) the certificates when in SSL mode for Keystone and Glance. This should be provided as a base64 encoded PEM certificate.

Deployment

To deploy to an existing OpenStack cloud (that already includes Glance, Object storage, and Keystone):

juju deploy glance-simplestreams-sync
juju add-relation glance-simplestreams-sync:identity-service keystone:identity-service

Note: Charmed OpenStack commonly employs Ceph-backed Object storage (see the ceph-radosgw charm). Otherwise, a vanilla Swift-based solution can be used (see the swift-proxy charm).

Actions

Juju actions allow specific operations to be performed on a per-unit basis. This charm supports the single action sync-images, which allows for a one-time image sync from the currently configured mirror list.

Juju resources

The charm support juju resources, which is handy in offline deployments. Prefetch the snaps:

snap download --channel=stable simplestreams

Provide downloaded snaps as resources to the application:

juju deploy cs:glance-simplestreams-sync --resource simplestreams=simplestreams_27.snap

Bugs

Please report bugs on Launchpad.

For general charm questions refer to the OpenStack Charm Guide.