glance #295

Description

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.

Overview

This charm provides the Glance image service for OpenStack. It is intended to
be used alongside the other OpenStack components, starting with the Essex
release in Ubuntu 12.04.

Usage

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.

Local Storage

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

This configuration can also be used to support Glance in HA/Scale-out
deployments.

HA/Clustering

There are two mutually exclusive high availability options: using virtual
IP(s) or DNS. In both cases, a relationship to hacluster is required which
provides the corosync back end HA functionality.

To use virtual IP(s) the clustered nodes must be on the same subnet such that
the VIP is a valid IP on the subnet for one of the node's interfaces and each
node has an interface in said subnet. The VIP becomes a highly-available API
endpoint.

At a minimum, the config option 'vip' must be set in order to use virtual IP
HA. If multiple networks are being used, a VIP should be provided for each
network, separated by spaces. Optionally, vip_iface or vip_cidr may be
specified.

To use DNS high availability there are several prerequisites. However, DNS HA
does not require the clustered nodes to be on the same subnet.
Currently the DNS HA feature is only available for MAAS 2.0 or greater
environments. MAAS 2.0 requires Juju 2.0 or greater. The clustered nodes must
have static or "reserved" IP addresses registered in MAAS. The DNS hostname(s)
must be pre-registered in MAAS before use with DNS HA.

At a minimum, the config option 'dns-ha' must be set to true and at least one
of 'os-public-hostname', 'os-internal-hostname' or 'os-internal-hostname' must
be set in order to use DNS HA. One or more of the above hostnames may be set.

The charm will throw an exception in the following circumstances:
If neither 'vip' nor 'dns-ha' is set and the charm is related to hacluster
If both 'vip' and 'dns-ha' are set as they are mutually exclusive
If 'dns-ha' is set and none of the os-{admin,internal,public}-hostname(s) are
set

Note that Glance in HA configuration must be used with either Ceph or
Swift providing backing image storage.

Glance metering

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
...

Network Space support

This charm supports the use of Juju Network Spaces, allowing the charm to be bound to network space configurations managed directly by Juju. This is only supported with Juju 2.0 and above.

API endpoints can be bound to distinct network spaces supporting the network separation of public, internal and admin endpoints.

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"

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

NOTE: Spaces must be configured in the underlying provider prior to attempting to use them.

NOTE: Existing deployments using os-*-network configuration options will continue to function; these options are preferred over any network space binding provided if set.

Configuration

ssl_key
(string) SSL key to use with certificate specified as ssl_cert.
vip_iface
(string) Default network interface to use for HA vip when it cannot be automatically determined.
eth0
expose-image-locations
(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.
True
os-admin-network
(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.
haproxy-server-timeout
(int) Server timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 30000ms is used.
vip
(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.
ssl_ca
(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.
use-syslog
(boolean) Setting this to True will allow supporting services to log to syslog.
worker-multiplier
(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.
verbose
(boolean) Enable verbose logging.
haproxy-queue-timeout
(int) Queue timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 5000ms is used.
ssl_cert
(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).
disk-formats
(string) Comma separated list of disk formats that Glance will support.
ami,ari,aki,vhd,vmdk,raw,qcow2,vdi,iso,root-tar
prefer-ipv6
(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.
os-public-network
(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.
ha-mcastport
(int) Default multicast port number that will be used to communicate between HA Cluster nodes.
5444
ha-bindiface
(string) Default network interface on which HA cluster will bind to communication with the other members of the HA Cluster.
eth0
nagios_servicegroups
(string) A comma-separated list of nagios service groups. If left empty, the nagios_context will be used as the servicegroup
haproxy-client-timeout
(int) Client timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 30000ms is used.
rabbit-user
(string) Username to request access on rabbitmq-server.
glance
os-public-hostname
(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/
action-managed-upgrade
(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.
os-admin-hostname
(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/
use-internal-endpoints
(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.
registry-config-flags
(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'.
api-config-flags
(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'.
ceph-pool-weight
(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.
5
dns-ha
(boolean) Use DNS HA with MAAS 2.0. Note if this is set do not set vip settings below.
openstack-origin
(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.
distro
ceph-osd-replication-count
(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).
3
os-internal-network
(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.
database
(string) Glance database name.
glance
openstack-origin-git
(string) Specifies a default OpenStack release name, or a YAML dictionary listing the git repositories to install from. . The default Openstack release name may be one of the following, where the corresponding OpenStack github branch will be used: * liberty * mitaka * newton * master . The YAML must minimally include requirements and glance repositories, and may also include repositories for other dependencies: repositories: - {name: requirements, repository: 'git://github.com/openstack/requirements', branch: master} - {name: glance, repository: 'git://github.com/openstack/glance', branch: master} release: master
region
(string) OpenStack Region
RegionOne
nagios_context
(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.
juju
container-formats
(string) Comma separated list of container formats that Glance will support.
harden
(string) Apply system hardening. Supports a space-delimited list of modules to run. Supported modules currently include os, ssh, apache and mysql.
restrict-ceph-pools
(boolean) Optionally restrict Ceph key permissions to access pools as required.
rabbit-vhost
(string) RabbitMQ virtual host to request access on rabbitmq-server.
openstack
debug
(boolean) Enable debug logging.
os-internal-hostname
(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/
haproxy-connect-timeout
(int) Connect timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 5000ms is used.
database-user
(string) Database username
glance
vip_cidr
(int) Default CIDR netmask to use for HA vip when it cannot be automatically determined.
24