charm-openstack-dashboard/templates/haproxy.cfg
Alex Kavanagh eca37a1dad Update charm to PY3 only code
This change upgrades the charm to PY3 only mode.
Note the changes to charm-helpers has also been made to support
Apache auditing code in PY3.

Change-Id: Idd347de5818ec57cb05f38170fe0d6536157a0da
2018-10-02 12:11:08 +01:00

59 lines
1.3 KiB
INI

global
log {{ local_host }} local0
log {{ local_host }} local1 notice
maxconn 20000
user haproxy
group haproxy
spread-checks 0
defaults
log global
mode tcp
option tcplog
option dontlognull
retries 3
{%- if haproxy_queue_timeout %}
timeout queue {{ haproxy_queue_timeout }}
{%- else %}
timeout queue 5000
{%- endif %}
{%- if haproxy_connect_timeout %}
timeout connect {{ haproxy_connect_timeout }}
{%- else %}
timeout connect 5000
{%- endif %}
{%- if haproxy_client_timeout %}
timeout client {{ haproxy_client_timeout }}
{%- else %}
timeout client 30000
{%- endif %}
{%- if haproxy_server_timeout %}
timeout server {{ haproxy_server_timeout }}
{%- else %}
timeout server 30000
{%- endif %}
listen stats
bind {{ local_host }}:{{ stat_port }}
mode http
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
stats auth admin:{{ stat_password }}
{% if units %}
{% for service, ports in service_ports.items() -%}
listen {{ service }}
bind *:{{ ports[0] }}
{% if prefer_ipv6 -%}
bind :::{{ ports[0] }}
{%- endif %}
balance source
option tcplog
{% for unit, address in units.items() -%}
server {{ unit }} {{ address }}:{{ ports[1] }} check
{% endfor %}
{% endfor %}
{% endif %}