kolla-ansible/ansible/roles/grafana/defaults/main.yml
Adam Harwell f1c8136556 Refactor haproxy config (split by service) V2.0
Having all services in one giant haproxy file makes altering
configuration for a service both painful and dangerous. Each service
should be configured with a simple set of variables and rendered with a
single unified template.

Available are two new templates:

* haproxy_single_service_listen.cfg.j2: close to the original style, but
only one service per file
* haproxy_single_service_split.cfg.j2: using the newer haproxy syntax
for separated frontend and backend

For now the default will be the single listen block, for ease of
transition.

Change-Id: I6e237438fbc0aa3c89a3c8bd706a53b74e71904b
2018-09-26 03:30:38 -07:00

70 lines
2.1 KiB
YAML

---
project_name: "grafana"
grafana_services:
grafana:
container_name: grafana
group: grafana
enabled: true
image: "{{ grafana_image_full }}"
volumes:
- "{{ node_config_directory }}/grafana/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "grafana:/var/lib/grafana/"
- "kolla_logs:/var/log/kolla/"
dimensions: "{{ grafana_dimensions }}"
haproxy:
grafana_server:
enabled: "{{ enable_grafana }}"
mode: "http"
external: false
port: "{{ grafana_server_port }}"
grafana_server_external:
enabled: "{{ enable_grafana }}"
mode: "http"
external: true
port: "{{ grafana_server_port }}"
####################
# Database
####################
grafana_database_name: "grafana"
grafana_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}grafana{% endif %}"
grafana_database_address: "{{ database_address }}:{{ database_port }}"
####################
# Datasource
####################
grafana_data_sources:
influxdb:
enabled: "{{ enable_influxdb | bool }}"
data:
isDefault: yes
database: "telegraf"
name: "telegraf"
type: "influxdb"
url: "{{ internal_protocol }}://{{ kolla_internal_vip_address }}:{{ influxdb_http_port }}"
access: "proxy"
basicAuth: false
elasticsearch:
enabled: "{{ enable_elasticsearch | bool }}"
data:
name: "elasticsearch"
type: "elasticsearch"
access: "proxy"
url: "{{ internal_protocol }}://{{ kolla_internal_vip_address }}:{{ elasticsearch_port }}"
database: "flog-*"
jsonData:
esVersion: 5
timeField: "@timestamp"
##########
# Grafana
##########
grafana_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-grafana"
grafana_tag: "{{ openstack_release }}"
grafana_image_full: "{{ grafana_image }}:{{ grafana_tag }}"
grafana_admin_username: "admin"
grafana_dimensions: "{{ default_container_dimensions }}"