watcher #8

Supports: bionic eoan focal
Add to new model

Description

OpenStack Watcher provides a flexible and scalable resource optimization service for multi-tenant clouds. . OpenStack Train or later is required.


Overview

This charm provides the Watcher service for an OpenStack Cloud. It is comprised of three different services. The API, the Decision Engine and the Applier. This charm takes care of all three, bundled as a single application.

OpenStack Train or later is required.

Usage

The OpenStack Watcher charm requires a running OpenStack deployment and relation with mysql database, rabbitmq-server and keystone identity service.

A simple deployment requires only four commands:

juju deploy --series bionic --config openstack-origin=cloud:bionic-train watcher
juju add-relation watcher mysql
juju add-relation watcher rabbitmq-server
juju add-relation watcher keystone

The charm also support High Availability by relating it to hacluster charm:

juju deploy hacluster watcher-hacluster
juju add-unit watcher
juju set watcher vip=<VIP FOR ACCESS>
juju add-relation watcher-hacluster watcher

Bugs

Please report bugs on [Launchpad]lp-bugs-charm-watcher]. For general questions please refer to the OpenStack Charm Guide.

Configuration

The configuration options will be listed on the charm store, however If you're making assumptions or opinionated decisions in the charm (like setting a default administrator password), you should detail that here so the user knows how to change it immediately, etc.

Contact Information

Though this will be listed in the charm store itself don't assume a user will know that, so include that information here:

OpenStack Watcher


