
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
94 lines
3.7 KiB
YAML
94 lines
3.7 KiB
YAML
---
|
|
project_name: "haproxy"
|
|
|
|
haproxy_services:
|
|
haproxy:
|
|
container_name: haproxy
|
|
group: haproxy
|
|
enabled: true
|
|
image: "{{ haproxy_image_full }}"
|
|
privileged: True
|
|
volumes: "{{ haproxy_default_volumes + haproxy_extra_volumes }}"
|
|
dimensions: "{{ haproxy_dimensions }}"
|
|
healthcheck: "{{ haproxy_healthcheck }}"
|
|
keepalived:
|
|
container_name: keepalived
|
|
group: haproxy
|
|
enabled: "{{ enable_keepalived | bool }}"
|
|
image: "{{ keepalived_image_full }}"
|
|
privileged: True
|
|
volumes: "{{ keepalived_default_volumes + keepalived_extra_volumes }}"
|
|
dimensions: "{{ keepalived_dimensions }}"
|
|
|
|
|
|
####################
|
|
# Docker
|
|
####################
|
|
keepalived_install_type: "{{ kolla_install_type }}"
|
|
keepalived_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ keepalived_install_type }}-keepalived"
|
|
keepalived_tag: "{{ openstack_tag }}"
|
|
keepalived_image_full: "{{ keepalived_image }}:{{ keepalived_tag }}"
|
|
|
|
haproxy_install_type: "{{ kolla_install_type }}"
|
|
haproxy_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ haproxy_install_type }}-haproxy"
|
|
haproxy_tag: "{{ openstack_tag }}"
|
|
haproxy_image_full: "{{ haproxy_image }}:{{ haproxy_tag }}"
|
|
|
|
syslog_server: "{{ api_interface_address }}"
|
|
syslog_haproxy_facility: "local1"
|
|
|
|
# Traffic mode. Valid options are [ multicast, unicast ]
|
|
keepalived_traffic_mode: "multicast"
|
|
|
|
# Extended global configuration, optimization options.
|
|
haproxy_max_connections: 40000
|
|
haproxy_processes: 1
|
|
haproxy_process_cpu_map: "no"
|
|
# Matches the mariadb 10000 max connections limit
|
|
haproxy_defaults_max_connections: 10000
|
|
|
|
haproxy_dimensions: "{{ default_container_dimensions }}"
|
|
keepalived_dimensions: "{{ default_container_dimensions }}"
|
|
|
|
haproxy_enable_healthchecks: "{{ enable_container_healthchecks }}"
|
|
haproxy_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
|
|
haproxy_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
|
|
haproxy_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
|
|
haproxy_healthcheck_test: ["CMD-SHELL", "healthcheck_curl http://{{ api_interface_address | put_address_in_context('url') }}:{{ haproxy_monitor_port }}"]
|
|
haproxy_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
|
|
haproxy_healthcheck:
|
|
interval: "{{ haproxy_healthcheck_interval }}"
|
|
retries: "{{ haproxy_healthcheck_retries }}"
|
|
start_period: "{{ haproxy_healthcheck_start_period }}"
|
|
test: "{% if haproxy_enable_healthchecks | bool %}{{ haproxy_healthcheck_test }}{% else %}NONE{% endif %}"
|
|
timeout: "{{ haproxy_healthcheck_timeout }}"
|
|
|
|
haproxy_default_volumes:
|
|
- "{{ node_config_directory }}/haproxy/:{{ container_config_directory }}/:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
|
|
- "haproxy_socket:/var/lib/kolla/haproxy/"
|
|
keepalived_default_volumes:
|
|
- "{{ node_config_directory }}/keepalived/:{{ container_config_directory }}/:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
|
|
- "/lib/modules:/lib/modules:ro"
|
|
- "haproxy_socket:/var/lib/kolla/haproxy/"
|
|
|
|
haproxy_extra_volumes: "{{ default_extra_volumes }}"
|
|
keepalived_extra_volumes: "{{ default_extra_volumes }}"
|
|
|
|
# Default timeout values
|
|
haproxy_http_request_timeout: "10s"
|
|
haproxy_http_keep_alive_timeout: "10s"
|
|
haproxy_queue_timeout: "1m"
|
|
haproxy_connect_timeout: "10s"
|
|
haproxy_client_timeout: "1m"
|
|
haproxy_server_timeout: "1m"
|
|
haproxy_check_timeout: "10s"
|
|
|
|
# Check http://www.haproxy.org/download/1.5/doc/configuration.txt for available options
|
|
haproxy_defaults_balance: "roundrobin"
|
|
|
|
kolla_externally_managed_cert: False
|