f1c8136556
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
65 lines
2.1 KiB
YAML
65 lines
2.1 KiB
YAML
---
|
|
project_name: "haproxy"
|
|
|
|
haproxy_services:
|
|
haproxy:
|
|
container_name: haproxy
|
|
group: haproxy
|
|
enabled: true
|
|
image: "{{ haproxy_image_full }}"
|
|
privileged: True
|
|
volumes:
|
|
- "{{ node_config_directory }}/haproxy/:{{ container_config_directory }}/:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "haproxy_socket:/var/lib/kolla/haproxy/"
|
|
dimensions: "{{ haproxy_dimensions }}"
|
|
keepalived:
|
|
container_name: keepalived
|
|
group: haproxy
|
|
enabled: true
|
|
image: "{{ keepalived_image_full }}"
|
|
privileged: True
|
|
volumes:
|
|
- "{{ node_config_directory }}/keepalived/:{{ container_config_directory }}/:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "/lib/modules:/lib/modules:ro"
|
|
- "haproxy_socket:/var/lib/kolla/haproxy/"
|
|
dimensions: "{{ keepalived_dimensions }}"
|
|
|
|
|
|
####################
|
|
# Docker
|
|
####################
|
|
keepalived_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-keepalived"
|
|
keepalived_tag: "{{ openstack_release }}"
|
|
keepalived_image_full: "{{ keepalived_image }}:{{ keepalived_tag }}"
|
|
|
|
haproxy_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-haproxy"
|
|
haproxy_tag: "{{ openstack_release }}"
|
|
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: 4000
|
|
haproxy_processes: 1
|
|
haproxy_process_cpu_map: "no"
|
|
|
|
haproxy_dimensions: "{{ default_container_dimensions }}"
|
|
keepalived_dimensions: "{{ default_container_dimensions }}"
|
|
|
|
# Default timeout values
|
|
haproxy_http_request_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"
|