diff --git a/ansible/kolla-openstack.yml b/ansible/kolla-openstack.yml index f6c5bed1c..a970f9936 100644 --- a/ansible/kolla-openstack.yml +++ b/ansible/kolla-openstack.yml @@ -104,6 +104,7 @@ - { name: cinder, file: cinder.conf } - { name: designate, file: designate.conf } - { name: glance, file: glance.conf } + - { name: gnocchi, file: gnocchi.conf } - { name: grafana, file: grafana.ini } - { name: heat, file: heat.conf } - { name: inspector, file: ironic-inspector.conf } @@ -209,6 +210,7 @@ kolla_extra_cinder: "{{ kolla_extra_config.cinder | default }}" kolla_extra_designate: "{{ kolla_extra_config.designate | default }}" kolla_extra_glance: "{{ kolla_extra_config.glance | default }}" + kolla_extra_gnocchi: "{{ kolla_extra_config.gnocchi | default }}" kolla_extra_grafana: "{{ kolla_extra_config.grafana | default }}" kolla_extra_heat: "{{ kolla_extra_config.heat | default }}" kolla_extra_inspector: "{{ kolla_extra_config.inspector | default }}" diff --git a/ansible/roles/kolla-openstack/defaults/main.yml b/ansible/roles/kolla-openstack/defaults/main.yml index 9e76d0828..e37561070 100644 --- a/ansible/roles/kolla-openstack/defaults/main.yml +++ b/ansible/roles/kolla-openstack/defaults/main.yml @@ -48,6 +48,15 @@ kolla_enable_glance: # glance-registry.conf. kolla_extra_glance: +############################################################################### +# Gnocchi configuration. + +# Whether to enable Gnocchi. +kolla_enable_gnocchi: + +# Free form extra configuration to append to gnocchi.conf. +kolla_extra_gnocchi: + ############################################################################### # Grafana configuration. diff --git a/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml b/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml index 58669cd54..0fe0f644a 100644 --- a/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml +++ b/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml @@ -30,6 +30,10 @@ provisioner: kolla_extra_glance: | [extra-glance.conf] foo=bar + kolla_enable_gnocchi: true + kolla_extra_gnocchi: | + [extra-gnocchi.conf] + foo=bar kolla_enable_grafana: true kolla_extra_grafana: | [extra-grafana.ini] diff --git a/ansible/roles/kolla-openstack/tasks/config.yml b/ansible/roles/kolla-openstack/tasks/config.yml index 815ea0ffc..cdaffa0b2 100644 --- a/ansible/roles/kolla-openstack/tasks/config.yml +++ b/ansible/roles/kolla-openstack/tasks/config.yml @@ -18,6 +18,7 @@ - { src: designate.conf.j2, dest: designate.conf, enabled: "{{ kolla_enable_designate }}" } - { src: galera.cnf.j2, dest: galera.cnf, enabled: "{{ kolla_enable_mariadb }}" } - { src: glance.conf.j2, dest: glance.conf, enabled: "{{ kolla_enable_glance }}" } + - { src: gnocchi.conf.j2, dest: gnocchi.conf, enabled: "{{ kolla_enable_gnocchi }}" } - { src: grafana.ini.j2, dest: grafana.ini, enabled: "{{ kolla_enable_grafana }}" } - { src: heat.conf.j2, dest: heat.conf, enabled: "{{ kolla_enable_heat }}" } - { src: ironic.conf.j2, dest: ironic.conf, enabled: "{{ kolla_enable_ironic }}" } diff --git a/ansible/roles/kolla-openstack/templates/gnocchi.conf.j2 b/ansible/roles/kolla-openstack/templates/gnocchi.conf.j2 new file mode 100644 index 000000000..a9781dfca --- /dev/null +++ b/ansible/roles/kolla-openstack/templates/gnocchi.conf.j2 @@ -0,0 +1,9 @@ +# {{ ansible_managed }} + +{% if kolla_extra_gnocchi %} +####################### +# Extra configuration +####################### + +{{ kolla_extra_gnocchi }} +{% endif %} diff --git a/ansible/roles/kolla-openstack/vars/main.yml b/ansible/roles/kolla-openstack/vars/main.yml index 70e52d872..a866bf2ff 100644 --- a/ansible/roles/kolla-openstack/vars/main.yml +++ b/ansible/roles/kolla-openstack/vars/main.yml @@ -49,6 +49,11 @@ kolla_openstack_custom_config: dest: "{{ kolla_node_custom_config_path }}/glance" patterns: "*" enabled: "{{ kolla_enable_glance }}" + # Gnocchi. + - src: "{{ kolla_extra_config_path }}/gnocchi" + dest: "{{ kolla_node_custom_config_path }}/gnocchi" + patterns: "*" + enabled: "{{ kolla_enable_gnocchi }}" # Grafana. - src: "{{ kolla_extra_config_path }}/grafana" dest: "{{ kolla_node_custom_config_path }}/grafana" diff --git a/doc/source/configuration/kolla-ansible.rst b/doc/source/configuration/kolla-ansible.rst index 650d39230..14d7424b1 100644 --- a/doc/source/configuration/kolla-ansible.rst +++ b/doc/source/configuration/kolla-ansible.rst @@ -161,6 +161,8 @@ which files are supported. ``fluentd/output`` Fluentd output configuration. ``glance.conf`` Glance configuration. ``glance/*`` Extended Glance configuration. + ``gnocchi.conf`` Gnocchi configuration. + ``gnocchi/*`` Extended Gnocchi configuration. ``grafana/*`` Extended Grafana configuration. ``haproxy/*`` HAProxy configuration. ``heat.conf`` Heat configuration. diff --git a/releasenotes/notes/add-support-for-custom-gnocchi-conf-51b110196f966c32.yaml b/releasenotes/notes/add-support-for-custom-gnocchi-conf-51b110196f966c32.yaml new file mode 100644 index 000000000..7782cddb5 --- /dev/null +++ b/releasenotes/notes/add-support-for-custom-gnocchi-conf-51b110196f966c32.yaml @@ -0,0 +1,3 @@ +--- +features: + - Adds support for custom Gnocchi configuration.