contrail analytics #26

Supports: xenial bionic focal


Contrail analytics component within docker container.


OpenContrail ( is a fully featured Software Defined Networking (SDN) solution for private clouds. It supports high performance isolated tenant networks without requiring external hardware support. It provides a Neutron plugin to integrate with OpenStack.

This charm provides the analytics node component which includes contrail-collector, contrail-query-engine and contrail-analytics-api services.

Only OpenStack Ocata or newer is supported. Only for Contrail 5.0 or above. Juju 2.0 is required.


Contrail Controller and Contrail AnalyticsDB are prerequisite services to deploy. Once ready, deploy and relate as follows:

juju deploy contrail-analytics
juju add-relation contrail-analytics contrail-analyticsdb
juju add-relation contrail-analytics contrail-controller


The charm requires docker image with Contrail Analytics as a resource. It can be provided as usual for Juju 2.0 in deploy command or through attach-resource:

juju attach contrail-analytics contrail-analytics="$PATH_TO_IMAGE"

External Docker repository

Istead of attaching resource with docker image charm can accept image from remote docker repository. docker-registry should be specified if the registry is only accessible via http protocol (insecure registry). docker-user / docker-password can be specified if registry requires authentification. And image-name / image-tag are the parameters for the image itself.

High Availability (HA)

Multiple units of this charm can be deployed to support HA deployments:

juju add-unit contrail-analytics

Relating to haproxy charm (http-services relation) allows multiple units to be load balanced:

juju add-relation contrail-analytics haproxy

For this http connection there are two modes - http and https. Both modes configure haproxy in http mode (termination). Mode https additionaly configure haproxy to use SSL for frontend. By default http mode is used. To confugire haproxy in https mode you can run:

juju config contrail-analytics haproxy-http-mode=https


This charm supports relation to easyrsa charm to obtain certificates for XMPP and Sandesh connections:

juju add-relation contrail-analytics easyrsa

Please note that in this case all charms must be related to easyrsa. Components require CA certificate for communication.


(string) Networks where API services are listening on. The IP addresses with netmasks of the control network delimited by space or comma (e.g. "" or "") or physical device name. This network will be used for all services in the charm. In Contrail this network is called as API(/MGMT) network. If not specified, default network will be used.
(string) A logging driver for the service’s containers.
(string) Logging options for the logging driver. Logging options available depend on which logging driver you use.
max-size=20m max-file=5
(string) Extra options to pass to the Docker config file '/etc/docker/daemon.json' in json format. e.g. {"iptables": false, "insecure-registries": ["host2", "tungstenfabric", "host1"]}
(string) Password to the docker registry.
(string) URL of docker-registry
(boolean) Is it docker-registry insecure and should docker be configured for it
(string) Login to the docker registry.
(string) Docker runtime to install valid values are "upstream" (Docker PPA), "apt" (Ubuntu archive), "auto" (Ubuntu archive), or "custom" (must have set `docker_runtime_repo` URL, `docker_runtime_key_url` URL and `docker_runtime_package` name). Warning! The changes will not be applied after the package is installed.
(string) Custom Docker repository validation key URL. Warning! The changes will not be applied after the package is installed.
(string) Custom Docker repository package name. Warning! The changes will not be applied after the package is installed.
(string) Custom Docker repository, given in deb format. Use `{ARCH}` to determine architecture at runtime. Use `{CODE}` to set release codename. E.g. `deb [arch={ARCH}] {CODE} stable`. Warning! The changes will not be applied after the package is installed.
(string) Mode for haproxy for http backends - http or https. https means that haproxy will be configured with SSL termination. http configures haproxy without SSL and http services (config-api and analytics-api) can be accessed via haproxy by http connection.
(string) URL to use for HTTP_PROXY to be used by Docker. Only useful in closed environments where a proxy is the only option for routing to the registry to pull images
(string) URL to use for HTTPS_PROXY to be used by Docker. Only useful in closed environments where a proxy is the only option for routing to the registry to pull images
(string) Tag of docker image.
(string) Log level for contrail services. Valid values are: SYS_EMERG, SYS_ALERT, SYS_CRIT, SYS_ERR, SYS_WARN, SYS_NOTICE, SYS_INFO, SYS_DEBUG
(int) Minimum number of units expected to exist before charm will attempt to form a cluster.
(string) Used by the nrpe subordinate charms. 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're running multiple environments with the same services in them this allows you to differentiate between them.
(string) A comma-separated list of nagios servicegroups. If left empty, the nagios_context will be used as the servicegroup
(string) Comma-separated list of destinations (either domain names or IP addresses) that should be directly accessed, by opposition of going through the proxy defined above. Must be less than 2023 characters long
(string) Contrail Analytics API VIP to be used for configuring haproxy relation for external clients. To be set up also in KeepAlived charm configuration if it’s used for HA.