ade5bfa302
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
52 lines
2.5 KiB
YAML
52 lines
2.5 KiB
YAML
---
|
|
project_name: "etcd"
|
|
|
|
etcd_services:
|
|
etcd:
|
|
container_name: etcd
|
|
group: etcd
|
|
enabled: true
|
|
environment:
|
|
ETCD_DATA_DIR: "/var/lib/etcd"
|
|
ETCD_NAME: "{{ ansible_facts.hostname }}"
|
|
ETCD_ADVERTISE_CLIENT_URLS: "{{ etcd_client_internal_endpoint }}"
|
|
ETCD_LISTEN_CLIENT_URLS: "{{ etcd_client_internal_endpoint }}"
|
|
ETCD_INITIAL_ADVERTISE_PEER_URLS: "{{ etcd_peer_internal_endpoint }}"
|
|
ETCD_LISTEN_PEER_URLS: "{{ etcd_peer_internal_endpoint }}"
|
|
ETCD_INITIAL_CLUSTER_TOKEN: "{{ etcd_cluster_token }}"
|
|
ETCD_INITIAL_CLUSTER: "{% for host in groups['etcd'] %}{{ hostvars[host].ansible_facts.hostname }}={{ etcd_protocol }}://{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ etcd_peer_port }}{% if not loop.last %},{% endif %}{% endfor %}"
|
|
ETCD_INITIAL_CLUSTER_STATE: "new"
|
|
ETCD_OUT_FILE: "/var/log/kolla/etcd/etcd.log"
|
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
|
ETCD_CERT_FILE: "{% if etcd_enable_tls | bool %}/etc/etcd/certs/etcd-cert.pem{% endif %}"
|
|
ETCD_KEY_FILE: "{% if etcd_enable_tls | bool %}/etc/etcd/certs/etcd-key.pem{% endif %}"
|
|
ETCD_PEER_CERT_FILE: "{% if etcd_enable_tls | bool %}/etc/etcd/certs/etcd-cert.pem{% endif %}"
|
|
ETCD_PEER_KEY_FILE: "{% if etcd_enable_tls | bool %}/etc/etcd/certs/etcd-key.pem{% endif %}"
|
|
image: "{{ etcd_image_full }}"
|
|
volumes: "{{ etcd_default_volumes + etcd_extra_volumes }}"
|
|
dimensions: "{{ etcd_dimensions }}"
|
|
|
|
|
|
####################
|
|
# Docker
|
|
####################
|
|
etcd_install_type: "{{ kolla_install_type }}"
|
|
etcd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ etcd_install_type }}-etcd"
|
|
etcd_tag: "{{ openstack_tag }}"
|
|
etcd_image_full: "{{ etcd_image }}:{{ etcd_tag }}"
|
|
etcd_dimensions: "{{ default_container_dimensions }}"
|
|
|
|
etcd_default_volumes:
|
|
- "{{ node_config_directory }}/etcd/:{{ container_config_directory }}/:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
|
|
- "kolla_etcd:/var/lib/etcd/"
|
|
- "kolla_logs:/var/log/kolla/"
|
|
etcd_extra_volumes: "{{ default_extra_volumes }}"
|
|
|
|
############
|
|
# Endpoints
|
|
############
|
|
etcd_client_internal_endpoint: "{{ internal_protocol }}://{{ api_interface_address | put_address_in_context('url') }}:{{ etcd_client_port }}"
|
|
etcd_peer_internal_endpoint: "{{ internal_protocol }}://{{ api_interface_address | put_address_in_context('url') }}:{{ etcd_peer_port }}"
|