By default, Ansible injects a variable for every fact, prefixed with ansible_. This can result in a large number of variables for each host, which at scale can incur a performance penalty. Ansible provides a configuration option [0] that can be set to False to prevent this injection of facts. In this case, facts should be referenced via ansible_facts.<fact>. This change updates all references to Ansible facts within Kolla Ansible from using individual fact variables to using the items in the ansible_facts dictionary. This allows users to disable fact variable injection in their Ansible configuration, which may provide some performance improvement. This change disables fact variable injection in the ansible configuration used in CI, to catch any attempts to use the injected variables. [0] https://docs.ansible.com/ansible/latest/reference_appendices/config.html#inject-facts-as-vars Change-Id: I7e9d5c9b8b9164d4aee3abb4e37c8f28d98ff5d1 Partially-Implements: blueprint performance-improvements
132 lines
5.7 KiB
YAML
132 lines
5.7 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 }}"
|
|
healthcheck: "{{ elasticsearch_healthcheck }}"
|
|
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
|
|
####################
|
|
|
|
# Register Elasticsearch internal endpoint in the Keystone service catalogue
|
|
elasticsearch_enable_keystone_registration: False
|
|
|
|
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
|
|
|
|
####################
|
|
# Keystone
|
|
####################
|
|
elasticsearch_openstack_auth: "{{ openstack_auth }}"
|
|
|
|
elasticsearch_ks_services:
|
|
- name: "elasticsearch"
|
|
type: "log-storage"
|
|
description: "Elasticsearch"
|
|
endpoints:
|
|
- {'interface': 'internal', 'url': '{{ elasticsearch_internal_endpoint }}'}
|
|
|
|
####################
|
|
# 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_enable_healthchecks: "{{ enable_container_healthchecks }}"
|
|
elasticsearch_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
|
|
elasticsearch_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
|
|
elasticsearch_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
|
|
elasticsearch_healthcheck_test: ["CMD-SHELL", "healthcheck_curl http://{{ api_interface_address | put_address_in_context('url') }}:{{ elasticsearch_port }}"]
|
|
elasticsearch_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
|
|
elasticsearch_healthcheck:
|
|
interval: "{{ elasticsearch_healthcheck_interval }}"
|
|
retries: "{{ elasticsearch_healthcheck_retries }}"
|
|
start_period: "{{ elasticsearch_healthcheck_start_period }}"
|
|
test: "{% if elasticsearch_enable_healthchecks | bool %}{{ elasticsearch_healthcheck_test }}{% else %}NONE{% endif %}"
|
|
timeout: "{{ elasticsearch_healthcheck_timeout }}"
|
|
|
|
elasticsearch_default_volumes:
|
|
- "{{ node_config_directory }}/elasticsearch/:{{ container_config_directory }}/"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.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_facts.os_family == 'Debian' else '' }}"
|
|
- "kolla_logs:/var/log/kolla"
|
|
|
|
elasticsearch_extra_volumes: "{{ default_extra_volumes }}"
|
|
elasticsearch_curator_extra_volumes: "{{ default_extra_volumes }}"
|