Add support for custom Aodh configuration

Change-Id: I19ef5a46dccacc00db495993cc744938921996a1
Story: 2008019
Task: 40671
This commit is contained in:
Pierre Riteau 2020-08-17 10:39:58 +02:00
parent f40dde18df
commit 878fe5728b
10 changed files with 42 additions and 3 deletions

View File

@ -104,6 +104,7 @@
mime: False
register: stat_result
with_items:
- { name: aodh, file: aodh.conf }
- { name: blazar, file: blazar.conf }
- { name: ceilometer, file: ceilometer.conf }
- { name: cinder, file: cinder.conf }
@ -212,6 +213,7 @@
auth_type: none
endpoint_override: "http://{% raw %}{{ api_interface_address }}{% endraw %}:{{ inspector_store_port }}"
# Extra free-form user-provided configuration.
kolla_extra_aodh: "{{ kolla_extra_config.aodh | default }}"
kolla_extra_blazar: "{{ kolla_extra_config.blazar | default }}"
kolla_extra_ceilometer: "{{ kolla_extra_config.ceilometer | default }}"
kolla_extra_cinder: "{{ kolla_extra_config.cinder | default }}"

View File

@ -11,6 +11,15 @@ kolla_node_custom_config_path: /etc/kolla/config
# Free form extra configuration to append to global.conf.
kolla_extra_global:
###############################################################################
# Aodh configuration.
# Whether to enable Aodh.
kolla_enable_aodh:
# Free form extra configuration to append to aodh.conf.
kolla_extra_aodh:
###############################################################################
# Barbican configuration.

View File

@ -37,7 +37,8 @@ def test_service_config_directory(host, path):
@pytest.mark.parametrize(
'path',
['cinder',
['aodh',
'cinder',
'cloudkitty',
'designate',
'glance',

View File

@ -14,6 +14,10 @@ provisioner:
group_vars:
all:
kolla_extra_config_path:
kolla_enable_aodh: true
kolla_extra_aodh: |
[extra-aodh.conf]
foo=bar
kolla_enable_blazar: true
kolla_extra_blazar: |
[extra-blazar.conf]

View File

@ -27,7 +27,8 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
@pytest.mark.parametrize(
'path',
['cinder',
['aodh',
'cinder',
'cloudkitty',
'designate',
'fluentd/filter',
@ -61,7 +62,8 @@ def test_service_config_directory(host, path):
@pytest.mark.parametrize(
'path',
['cinder.conf',
['aodh.conf',
'cinder.conf',
'cloudkitty.conf',
'designate.conf',
'galera.cnf',

View File

@ -13,6 +13,7 @@
dest: "{{ kolla_node_custom_config_path }}/{{ item.dest }}"
mode: 0640
with_items:
- { src: aodh.conf.j2, dest: aodh.conf, enabled: "{{ kolla_enable_aodh }}" }
- { src: blazar.conf.j2, dest: blazar.conf, enabled: "{{ kolla_enable_blazar }}" }
- { src: ceilometer.conf.j2, dest: ceilometer.conf, enabled: "{{ kolla_enable_ceilometer }}" }
- { src: cinder.conf.j2, dest: cinder.conf, enabled: "{{ kolla_enable_cinder }}" }

View File

@ -0,0 +1,10 @@
# {{ ansible_managed }}
{% if kolla_extra_aodh %}
#######################
# Extra configuration
#######################
{{ kolla_extra_aodh }}
{% endif %}

View File

@ -9,6 +9,11 @@
# the destination, and will not be removed from the destination, even
# if disabled or unexpected.
kolla_openstack_custom_config:
# Aodh.
- src: "{{ kolla_extra_config_path }}/aodh"
dest: "{{ kolla_node_custom_config_path }}/aodh"
patterns: "*"
enabled: "{{ kolla_enable_aodh }}"
# Barbican.
- src: "{{ kolla_extra_config_path }}/barbican"
dest: "{{ kolla_node_custom_config_path }}/barbican"

View File

@ -502,6 +502,8 @@ which files are supported.
=============================== =======================================================
File Purpose
=============================== =======================================================
``aodh.conf`` Aodh configuration.
``aodh/*`` Extended Aodh configuration.
``backup.my.cnf`` Mariabackup configuration.
``barbican/*`` Extended Barbican configuration.
``blazar.conf`` Blazar configuration.

View File

@ -0,0 +1,3 @@
---
features:
- Adds support for custom Aodh configuration.