diff --git a/ansible/group_vars/all/kolla b/ansible/group_vars/all/kolla index c42ef8eaf..7a2c42f65 100644 --- a/ansible/group_vars/all/kolla +++ b/ansible/group_vars/all/kolla @@ -140,6 +140,8 @@ overcloud_container_image_regex_map: enabled: "{{ kolla_enable_heat | bool }}" - regex: horizon enabled: "{{ kolla_enable_horizon | bool }}" + - regex: influxdb + enabled: "{{ kolla_enable_influxdb | bool }}" - regex: ironic enabled: "{{ kolla_enable_ironic | bool }}" - regex: iscsid @@ -302,6 +304,7 @@ kolla_enable_gnocchi: "no" kolla_enable_haproxy: "yes" kolla_enable_heat: "yes" kolla_enable_horizon: "yes" +kolla_enable_influxdb: "no" kolla_enable_ironic: "yes" kolla_enable_kafka: "no" kolla_enable_kibana: "{{ 'yes' if kolla_enable_central_logging | bool else 'no' }}" diff --git a/ansible/kolla-openstack.yml b/ansible/kolla-openstack.yml index e10c58113..791f1bfe0 100644 --- a/ansible/kolla-openstack.yml +++ b/ansible/kolla-openstack.yml @@ -104,6 +104,7 @@ - { name: glance, file: glance.conf } - { name: grafana, file: grafana.ini } - { name: heat, file: heat.conf } + - { name: influxdb, file: influxdb.conf } - { name: inspector, file: ironic-inspector.conf } - { name: ironic, file: ironic.conf } - { name: ironic_dnsmasq, file: ironic/ironic-dnsmasq.conf } @@ -207,6 +208,7 @@ kolla_extra_grafana: "{{ kolla_extra_config.grafana | default }}" kolla_extra_heat: "{{ kolla_extra_config.heat | default }}" kolla_extra_inspector: "{{ kolla_extra_config.inspector | default }}" + kolla_extra_influxdb: "{{ kolla_extra_config.influxdb | default }}" kolla_extra_ironic: "{{ kolla_extra_config.ironic | default }}" kolla_extra_ironic_dnsmasq: "{{ kolla_extra_config.ironic_dnsmasq | default }}" kolla_extra_kafka: "{{ kolla_extra_config.kafka | default }}" diff --git a/ansible/roles/kolla-ansible/tests/test-defaults.yml b/ansible/roles/kolla-ansible/tests/test-defaults.yml index ec439844f..de0c4f804 100644 --- a/ansible/roles/kolla-ansible/tests/test-defaults.yml +++ b/ansible/roles/kolla-ansible/tests/test-defaults.yml @@ -117,6 +117,7 @@ - enable_glance - enable_ironic - enable_kafka + - enable_influxdb - enable_neutron - enable_nova - enable_zookeeper diff --git a/ansible/roles/kolla-openstack/defaults/main.yml b/ansible/roles/kolla-openstack/defaults/main.yml index cd0fcdcff..e50fa4ffc 100644 --- a/ansible/roles/kolla-openstack/defaults/main.yml +++ b/ansible/roles/kolla-openstack/defaults/main.yml @@ -69,6 +69,15 @@ kolla_extra_heat: # Whether to enable Horizon. kolla_enable_horizon: +############################################################################### +# InfluxDB configuration. + +# Whether to enable InfluxDB. +kolla_enable_influxdb: + +# Free form extra configuration to append to influxdb.conf. +kolla_extra_influxdb: + ############################################################################### # Ironic configuration. diff --git a/ansible/roles/kolla-openstack/molecule/default/tests/test_default.py b/ansible/roles/kolla-openstack/molecule/default/tests/test_default.py index 1b1bd0c76..f364acab5 100644 --- a/ansible/roles/kolla-openstack/molecule/default/tests/test_default.py +++ b/ansible/roles/kolla-openstack/molecule/default/tests/test_default.py @@ -44,6 +44,7 @@ def test_service_config_directory(host, path): 'grafana', 'heat', 'horizon', + 'influxdb', 'ironic', 'kafka', 'magnum', diff --git a/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml b/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml index 83972ca34..aedad72c4 100644 --- a/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml +++ b/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml @@ -41,6 +41,10 @@ provisioner: [extra-heat.conf] foo=bar kolla_enable_horizon: True + kolla_enable_influxdb: True + kolla_extra_influxdb: | + [extra-influxdb.conf] + foo=bar kolla_enable_ironic: True kolla_extra_ironic: | [extra-ironic.conf] diff --git a/ansible/roles/kolla-openstack/molecule/enable-everything/tests/test_default.py b/ansible/roles/kolla-openstack/molecule/enable-everything/tests/test_default.py index 450247dda..54c03d7d3 100644 --- a/ansible/roles/kolla-openstack/molecule/enable-everything/tests/test_default.py +++ b/ansible/roles/kolla-openstack/molecule/enable-everything/tests/test_default.py @@ -36,6 +36,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( 'grafana', 'heat', 'horizon', + 'influxdb', 'ironic', 'kafka', 'keystone', @@ -60,6 +61,7 @@ def test_service_config_directory(host, path): 'glance.conf', 'grafana.ini', 'heat.conf', + 'influxdb.conf', 'ironic.conf', 'ironic-inspector.conf', 'kafka.server.properties', diff --git a/ansible/roles/kolla-openstack/tasks/config.yml b/ansible/roles/kolla-openstack/tasks/config.yml index c4c98a9a2..c30c1bdae 100644 --- a/ansible/roles/kolla-openstack/tasks/config.yml +++ b/ansible/roles/kolla-openstack/tasks/config.yml @@ -19,6 +19,7 @@ - { src: glance.conf.j2, dest: glance.conf, enabled: "{{ kolla_enable_glance }}" } - { src: grafana.ini.j2, dest: grafana.ini, enabled: "{{ kolla_enable_grafana }}" } - { src: heat.conf.j2, dest: heat.conf, enabled: "{{ kolla_enable_heat }}" } + - { src: influxdb.conf.j2, dest: influxdb.conf, enabled: "{{ kolla_enable_influxdb }}" } - { src: ironic.conf.j2, dest: ironic.conf, enabled: "{{ kolla_enable_ironic }}" } - { src: ironic-dnsmasq.conf.j2, dest: ironic/ironic-dnsmasq.conf, enabled: "{{ kolla_enable_ironic }}" } - { src: ironic-inspector.conf.j2, dest: ironic-inspector.conf, enabled: "{{ kolla_enable_ironic }}" } diff --git a/ansible/roles/kolla-openstack/templates/influxdb.conf.j2 b/ansible/roles/kolla-openstack/templates/influxdb.conf.j2 new file mode 100644 index 000000000..ee314f710 --- /dev/null +++ b/ansible/roles/kolla-openstack/templates/influxdb.conf.j2 @@ -0,0 +1,9 @@ +# {{ ansible_managed }} + +{% if kolla_extra_influxdb %} +####################### +# Extra configuration +####################### + +{{ kolla_extra_influxdb }} +{% endif %} diff --git a/ansible/roles/kolla-openstack/vars/main.yml b/ansible/roles/kolla-openstack/vars/main.yml index f6f9fe04b..db4e02e56 100644 --- a/ansible/roles/kolla-openstack/vars/main.yml +++ b/ansible/roles/kolla-openstack/vars/main.yml @@ -54,6 +54,11 @@ kolla_openstack_custom_config: dest: "{{ kolla_node_custom_config_path }}/horizon" patterns: "*" enabled: "{{ kolla_enable_horizon }}" + # InfluxDB. + - src: "{{ kolla_extra_config_path }}/influxdb" + dest: "{{ kolla_node_custom_config_path }}/influxdb" + patterns: "*" + enabled: "{{ kolla_enable_influxdb }}" # Ironic. - src: "{{ kolla_extra_config_path }}/ironic" dest: "{{ kolla_node_custom_config_path }}/ironic"