The Glance project provides an image registration and discovery service and an image delivery service. These services are used in conjunction by Nova to deliver images from object stores, such as OpenStack's Swift service, to Nova's compute nodes.
The glance charm provides the Glance image service for OpenStack. It is intended to be used alongside the other OpenStack components.
Glance may be deployed in a number of ways. This charm focuses on 3 main configurations. All require the existence of the other core OpenStack services deployed via Juju charms, specifically: mysql, keystone and nova-cloud-controller. The following assumes these services have already been deployed.
In this configuration, Glance uses the local storage available on the server to store image data:
juju deploy glance juju add-relation glance keystone juju add-relation glance mysql juju add-relation glance nova-cloud-controller
Swift backed storage
Glance can also use Swift Object storage for image storage. Swift is often deployed as part of an OpenStack cloud and provides increased resilience and scale when compared to using local disk storage. This configuration assumes that you have already deployed Swift using the swift-proxy and swift-storage charms:
juju deploy glance juju add-relation glance keystone juju add-relation glance mysql juju add-relation glance nova-cloud-controller juju add-relation glance swift-proxy
This configuration can be used to support Glance in HA/Scale-out deployments.
Ceph backed storage
In this configuration, Glance uses Ceph based object storage to provide scalable, resilient storage of images. This configuration assumes that you have already deployed Ceph using the ceph charm:
juju deploy glance juju add-relation glance keystone juju add-relation glance mysql juju add-relation glance nova-cloud-controller juju add-relation glance ceph-mon
This configuration can also be used to support Glance in HA/Scale-out deployments.
Note: Glance acts as a Ceph client in this case which requires IP (L3) connectivity to Ceph monitors and OSDs. For MAAS-based deployments this can be addressed with network spaces (see section 'Network spaces' below).
When more than one unit is deployed with the hacluster application the charm will bring up an HA active/active cluster.
There are two mutually exclusive high availability options: using virtual IP(s) or DNS. In both cases the hacluster subordinate charm is used to provide the Corosync and Pacemaker backend HA functionality.
Important: Glance in an HA configuration must be backed by either Ceph or Swift.
In order to do Glance metering with Ceilometer, an AMQP relation is required e.g.
juju deploy glance juju deploy rabbitmq-server juju deploy ceilometer-agent ... juju add-relation glance rabbitmq-server juju add-relation glance ceilometer-agent ...
This charm supports the use of Juju network spaces. This feature optionally allows specific types of the application's network traffic to be bound to subnets that the underlying hardware is connected to.
Note: Spaces must be configured in the backing cloud prior to deployment.
API endpoints can be bound to distinct network spaces supporting the network separation of public, internal and admin endpoints.
Glance acts as a Ceph client and needs IP connectivity to Ceph monitors and OSDs. Binding the ceph endpoint to a space can solve this problem in case monitors and OSDs are located on a single L2 broadcast domain (if they are not, static or dynamic routes need to be used in addition to spaces).
Access to the underlying MySQL instance can also be bound to a specific space using the shared-db relation.
To use this feature, use the --bind option when deploying the charm:
juju deploy glance --bind \ "public=public-space \ internal=internal-space \ admin=admin-space \ shared-db=internal-space \ ceph=ceph-access-space"
Alternatively, these can also be provided as part of a juju native bundle configuration:
glance: charm: cs:xenial/glance num_units: 1 bindings: public: public-space admin: admin-space internal: internal-space shared-db: internal-space ceph: ceph-access-space
Note: Existing glance units configured with the
os-public-networkoptions will continue to honour them. Furthermore, these options override any space bindings, if set.
Policy overrides is an advanced feature that allows an operator to override the default policy of an OpenStack service. The policies that the service supports, the defaults it implements in its code, and the defaults that a charm may include should all be clearly understood before proceeding.
Caution: It is possible to break the system (for tenants and other services) if policies are incorrectly applied to the service.
Policy statements are placed in a YAML file. This file (or files) is then (ZIP) compressed into a single file and used as an application resource. The override is then enabled via a Boolean charm option.
Here are the essential commands (filenames are arbitrary):
zip overrides.zip override-file.yaml juju attach-resource glance policyd-override=overrides.zip juju config glance use-policyd-override=true
Please report bugs on Launchpad.
For general charm questions refer to the OpenStack Charm Guide.
- (boolean) If True enables openstack upgrades for this charm via juju actions. You will still need to set openstack-origin to the new repository but instead of an upgrade running automatically across all units, it will wait for you to execute the openstack-upgrade action for this charm on each unit. If False it will revert to existing behavior of upgrading all units on config change.
- (string) Comma-separated list of key=value pairs to be added to glance-api.conf where 'value' may itself be a comma-separated list of values to be assigned to the 'key'.
- (int) This value dictates the number of replicas ceph must make of any object it stores within the images rbd pool. Of course, this only applies if using Ceph as a backend store. Note that once the images rbd pool has been created, changing this value will not have any effect (although it can be changed in ceph by manually configuring your ceph cluster).
- (int) Defines a relative weighting of the pool as a percentage of the total amount of data in the Ceph cluster. This effectively weights the number of placement groups for the pool created to be appropriately portioned to the amount of data expected. For example, if the compute images for the OpenStack compute instances are expected to take up 20% of the overall configuration then this value would be specified as 20. Note - it is important to choose an appropriate value for the pool weight as this directly affects the number of placement groups which will be created for the pool. The number of placement groups for a pool can only be increased, never decreased - so it is important to identify the percent of data that will likely reside in the pool.
- (string) Comma separated list of container formats that Glance will support.
- (string) Glance database name.
- (string) Database username
- (boolean) Enable debug logging.
- (string) Comma separated list of disk formats that Glance will support.
- (boolean) Use DNS HA with MAAS 2.0. Note if this is set do not set vip settings below.
- (boolean) Expose underlying image locations via the API when using Ceph for image storage. Only disable this option if you do not wish to use copy-on-write clones of RAW format images with Ceph in Cinder and Nova.
- (string) Directory to which the filesystem backend store writes images. Upon start up, Glance creates the directory if it doesn’t already exist and verifies write access to the user under which glance-api runs. If the write access isn’t available, a BadStoreConfiguration exception is raised and the filesystem store may not be available for adding new images. NOTE: This directory is used only when filesystem store is used as a storage backend.
- (string) Default network interface on which HA cluster will bind to communication with the other members of the HA Cluster.
- (int) Default multicast port number that will be used to communicate between HA Cluster nodes.
- (int) Client timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 90000ms is used.
- (int) Connect timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 9000ms is used.
- (int) Queue timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 9000ms is used.
- (int) Server timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 90000ms is used.
- (string) Apply system hardening. Supports a space-delimited list of modules to run. Supported modules currently include os, ssh, apache and mysql.
- (string) Maximum size of image a user can upload. Defaults to 1TB (1099511627776 bytes). Example values: 500M, 500MB, 5G, 5TB. Valid units: K, KB, M, MB, G, GB, T, TB, P, PB. If no units provided, bytes are assumed. . WARNING: this value should only be increased after careful consideration and must be set to a value under 8EB (9223372036854775808 bytes).
- (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 are running multiple environments with the same services in them this allows you to differentiate between them.
- (string) A comma-separated list of nagios service groups. If left empty, the nagios_context will be used as the servicegroup
- (string) Repository from which to install. May be one of the following: distro (default), ppa:somecustom/ppa, a deb url sources entry, or a supported Ubuntu Cloud Archive e.g. . cloud:<series>-<openstack-release> cloud:<series>-<openstack-release>/updates cloud:<series>-<openstack-release>/staging cloud:<series>-<openstack-release>/proposed . See https://wiki.ubuntu.com/OpenStack/CloudArchive for info on which cloud archives are available and supported. . NOTE: updating this setting to a source that is known to provide a later version of OpenStack will trigger a software upgrade unless action-managed-upgrade is set to True.
- (string) The hostname or address of the admin endpoints created for glance in the keystone identity provider. . This value will be used for admin endpoints. For example, an os-admin-hostname set to 'glance.admin.example.com' with ssl enabled will create a admin endpoint for glance of: . https://glance.admin.example.com:9292/
- (string) The IP address and netmask of the OpenStack Admin network (e.g. 192.168.0.0/24) . This network will be used for admin endpoints.
- (string) The hostname or address of the internal endpoints created for glance in the keystone identity provider. . This value will be used for internal endpoints. For example, an os-internal-hostname set to 'glance.internal.example.com' with ssl enabled will create a internal endpoint for glance of: . https://glance.internal.example.com:9292/
- (string) The IP address and netmask of the OpenStack Internal network (e.g. 192.168.0.0/24) . This network will be used for internal endpoints.
- (string) The hostname or address of the public endpoints created for glance in the keystone identity provider. . This value will be used for public endpoints. For example, an os-public-hostname set to 'glance.example.com' with ssl enabled will create a public endpoint for glance of: . https://glance.example.com:9292/
- (string) The IP address and netmask of the OpenStack Public network (e.g. 192.168.0.0/24) . This network will be used for public endpoints.
- (boolean) If True enables IPv6 support. The charm will expect network interfaces to be configured with an IPv6 address. If set to False (default) IPv4 is expected. . NOTE: these charms do not currently support IPv6 privacy extension. In order for this charm to function correctly, the privacy extension must be disabled and a non-temporary address must be configured/available on your network interface.
- (string) Username to request access on rabbitmq-server.
- (string) RabbitMQ virtual host to request access on rabbitmq-server.
- (string) Optionally specify an existing rbd pool that cinder should map to.
- (string) OpenStack Region
- (string) Comma-separated list of key=value pairs to be added to glance-registry.conf where 'value' may itself be a comma-separated list of values to be assigned to the 'key'.
- (boolean) Optionally restrict Ceph key permissions to access pools as required.
- (boolean) If this is set to True, all *_image_location operations in the Glance api will be restricted to role:admin which will result in non-admin users no longer being able to view the "locations" information for an image. This only affects environments that have expose-image-locations set to True. WARNING: enabling this restriction will cause Nova to no longer be able to create COW clones or snapshots for non-admin users when using the RBDImageBackend in the nova-compute charm.
- (string) SSL CA to use with the certificate and key provided - this is only required if you are providing a privately signed ssl_cert and ssl_key.
- (string) SSL certificate to install and use for API ports. Setting this value and ssl_key will enable reverse proxying, point Glance's entry in the Keystone catalog to use https, and override any certificate and key issued by Keystone (if it is configured to do so).
- (string) SSL key to use with certificate specified as ssl_cert.
- (boolean) Openstack mostly defaults to using public endpoints for internal communication between services. If set to True this option will configure services to use internal endpoints where possible.
- (boolean) If True then use the resource file named 'policyd-override' to install override YAML files in the service's policy.d directory. The resource file should be a ZIP file containing at least one yaml file with a .yaml or .yml extension. If False then remove the overrides.
- (boolean) Setting this to True will allow supporting services to log to syslog.
- (boolean) Enable verbose logging.
- (string) Virtual IP(s) to use to front API services in HA configuration. . If multiple networks are being used, a VIP should be provided for each network, separated by spaces.
- (int) Default CIDR netmask to use for HA vip when it cannot be automatically determined.
- (string) Default network interface to use for HA vip when it cannot be automatically determined.
- (float) The CPU core multiplier to use when configuring worker processes for Glance. By default, the number of workers for each daemon is set to twice the number of CPU cores a service unit has. When deployed in a LXD container, this default value will be capped to 4 workers unless this configuration option is set.