ceilometer #260

Ceilometer project aims to become the infrastructure to collect measurements
within OpenStack so that no two agents would need to be written to collect
the same data. It's primary targets are monitoring and metering, but the
framework should be easily expandable to collect for other needs. To that
effect, Ceilometer should be able to share collected data with a variety
of consumers.

Overview

This charm provides the Ceilometer service for OpenStack. It is intended to
be used alongside the other OpenStack components, starting with the Folsom
release.

Ceilometer is made up of 2 separate services: an API service, and a collector
service. This charm allows them to be deployed in different combination,
depending on user preference and requirements.

This charm was developed to support deploying Folsom on both Ubuntu Quantal
and Ubuntu Precise. Since Ceilometer is only available for Ubuntu 12.04 via
the Ubuntu Cloud Archive, deploying this charm to a Precise machine will by
default install Ceilometer and its dependencies from the Cloud Archive.

Usage

In order to deploy Ceilometer service, the MongoDB service is required:

juju deploy mongodb
juju deploy ceilometer
juju add-relation ceilometer mongodb

then Keystone and Rabbit relationships need to be established:

juju add-relation ceilometer rabbitmq
juju add-relation ceilometer keystone:identity-service
juju add-relation ceilometer keystone:identity-notifications

In order to capture the calculations, a Ceilometer compute agent needs to be
installed in each nova node, and be related with Ceilometer service:

juju deploy ceilometer-agent
juju add-relation ceilometer-agent nova-compute
juju add-relation ceilometer:ceilometer-service ceilometer-agent:ceilometer-service

Ceilometer provides an API service that can be used to retrieve
Openstack metrics.

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

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.

To use this feature, use the --bind option when deploying the charm:

juju deploy ceilometer --bind "public=public-space internal=internal-space admin=admin-space"

alternatively these can also be provided as part of a juju native bundle configuration:

ceilometer:
  charm: cs:xenial/ceilometer
  bindings:
    public: public-space
    admin: admin-space
    internal: 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.
                        
event-time-to-live
(int)
                            Number of seconds that events are kept in the database for (<= 0 means
infinite).

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

                        
api-workers
(int)
                            Number of workers for Ceilometer API server. (>= Kilo).

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

                        
use-syslog
(boolean)
                            Setting this to True will allow supporting services to log to syslog.

                        
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 Ceilometer'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).

                        
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.

                        
5403
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.
                        
ceilometer
os-public-hostname
(string)
                            The hostname or address of the public endpoints created for ceilometer
in the keystone identity provider.
.
This value will be used for public endpoints. For example, an
os-public-hostname set to 'ceilometer.example.com' with ssl enabled will
create the following public endpoints for ceilometer:
.
https://ceilometer.example.com:8777/

                        
metering-time-to-live
(int)
                            Number of seconds that samples are kept in the database for (<= 0 means
infinite).

                        
-1
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 ceilometer
in the keystone identity provider.
.
This value will be used for admin endpoints. For example, an
os-admin-hostname set to 'ceilometer.admin.example.com' with ssl enabled
will create the following admin endpoints for ceilometer:
.
https://ceilometer.admin.example.com:8777/

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

                        
region
(string)
                            OpenStack region name.
                        
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
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.

                        
harden
(string)
                            Apply system hardening. Supports a space-delimited list of modules
to run. Supported modules currently include os, ssh, apache and mysql.

                        
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 ceilometer
in the keystone identity provider.
.
This value will be used for internal endpoints. For example, an
os-internal-hostname set to 'ceilometer.internal.example.com' with ssl
enabled will create the following internal endpoints for ceilometer:
.
https://ceilometer.internal.example.com:8777/

                        
haproxy-connect-timeout
(int)
                            Connect timeout configuration in ms for haproxy, used in HA
configurations. If not provided, default value of 5000ms is used.