Add coordination support to the role
Ceilometer can leverage coordination driver. With that we have an option to deploy and leverage zookeeper for such deployments. While we have already added support to some services, like Designate and Cinder, Telemetry remained unpatched. Related-Bug: #1629395 Change-Id: I3cf6116d0e51d885fb29f584b810959944f517bc Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
This commit is contained in:
committed by
Jonathan Rosser
parent
3b92da9f5c
commit
53f7e2f3d4
@@ -267,6 +267,16 @@ magnum_oslomsg_notify_ssl_ca_file: "{{ oslomsg_rpc_ssl_ca_file | default('') }}"
|
||||
# Ceilometer services info
|
||||
ceilometer_role_name: admin
|
||||
|
||||
## Coordination
|
||||
ceilometer_coordination_driver: "{{ coordination_driver | default('zookeeper') }}"
|
||||
ceilometer_coordination_group: "{{ coordination_host_group | default('zookeeper_all') }}"
|
||||
ceilometer_coordination_enable: "{{ (ceilometer_coordination_group in groups and groups[ceilometer_coordination_group] | length > 0) }}"
|
||||
ceilometer_coordination_namespace: ceilometer
|
||||
ceilometer_coordination_client_ssl: "{{ coordination_client_ssl | default(False) }}"
|
||||
ceilometer_coordination_verify_cert: "{{ coordination_verify_cert | default(True) }}"
|
||||
ceilometer_coordination_port: "{{ coordination_port | default(ceilometer_coordination_client_ssl | ternary('2281', '2181')) }}"
|
||||
ceilometer_coordination_url: "{{ _ceilometer_coordination_url | default() }}"
|
||||
|
||||
## Service Type and Data
|
||||
ceilometer_service_region: "{{ service_region | default('RegionOne') }}"
|
||||
ceilometer_service_user_name: ceilometer
|
||||
@@ -322,9 +332,8 @@ ceilometer_pip_packages:
|
||||
- PyMySQL
|
||||
- "{{ ceilometer_cache_backend_package }}"
|
||||
- systemd-python
|
||||
- tooz
|
||||
- "tooz[{{ ceilometer_coordination_driver }}]"
|
||||
- warlock
|
||||
- kazoo
|
||||
|
||||
ceilometer_agent_init_overrides: {}
|
||||
ceilometer_polling_init_overrides: {}
|
||||
|
||||
@@ -65,23 +65,16 @@ writing, the following backends are supported:
|
||||
|
||||
- Memcached: Recommended for testing.
|
||||
|
||||
.. important::
|
||||
At the moment OpenStack-Ansible does support deployment of Zookeeper
|
||||
backend using `zookeeper <https://docs.openstack.org/ansible-role-zookeeper/latest/>`
|
||||
|
||||
The OpenStack-Ansible project does not deploy these backends.
|
||||
One of the backends must exist before deploying the ceilometer service.
|
||||
In case you have defined ``coordination_hosts`` in your
|
||||
``openstack_user_config.yml`` or in one of ``conf.d`` files, Ceilometer
|
||||
should be configured to use Zookeeper as its coordination backend
|
||||
by default.
|
||||
|
||||
Achieve HA by configuring the proper directives in ``ceilometer.conf`` using
|
||||
``ceilometer_ceilometer_conf_overrides`` in the ``user_variables.yml`` file.
|
||||
The `Ceilometer Admin Guide`_ details the
|
||||
options used in ``ceilometer.conf`` for HA deployment. The following is an
|
||||
example of ``ceilometer_ceilometer_conf_overrides``:
|
||||
You can explicitly disable coordination by setting
|
||||
``ceilometer_coordination_enable: false`` in your ``user_variables.yml``.
|
||||
|
||||
.. _Ceilometer Admin Guide: https://docs.openstack.org/admin-guide/telemetry-data-collection.html
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
ceilometer_ceilometer_conf_overrides:
|
||||
coordination:
|
||||
backend_url: "zookeeper://172.20.1.110:2181"
|
||||
notification:
|
||||
workload_partitioning: True
|
||||
If you want to use custom coordination driver, you can override
|
||||
``ceilometer_coordination_url`` to point to such custom backend.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added coordination support to the Ceilometer service. In case
|
||||
zookeeper is present in deployment, service will be configured to
|
||||
use it for coordination.
|
||||
Operators are able to supply arbitrary coordination url via
|
||||
``ceilometer_coordination_url`` variable.
|
||||
@@ -102,6 +102,11 @@ messaging_urls = {{ _oslomsg_url(magnum_oslomsg_notify_transport, magnum_oslomsg
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if ceilometer_coordination_enable %}
|
||||
[coordination]
|
||||
backend_url = {{ ceilometer_coordination_url }}
|
||||
{% endif %}
|
||||
|
||||
[publisher]
|
||||
telemetry_secret = {{ ceilometer_telemetry_secret }}
|
||||
|
||||
|
||||
@@ -226,3 +226,12 @@ _ceilometer_cache_backend_package: |-
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
oslo.cache[{{ oslo.backend }}]
|
||||
|
||||
_ceilometer_coordination_url: >-
|
||||
{{ ceilometer_coordination_driver }}://{{
|
||||
groups[ceilometer_coordination_group]
|
||||
| map('extract', hostvars, 'ansible_host')
|
||||
| list | join(':' ~ ceilometer_coordination_port ~ ',')
|
||||
}}:{{ ceilometer_coordination_port -}}
|
||||
?namespace={{ ceilometer_coordination_namespace }}{% if ceilometer_coordination_client_ssl | bool -%}
|
||||
&use_ssl=True&verify_certs={{ ceilometer_coordination_verify_cert | bool }}{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user