Commit Graph

14 Commits

Author SHA1 Message Date
Yoshi Kadokawa 536540781a Add support of image format conversion on importing
Optinally enable conversion of images to raw format when uploading
images to Glance. Only supported when "image_conversion" is enabled in
Glance.

This is an equivalent change to the one in simplestreams:
https://git.launchpad.net/simplestreams/commit/?id=cbc0ac9

Closes-Bug: #1889729
Change-Id: Id15fab364c27242347c520b959065c490e4da6b6
2023-08-30 13:52:21 +09:00
Guilherme Maluf Balzana 4754aca420 Add set_latest_property config to new image
When creating Openstack VMs the user has to specify the image it wants
to use. sstream-mirror-glance adds a date to the image name, so they
always have to recheck which is the current latest image.

This commit adds the `set_latest_property` configuration to include
--set-latest-property to sstream-mirror-glance command line argument.

When --set-latest-property is given sstream-mirror-glance will set the
recently synced image with the `latest=true` property and then remove
the `latest` property from all the os_version/architecture matching
images.

Configure bundles to fetch simplestreams snap from edge channel

Closes-bug: #1933130
Change-Id: Idf78294db7abb8c81d637086e8142782bf1dd36f
Func-Test-PR: https://github.com/openstack-charmers/zaza-openstack-tests/pull/853
2022-09-23 10:31:43 +02:00
Nobuto Murata f8165cebb8 Support --visibility option for simplestreams
With the new option, Glance images can be uploaded with
"visibility=shared" for example instead of "public" so those can be
hidden from usual projects by default.

Closes-Bug: #1975663
Change-Id: I1955f3d2a56654c9a683a2b9d36b33c0f0fd63d4
2022-05-29 13:32:36 +09:00
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
Billy Olsen 6733e22006 Add use-internal-endpoints as a new config option
Enable the glance-simplestreams-sync charm to be configured to only
use internal endpoints, removing the requirement that the charm
access APIs via the public network.

This introduces a new option use-internal-endpoints, which is in-line
with other openstack charms which can be configured to use the internal
endpoints rather than public endpoints.

This option will only be valid for Keystone v3 API versions, which
should not be problematic as the v2 API has been deprecated for quite
some time now.

Closes-Bug: #1896438
Change-Id: I6d83a5469c34c2add3c1bc4ac5052be6d51ed343
2021-09-02 11:03:32 -07:00
Dmitrii Shcherbakov 009c8a7b92 Dynamically generate proxy settings for image syncs
sstream-mirror-glance has several endpoints it needs to talk to:

* Image mirrors - typically, public Internet endpoints;
* Keystone - typically, a directly reachable endpoint;
* Glance - typically, a directly reachable endpoint;
* Object store (Swift) - typically, a directly reachable endpoint but
  sometimes it may be deployed externally and added to the region
  catalog in Keystone (in which case it might be accessible via a proxy
  only).

While sstream-mirror-glance does not support specifying proxy settings
for individual directions, since we know all of them based on the
Keystone catalog, a list of endpoints to add to NO_PROXY environment
variable can be generated dynamically.

The complication is that image syncs are periodically done via a cron
job so a juju-run invocation is needed to retrieve relevant proxy
settings from model-config at each invocation of the synchronization
script.

Additionally, the charm is long-lived so there may be some environments
that rely on legacy proxy settings. This change accounts for that and
acts both on juju-prefixed (new) and unprefixed (legacy) proxy settings.

Whether to use proxy settings for connections to the object store API
is controlled by a charm option which the script is made to react to.
Proxy settings are ignored for object store connections by default.

Closes-Bug: #1843486
Change-Id: Ib1fc5d2eebf43d5f98bb8ee405a3799802c8b8dc
2021-07-22 21:14:03 +03:00
James Page 9698b5ca2a Drop RabbitMQ support
Drop support for sending sync status messages to a RMQ exchange.

This was used by conjure-up which is no longer maintained so
drop the supporting code, metadata and options and remove
RabbitMQ from all test bundles.

Change-Id: I504508a64e50a9d331f6c5d69b292d9ccc20da3d
Func-Test-PR: https://github.com/openstack-charmers/zaza-openstack-tests/pull/321
2020-06-18 08:50:34 +01:00
Zuul 6c43cedb55 Merge "Add custom_properties config option" 2019-12-03 12:38:20 +00:00
Jacek Nykis 0bf193dc85 Add custom_properties config option
This change add "custom_properties" configuration option which
allows custom image properties to be added to glance.

Change-Id: I32d97c9f8026ac1aa16a2bc6cd134f26860c59b2
Closes-Bug: #1783125
2019-12-02 10:34:02 -08:00
Chris MacNaughton 02299812b4 SSL CS certs are multi-line values
When rendering the multi-line string in the identity.yaml
file, it is necessary to denote the multi-line string.

Change-Id: I6dca3e2445286423a785e1c0973fa7e1d43b6797
Closes-Bug: #1835490
2019-11-01 15:47:51 +00:00
Alex Kavanagh ac1d2b5dda Add ssl_ca option to enable to gss
This patch enables SSL to be used with glance-simplestreams-sync.
The ssl_ca option allows a base64 encoded PEM CA certificate to be
used with g-s-s such that the keystone and glance HTTPS sessions are
verified using that certificate.

A new basic_deployment_ssl.py is introduced that just verifies that the
gss charm can get gss to perform a sync; this verifies that gss can
communicate with https versions of keystone and glance.

Note that the simplestreams package also requires a change for SSL to
function properly.  As simplestreams doesn't seem to use PyPi, the
version from the git master will need to be used.

Change-Id: Idcdcb2c933a92a558e729aeb718b58d4077621a7
Closes-Bug: #1802407
2019-01-11 09:37:56 +00:00
David Ames a47ceff0b4 Keystone v3 updates
Match g-ss-s ksv3 with simplestreams ksv3 implementation.

charm-helpers sync
2017-09-12 22:16:54 +00:00
Alex Kavanagh 467233b088 Add support for keystone API v3
This changes ensures that the correct keystone client is used with the
version of the keystone API URL that is passed in.

(This change taken mostly from gnuoy branch in launchpad).
2017-06-13 17:48:20 +01:00
James Page 6cc0f9dc88 Initial baseline from bzr 2017-04-10 09:00:27 +01:00