From 55baaadf3ee21bf5769ee791533b66d28f9455ef Mon Sep 17 00:00:00 2001 From: "chenshuai@huawei.com" Date: Tue, 29 Dec 2015 17:27:25 +0800 Subject: bugfix: opencontrail add force parameter for apt-get install JIRA: COMPASS-227 Change-Id: I4e9ae9dfed29f6d58c9200d21f09cf2a71961ca1 Signed-off-by: chenshuai@huawei.com --- .../templates/provision/haproxy-contrail-cfg.j2 | 69 ++++++++++++++-------- 1 file changed, 45 insertions(+), 24 deletions(-) (limited to 'deploy/adapters/ansible/roles/open-contrail/templates/provision/haproxy-contrail-cfg.j2') diff --git a/deploy/adapters/ansible/roles/open-contrail/templates/provision/haproxy-contrail-cfg.j2 b/deploy/adapters/ansible/roles/open-contrail/templates/provision/haproxy-contrail-cfg.j2 index e99917bd..d7691b6b 100755 --- a/deploy/adapters/ansible/roles/open-contrail/templates/provision/haproxy-contrail-cfg.j2 +++ b/deploy/adapters/ansible/roles/open-contrail/templates/provision/haproxy-contrail-cfg.j2 @@ -1,57 +1,78 @@ #contrail-marker-start listen contrail-stats - bind *:5937 +# bind *:5937 + bind {{ internal_vip.ip }}:5937 + bind {{ public_vip.ip }}:5937 mode http stats enable stats uri / stats auth haproxy:contrail123 -listen neutron-server - bind *:9696 - balance roundrobin - option nolinger -{% for cur_host in groups['opencontrail_config'] %} server {{ hostvars[cur_host]['ansible_' + internal_nic].ipv4.address }} {{ hostvars[cur_host]['ansible_' + internal_nic].ipv4.address }}:9697 check inter 2000 rise 2 fall 3 -{% endfor %} +# compass has bind neutron-server +#listen neutron-server +# bind *:9696 +# balance roundrobin +# option nolinger +#{% for host,ip in haproxy_hosts.items() %} +# server {{ host }} {{ ip }}:9697 weight 1 check inter 2000 rise 2 fall 3 +#{% endfor %} + + listen contrail-api - bind *:8082 +# bind *:8082 + bind {{ internal_vip.ip }}:8082 + bind {{ public_vip.ip }}:8082 balance roundrobin option nolinger timeout client 3m timeout server 3m -{% for cur_host in groups['opencontrail_config'] %} server {{ hostvars[cur_host]['ansible_' + internal_nic].ipv4.address }} {{ hostvars[cur_host]['ansible_' + internal_nic].ipv4.address }}:9100 check inter 2000 rise 2 fall 3 +{% for host,ip in haproxy_hosts.items() %} + server {{ host }} {{ ip }}:9100 weight 1 check inter 2000 rise 2 fall 3 {% endfor %} + + listen contrail-discovery - bind *:5998 +# bind *:5998 + bind {{ internal_vip.ip }}:5998 + bind {{ public_vip.ip }}:5998 balance roundrobin option nolinger -{% for cur_host in groups['opencontrail_config'] %} server {{ hostvars[cur_host]['ansible_' + internal_nic].ipv4.address }} {{ hostvars[cur_host]['ansible_' + internal_nic].ipv4.address }}:9110 check inter 2000 rise 2 fall 3 +{% for host,ip in haproxy_hosts.items() %} + server {{ host }} {{ ip }}:9110 weight 1 check inter 2000 rise 2 fall 3 {% endfor %} + + listen contrail-analytics-api - bind *:8081 +# bind *:8081 + bind {{ internal_vip.ip }}:8081 + bind {{ public_vip.ip }}:8081 balance roundrobin option nolinger option tcp-check tcp-check connect port 6379 default-server error-limit 1 on-error mark-down -{% for cur_host in groups['opencontrail_collector'] %} server {{ hostvars[cur_host]['ansible_' + internal_nic].ipv4.address }} {{ hostvars[cur_host]['ansible_' + internal_nic].ipv4.address }}:9081 check inter 2000 rise 2 fall 3 +{% for host,ip in haproxy_hosts.items() %} + server {{ host }} {{ ip }}:9081 weight 1 check inter 2000 rise 2 fall 5 {% endfor %} -listen rabbitmq - bind *:5673 - mode tcp - balance roundrobin - maxconn 10000 - option tcplog - option tcpka - option redispatch - timeout client 48h - timeout server 48h -{% for cur_host in groups['opencontrail_config'] %} server {{ hostvars[cur_host]['ansible_' + internal_nic].ipv4.address }} {{ hostvars[cur_host]['ansible_' + internal_nic].ipv4.address }}:5672 check inter 2000 rise 2 fall 3 weight 1 maxconn 500 +# compass doesn't use ha for rabbitmq, but use cluster mode +#listen rabbitmq +# bind *:5673 +# mode tcp +# balance roundrobin +# maxconn 10000 +# option tcplog +# option tcpka +# option redispatch +# timeout client 48h +# timeout server 48h +{% for host,ip in haproxy_hosts.items() %} + server {{ host }} {{ ip }}:5672 weight 1 check inter 2000 rise 2 fall 5 {% endfor %} #contrail-marker-end -- cgit 1.2.3-korg