aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/ha/templates/haproxy.cfg')
-rw-r--r--deploy/adapters/ansible/roles/ha/templates/haproxy.cfg42
1 files changed, 36 insertions, 6 deletions
diff --git a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
index 6b91a248..edbd998d 100644
--- a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
+++ b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
@@ -25,6 +25,32 @@ defaults
timeout check 10s
retries 3
+listen proxy-mysql
+ bind {{ internal_vip.ip }}:3306
+ option tcpka
+ option tcplog
+ balance source
+{% for host, ip in haproxy_hosts.items() %}
+{% if loop.index == 1 %}
+ server {{ host }} {{ ip }}:3306 weight 1 check inter 2000 rise 2 fall 5
+{% else %}
+ server {{ host }} {{ ip }}:3306 weight 1 check inter 2000 rise 2 fall 5
+{% endif %}
+{% endfor %}
+
+listen proxy-rabbit
+ bind {{ internal_vip.ip }}:5672
+ bind {{ public_vip.ip }}:5672
+
+ option tcpka
+ option tcplog
+ timeout client 3h
+ timeout server 3h
+ balance source
+{% for host,ip in haproxy_hosts.items() %}
+ server {{ host }} {{ ip }}:5672 weight 1 check inter 2000 rise 2 fall 5
+{% endfor %}
+
listen proxy-glance_registry_cluster
bind {{ internal_vip.ip }}:9191
bind {{ public_vip.ip }}:9191
@@ -134,7 +160,7 @@ listen proxy-ceilometer_api_cluster
bind {{ internal_vip.ip }}:8777
bind {{ public_vip.ip }}:8777
mode tcp
- option httpchk
+ option tcp-check
option tcplog
balance source
{% for host,ip in haproxy_hosts.items() %}
@@ -143,12 +169,16 @@ listen proxy-ceilometer_api_cluster
listen proxy-dashboarad
bind {{ public_vip.ip }}:80
- option tcpka
- option httpchk
- option tcplog
- balance source
+ mode http
+ balance source
+ capture cookie vgnvisitor= len 32
+ cookie SERVERID insert indirect nocache
+ option forwardfor
+ option httpchk
+ option httpclose
+ rspidel ^Set-cookie:\ IP=
{% for host,ip in haproxy_hosts.items() %}
- server {{ host }} {{ ip }}:80 weight 1 check inter 2000 rise 2 fall 5
+ server {{ host }} {{ ip }}:80 cookie {{ host }} weight 1 check inter 2000 rise 2 fall 5
{% endfor %}
listen stats