Configuration

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.
action-plan-expiry
(int) An expiry timespan (hours). Watcher invalidates any action plan for which its creation time - whose number of hours has been offset by this value - is older that the current time.
24
check-periodic-interval
(int) Interval (in seconds) for checking action plan expiry.
1800
collector-plugins
(string) A comma separated list of cluster data model plugin names. . Available collector-plugins are: compute and storage.
compute
data-model-period
(int) The time interval (in seconds) between each synchronization of the model
3600
datasources
(string) Datasources to use in order to query the needed metrics. If one of strategy metric is not available in the first datasource, the next datasource will be chosen. . Available datasources are: gnocchi, ceilometer and grafana.
debug
(boolean) Enable debug logging
dns-ha
(boolean) Use DNS HA with MAAS 2.0. Note if this is set do not set vip settings below.
grafana-attribute-map
(string) Mapping of datasource metrics to resource attributes. For a complete list of available attributes see https://docs.openstack.org/watcher/latest/datasources/grafana.html#attribute . Example: host_airflow:1,host_cpu_usage:2,host_inlet_temp:3,host_outlet_temp:4, host_power:5,host_ram_usage:6,instance_cpu_usage:7, instance_l3_cache_usage:8,instance_ram_allocated:9,instance_ram_usage:10, instance_root_disk_size:11
grafana-auth-token
(string) The authtoken for access to Grafana datasource.
changeme
grafana-base-url
(string) The base url parameter will need to specify the type of http protocol and the use of plain text http is strongly discouraged due to the transmission of the access token. . Additionally the path to the proxy interface needs to be supplied as well in case Grafana is placed in a sub directory of the web server. . An example would be: https://mygrafana.org/api/datasource/proxy/
grafana-database-map
(string) Mapping of datasource metrics to Grafana databases. . Example: host_airflow:1,host_cpu_usage:2,host_inlet_temp:3,host_outlet_temp:4, host_power:5,host_ram_usage:6,instance_cpu_usage:7, instance_l3_cache_usage:8,instance_ram_allocated:9,instance_ram_usage:10, instance_root_disk_size:11
grafana-project-id-map
(string) Mapping of datasource metrics to Grafana project ids. . Example: host_airflow:1,host_cpu_usage:2,host_inlet_temp:3,host_outlet_temp:4, host_power:5,host_ram_usage:6,instance_cpu_usage:7, instance_l3_cache_usage:8,instance_ram_allocated:9,instance_ram_usage:10, instance_root_disk_size:11
grafana-query-map
(string) Mapping of datasource metrics to Grafana queries. Values should be strings for which the .format method will transform it. The transformation offers five parameters to the query labeled {0} to {4}. {0} will be replaced with the aggregate, {1} with the resource attribute, {2} with the period, {3} with the granularity and {4} with translator specifics for InfluxDB this will be the retention period. These queries will need to be constructed using tools such as Postman. Example: SELECT cpu FROM {4}.cpu_percent WHERE host == '{1}' AND time > now()-{2}s . Example: host_airflow:1,host_cpu_usage:2,host_inlet_temp:3,host_outlet_temp:4, host_power:5,host_ram_usage:6,instance_cpu_usage:7, instance_l3_cache_usage:8,instance_ram_allocated:9,instance_ram_usage:10, instance_root_disk_size:11
grafana-retention-periods
(string) Keys are the names of retention periods in InfluxDB and the values should correspond with the maximum time they can retain in seconds. . Example: five_years:31556952,one_month:2592000,one_week:604800
grafana-translator-map
(string) Mapping of datasource metrics to Grafana translators. . Example: host_airflow:1,host_cpu_usage:2,host_inlet_temp:3,host_outlet_temp:4, host_power:5,host_ram_usage:6,instance_cpu_usage:7, instance_l3_cache_usage:8,instance_ram_allocated:9,instance_ram_usage:10, instance_root_disk_size:11
haproxy-client-timeout
(int) Client timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 90000ms is used.
haproxy-connect-timeout
(int) Connect timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 9000ms is used.
haproxy-queue-timeout
(int) Queue timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 9000ms is used.
haproxy-server-timeout
(int) Server timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 90000ms is used.
openstack-origin
(string) Repository from which to install OpenStack. May be one of the following: distro (default) ppa:somecustom/ppa (PPA name must include OpenStack Release) deb url sources entry|key id or a supported Ubuntu Cloud Archive pocket. Supported Ubuntu Cloud Archive pockets include: cloud:trusty-liberty cloud:trusty-juno cloud:trusty-kilo cloud:trusty-liberty cloud:trusty-mitaka Note that updating this setting to a source that is known to provide a later version of OpenStack will trigger a software upgrade.
distro
os-admin-hostname
(string) The hostname or address of the admin endpoints created in the keystone identity provider. . This value will be used for admin endpoints. For example, an os-admin-hostname set to 'api-admin.example.com' with ssl enabled will create the following endpoint for neutron-api: . https://api-admin.example.com:9696/
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.
os-internal-hostname
(string) The hostname or address of the internal endpoints created in the keystone identity provider. . This value will be used for internal endpoints. For example, an os-internal-hostname set to 'api-internal.example.com' with ssl enabled will create the following endpoint for neutron-api: . https://api-internal.example.com:9696/
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.
os-public-hostname
(string) The hostname or address of the public endpoints created in the keystone identity provider. . This value will be used for public endpoints. For example, an os-public-hostname set to 'api-public.example.com' with ssl enabled will create the following endpoint for neutron-api: . https://api-public.example.com:9696/
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.
planner
(string) The selected planner used to schedule the actions. . Available planners are: weight, workload_stabilization, basic and storage_capacity_balance.
weight
planner-config
(string) User provided planner configuration. Supports a string representation of a python dictionary where each top-level key represents a value in the relevant planner section in watcher.conf template.
region
(string) OpenStack Region
RegionOne
ssl_ca
(string) TLS CA to use to communicate with other components in a deployment. . __NOTE__: This configuration option will take precedence over any certificates received over the ``certificates`` relation.
ssl_cert
(string) TLS certificate to install and use for any listening services. . __NOTE__: This configuration option will take precedence over any certificates received over the ``certificates`` relation.
ssl_key
(string) TLS key to use with certificate specified as ``ssl_cert``. . __NOTE__: This configuration option will take precedence over any certificates received over the ``certificates`` relation.
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.
use-syslog
(boolean) Setting this to True will allow supporting services to log to syslog.
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.
vip_cidr
(int) Default CIDR netmask to use for HA vip when it cannot be automatically determined.
24
vip_iface
(string) Default network interface to use for HA vip when it cannot be automatically determined.
eth0
worker-multiplier
(float) The CPU core multiplier to use when configuring worker processes. 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.