summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/ha/templates
diff options
context:
space:
mode:
authorcarey.xu <carey.xuhan@huawei.com>2015-12-04 09:40:39 +0800
committercarey.xu <carey.xuhan@huawei.com>2015-12-04 11:17:50 +0800
commit86782f3e375274cb65dc0b0b7d48450e73e85df3 (patch)
tree1a1c09b4b7c98e62a3102494e62ef408c0e80822 /deploy/adapters/ansible/roles/ha/templates
parent5de09de80aac43e61ec411ad598e8cd915d9cadd (diff)
database script refactor
JIRA: COMPASS-176 Change-Id: I0f87903a94a8072af274d6d5dcf4dd5041f297e6 Signed-off-by: carey.xu <carey.xuhan@huawei.com>
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 c8065f05..7b401279 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 5
+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