Update haproxy template and temporarily point at fork of charms.openstack
This commit is contained in:
parent
36230b4d7d
commit
fee6b90f50
|
@ -1,6 +1,6 @@
|
|||
global
|
||||
log {{ local_host }} local0
|
||||
log {{ local_host }} local1 notice
|
||||
log {{ options.local_host }} local0
|
||||
log {{ options.local_host }} local1 notice
|
||||
maxconn 20000
|
||||
user haproxy
|
||||
group haproxy
|
||||
|
@ -12,52 +12,52 @@ defaults
|
|||
option tcplog
|
||||
option dontlognull
|
||||
retries 3
|
||||
{%- if haproxy_queue_timeout %}
|
||||
timeout queue {{ haproxy_queue_timeout }}
|
||||
{%- if options.haproxy_queue_timeout %}
|
||||
timeout queue {{ options.haproxy_queue_timeout }}
|
||||
{%- else %}
|
||||
timeout queue 5000
|
||||
{%- endif %}
|
||||
{%- if haproxy_connect_timeout %}
|
||||
timeout connect {{ haproxy_connect_timeout }}
|
||||
{%- if options.haproxy_connect_timeout %}
|
||||
timeout connect {{ options.haproxy_connect_timeout }}
|
||||
{%- else %}
|
||||
timeout connect 5000
|
||||
{%- endif %}
|
||||
{%- if haproxy_client_timeout %}
|
||||
timeout client {{ haproxy_client_timeout }}
|
||||
{%- if options.haproxy_client_timeout %}
|
||||
timeout client {{ options.haproxy_client_timeout }}
|
||||
{%- else %}
|
||||
timeout client 30000
|
||||
{%- endif %}
|
||||
{%- if haproxy_server_timeout %}
|
||||
timeout server {{ haproxy_server_timeout }}
|
||||
{%- if options.haproxy_server_timeout %}
|
||||
timeout server {{ options.haproxy_server_timeout }}
|
||||
{%- else %}
|
||||
timeout server 30000
|
||||
{%- endif %}
|
||||
|
||||
listen stats {{ stat_port }}
|
||||
listen stats {{ options.stat_port }}
|
||||
mode http
|
||||
stats enable
|
||||
stats hide-version
|
||||
stats realm Haproxy\ Statistics
|
||||
stats uri /
|
||||
stats auth admin:password
|
||||
stats auth admin:{{ options.haproxy_stat_password }}
|
||||
|
||||
{% if frontends -%}
|
||||
{% for service, ports in service_ports.items() -%}
|
||||
{% if cluster.cluster_hosts -%}
|
||||
{% for service, ports in options.service_ports.items() -%}
|
||||
frontend tcp-in_{{ service }}
|
||||
bind *:{{ ports[0] }}
|
||||
{% if ipv6 -%}
|
||||
bind :::{{ ports[0] }}
|
||||
{% endif -%}
|
||||
{% for frontend in frontends -%}
|
||||
acl net_{{ frontend }} dst {{ frontends[frontend]['network'] }}
|
||||
{% for frontend in cluster.cluster_hosts -%}
|
||||
acl net_{{ frontend }} dst {{ cluster.cluster_hosts[frontend]['network'] }}
|
||||
use_backend {{ service }}_{{ frontend }} if net_{{ frontend }}
|
||||
{% endfor -%}
|
||||
default_backend {{ service }}_{{ default_backend }}
|
||||
default_backend {{ service }}_{{ options.local_address }}
|
||||
|
||||
{% for frontend in frontends -%}
|
||||
{% for frontend in cluster.cluster_hosts -%}
|
||||
backend {{ service }}_{{ frontend }}
|
||||
balance leastconn
|
||||
{% for unit, address in frontends[frontend]['backends'].items() -%}
|
||||
{% for unit, address in cluster.cluster_hosts[frontend]['backends'].items() -%}
|
||||
server {{ unit }} {{ address }}:{{ ports[1] }} check
|
||||
{% endfor %}
|
||||
{% endfor -%}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
netifaces>=0.10.4
|
||||
#charms_openstack
|
||||
git+https://github.com/openstack-charmers/charms.openstack.git#egg=charms.openstack
|
||||
git+https://github.com/gnuoy/charms.openstack.git@feature/ha-support#egg=charms.openstack
|
||||
|
|
Loading…
Reference in New Issue