Add support for configuring Grafana

As per the Kolla project, this is disabled by default.
This commit is contained in:
Doug Szumski 2018-01-12 13:52:45 +00:00 committed by stack
parent 7846d4ecca
commit df9fc0a415
6 changed files with 29 additions and 0 deletions

View File

@ -130,6 +130,8 @@ overcloud_container_image_regex_map:
enabled: True
- regex: glance
enabled: "{{ kolla_enable_glance | bool }}"
- regex: grafana
enabled: "{{ kolla_enable_grafana | bool }}"
- regex: gnocchi
enabled: "{{ kolla_enable_gnocchi | bool }}"
- regex: ^haproxy$
@ -281,6 +283,7 @@ kolla_enable_elasticsearch: "{{ 'yes' if kolla_enable_central_logging | bool or
kolla_enable_etcd: "no"
kolla_enable_freezer: "no"
kolla_enable_glance: "yes"
kolla_enable_grafana: "no"
kolla_enable_gnocchi: "no"
kolla_enable_haproxy: "yes"
kolla_enable_heat: "yes"

View File

@ -97,6 +97,7 @@
register: stat_result
with_items:
- { name: glance, file: glance.conf }
- { name: grafana, file: grafana.ini }
- { name: heat, file: heat.conf }
- { name: inspector, file: ironic-inspector.conf }
- { name: ironic, file: ironic.conf }
@ -193,6 +194,7 @@
kolla_inspector_default_gateway: "{{ inspection_net_name | net_inspection_gateway or inspection_net_name | net_gateway }}"
# Extra free-form user-provided configuration.
kolla_extra_glance: "{{ kolla_extra_config.glance | 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 }}"
kolla_extra_ironic: "{{ kolla_extra_config.ironic | default }}"

View File

@ -15,6 +15,15 @@ kolla_enable_glance:
# glance-registry.conf.
kolla_extra_glance:
###############################################################################
# Grafana configuration.
# Whether to enable Grafana.
kolla_enable_grafana:
# Free form extra configuration to append to grafana.ini.
kolla_extra_grafana:
###############################################################################
# Heat configuration.

View File

@ -14,6 +14,7 @@
mode: 0640
with_items:
- { 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: ironic.conf.j2, dest: ironic.conf, enabled: "{{ kolla_enable_ironic }}" }
- { src: ironic-dnsmasq.conf.j2, dest: ironic/ironic-dnsmasq.conf, enabled: "{{ kolla_enable_ironic }}" }

View File

@ -0,0 +1,9 @@
# {{ ansible_managed }}
{% if kolla_extra_grafana %}
#######################
# Extra configuration
#######################
{{ kolla_extra_grafana }}
{% endif %}

View File

@ -29,6 +29,11 @@ kolla_openstack_custom_config:
dest: "{{ kolla_node_custom_config_path }}/glance"
patterns: "*"
enabled: "{{ kolla_enable_glance }}"
# Grafana.
- src: "{{ kolla_extra_config_path }}/grafana"
dest: "{{ kolla_node_custom_config_path }}/grafana"
patterns: "*"
enabled: "{{ kolla_enable_grafana }}"
# Heat.
- src: "{{ kolla_extra_config_path }}/heat"
dest: "{{ kolla_node_custom_config_path }}/heat"