This change allows a user to forward control plane logs directly to Elasticsearch from Fluentd, rather than via the Monasca Log API when Monasca is enabled. The Monasca Log API can continue to handle tenant logs. For many use cases this is simpler, reduces resource consumption and helps to decouple control plane logging services from tenant logging services. It may not always be desired, so is optional and off by default. Change-Id: I195e8e4b73ca8f573737355908eb30a3ef13b0d6
102 lines
4.3 KiB
YAML
102 lines
4.3 KiB
YAML
---
|
|
project_name: "elasticsearch"
|
|
|
|
elasticsearch_services:
|
|
elasticsearch:
|
|
container_name: elasticsearch
|
|
group: elasticsearch
|
|
enabled: true
|
|
image: "{{ elasticsearch_image_full }}"
|
|
environment:
|
|
ES_JAVA_OPTS: "{{ es_java_opts }}"
|
|
volumes: "{{ elasticsearch_default_volumes + elasticsearch_extra_volumes }}"
|
|
dimensions: "{{ elasticsearch_dimensions }}"
|
|
haproxy:
|
|
elasticsearch:
|
|
enabled: "{{ enable_elasticsearch }}"
|
|
mode: "http"
|
|
external: false
|
|
port: "{{ elasticsearch_port }}"
|
|
frontend_http_extra:
|
|
- "option dontlog-normal"
|
|
elasticsearch-curator:
|
|
container_name: elasticsearch_curator
|
|
group: elasticsearch-curator
|
|
enabled: "{{ enable_elasticsearch_curator }}"
|
|
image: "{{ elasticsearch_curator_image_full }}"
|
|
volumes: "{{ elasticsearch_curator_default_volumes + elasticsearch_curator_extra_volumes }}"
|
|
dimensions: "{{ elasticsearch_curator_dimensions }}"
|
|
|
|
|
|
####################
|
|
# Elasticsearch
|
|
####################
|
|
elasticsearch_cluster_name: "kolla_logging"
|
|
es_heap_size: "1g"
|
|
es_java_opts: "{% if es_heap_size %}-Xms{{ es_heap_size }} -Xmx{{ es_heap_size }}{%endif%}"
|
|
|
|
#######################
|
|
# Elasticsearch Curator
|
|
#######################
|
|
|
|
# Helper variable used to define the default hour Curator runs to avoid
|
|
# simultaneous runs in multinode deployments.
|
|
elasticsearch_curator_instance_id: "{{ groups['elasticsearch-curator'].index(inventory_hostname) }}"
|
|
|
|
# How frequently Curator runs.
|
|
# For multinode deployments of Curator you should ensure each node has
|
|
# a different schedule so that Curator does not run simultaneously on
|
|
# multiple nodes. Use hostvars or parameterize like in the default
|
|
# below.
|
|
# The default depends on Curator's id as defined above which dictates
|
|
# the daily hour the schedule runs (0, 1, etc.).
|
|
elasticsearch_curator_cron_schedule: "0 {{ elasticsearch_curator_instance_id }} * * *"
|
|
|
|
# When set to True, Curator will not modify Elasticsearch data, but
|
|
# will print what it *would* do to the Curator log file. This is a
|
|
# useful way of checking that Curator actions are working as expected.
|
|
elasticsearch_curator_dry_run: false
|
|
|
|
# Index prefix pattern. Any indices matching this regex will
|
|
# be managed by Curator.
|
|
elasticsearch_curator_index_pattern: "^{{ '(monasca|' + kibana_log_prefix + ')' if enable_monasca|bool else kibana_log_prefix }}-.*"
|
|
|
|
# Duration after which an index is staged for deletion. This is
|
|
# implemented by closing the index. Whilst in this state the index
|
|
# contributes negligible load on the cluster and may be manually
|
|
# re-opened if required.
|
|
elasticsearch_curator_soft_retention_period_days: 30
|
|
|
|
# Duration after which an index is permanently erased from the cluster.
|
|
elasticsearch_curator_hard_retention_period_days: 60
|
|
|
|
####################
|
|
# Docker
|
|
####################
|
|
elasticsearch_install_type: "{{ kolla_install_type }}"
|
|
elasticsearch_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ elasticsearch_install_type }}-elasticsearch"
|
|
elasticsearch_tag: "{{ openstack_tag }}"
|
|
elasticsearch_image_full: "{{ elasticsearch_image }}:{{ elasticsearch_tag }}"
|
|
|
|
elasticsearch_curator_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ elasticsearch_install_type }}-elasticsearch-curator"
|
|
elasticsearch_curator_tag: "{{ openstack_tag }}"
|
|
elasticsearch_curator_image_full: "{{ elasticsearch_curator_image }}:{{ elasticsearch_curator_tag }}"
|
|
|
|
elasticsearch_dimensions: "{{ default_container_dimensions }}"
|
|
elasticsearch_curator_dimensions: "{{ default_container_dimensions }}"
|
|
|
|
elasticsearch_default_volumes:
|
|
- "{{ node_config_directory }}/elasticsearch/:{{ container_config_directory }}/"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
|
|
- "{{ elasticsearch_datadir_volume }}:/var/lib/elasticsearch/data"
|
|
- "kolla_logs:/var/log/kolla/"
|
|
elasticsearch_curator_default_volumes:
|
|
- "{{ node_config_directory }}/elasticsearch-curator/:{{ container_config_directory }}/"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
|
|
- "kolla_logs:/var/log/kolla"
|
|
|
|
elasticsearch_extra_volumes: "{{ default_extra_volumes }}"
|
|
elasticsearch_curator_extra_volumes: "{{ default_extra_volumes }}"
|