Skip to content

Commit

Permalink
barbican support in liberty - fab changes
Browse files Browse the repository at this point in the history
Partial-Bug: #1572849

Change-Id: I9f16d0725bb2efcabca6aa71fcfd0dd76565460a
  • Loading branch information
Amudha committed Apr 25, 2016
1 parent 8b973cb commit 1583217
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
5 changes: 5 additions & 0 deletions fabfile/tasks/ha.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ def fixup_restart_haproxy_in_openstack_node(*args):
memcached_server_lines = ''
rabbitmq_server_lines = ''
mysql_server_lines = ''
barbican_server_lines = ''
space = ' ' * 3

for host_string in env.roledefs['openstack']:
Expand Down Expand Up @@ -461,6 +462,9 @@ def fixup_restart_haproxy_in_openstack_node(*args):
nova_vnc_server_lines +=\
'%s server %s %s:6999 check inter 2000 rise 2 fall 3\n'\
% (space, mgmt_host_ip, mgmt_host_ip)
barbican_server_lines +=\
'%s server %s %s:9322 check inter 2000 rise 2 fall 1\n'\
% (space, host_ip, host_ip)
if server_index <= 2:
memcached_server_lines +=\
'%s server repcache%s %s:11211 check inter 2000 rise 2 fall 3\n'\
Expand Down Expand Up @@ -493,6 +497,7 @@ def fixup_restart_haproxy_in_openstack_node(*args):
'__nova_api_backend_servers__' : nova_api_server_lines,
'__nova_meta_backend_servers__' : nova_meta_server_lines,
'__nova_vnc_backend_servers__' : nova_vnc_server_lines,
'__barbican_backend_servers__' : barbican_server_lines,
'__memcached_servers__' : memcached_server_lines,
'__rabbitmq_servers__' : rabbitmq_server_lines,
'__mysql_servers__' : mysql_server_lines,
Expand Down
2 changes: 1 addition & 1 deletion fabfile/tasks/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def add_reserved_ports_node(ports, *args):
@roles('openstack')
def add_openstack_reserved_ports():
if env.roledefs['openstack']:
ports = '35357,35358,33306'
ports = '35357,35358,33306,9322'
execute('add_reserved_ports_node', ports, env.host_string)


Expand Down
26 changes: 26 additions & 0 deletions fabfile/templates/openstack_haproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,32 @@
balance roundrobin
$__nova_vnc_backend_servers__
frontend openstack-barbican *: 9311
default_backend barbican-backend
backend barbican-backend
option tcpka
option nolinger
timeout server 24h
balance roundrobin
option tcp-check
tcp-check connect port 3306
default-server error-limit 1 on-error mark-down
option tcp-check
option httpchk
tcp-check connect port 3337
tcp-check send Host:localhost
http-check expect ! rstatus ^5
default-server error-limit 1 on-error mark-down
option tcp-check
tcp-check connect port 6000
default-server error-limit 1 on-error mark-down
$__barbican_backend_servers__
listen memcached 0.0.0.0:11222
mode tcp
balance roundrobin
Expand Down

0 comments on commit 1583217

Please sign in to comment.