summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/ha/templates
diff options
context:
space:
mode:
authorshuai chen <chenshuai@huawei.com>2015-12-08 11:36:59 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-12-08 11:36:59 +0000
commit4947b112b86d7e4784af945509078f5ea1b757a0 (patch)
treecc09c1c2518711b27130640a3a79158a6259980d /deploy/adapters/ansible/roles/ha/templates
parent850a41b56643e5fb475f4a0f51bc787798802ec9 (diff)
parent86782f3e375274cb65dc0b0b7d48450e73e85df3 (diff)
Merge "database script refactor"
Diffstat (limited to 'deploy/adapters/ansible/roles/ha/templates')
-rw-r--r--deploy/adapters/ansible/roles/ha/templates/haproxy.cfg13
1 files changed, 13 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
index 6b91a248..3d76a5bc 100644
--- a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
+++ b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
@@ -25,6 +25,19 @@ 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-glance_registry_cluster
bind {{ internal_vip.ip }}:9191
bind {{ public_vip.ip }}:9191