summaryrefslogtreecommitdiffstats
path: root/mcp/salt-formulas
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2018-10-26 07:17:26 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-10-26 07:17:26 +0000
commit20e1bdabfe3be305ad55987dad140479e4eaa5a0 (patch)
tree84486da1042990b84835c3f7688abc1d99c51416 /mcp/salt-formulas
parent77a363ff192b806982eefa6cc5c91b24d2baa127 (diff)
parent6b8a6a91c230a495fd227d0115258adcef0ac264 (diff)
Merge "[ha] Add haproxy on opendaylight nodes"
Diffstat (limited to 'mcp/salt-formulas')
-rw-r--r--mcp/salt-formulas/salt-formula-opendaylight/metadata/service/server/cluster.yml35
1 files changed, 28 insertions, 7 deletions
diff --git a/mcp/salt-formulas/salt-formula-opendaylight/metadata/service/server/cluster.yml b/mcp/salt-formulas/salt-formula-opendaylight/metadata/service/server/cluster.yml
index 69e1d84fd..a310fa3e8 100644
--- a/mcp/salt-formulas/salt-formula-opendaylight/metadata/service/server/cluster.yml
+++ b/mcp/salt-formulas/salt-formula-opendaylight/metadata/service/server/cluster.yml
@@ -10,6 +10,7 @@ applications:
- opendaylight
classes:
- service.keepalived.cluster.single
+ - service.haproxy.proxy.single
parameters:
_param:
opendaylight_version: fluorine
@@ -17,6 +18,7 @@ parameters:
keepalived_vip_address: ${_param:opendaylight_service_host}
keepalived_vip_password: ${_param:opnfv_main_password}
keepalived_vip_interface: ${_param:single_nic}
+ haproxy_odl_api_check_params: check inter 20s fastinter 2s
opendaylight:
server:
enabled: 'True'
@@ -28,14 +30,33 @@ parameters:
keepalived:
cluster:
vrrp_scripts:
- check_port:
- args:
- - ${_param:opendaylight_rest_port}
- - TCP
- - 4
- interval: 15
+ check_pidof:
+ args: haproxy
+ interval: 20
rise: 3
fall: 1
instance:
VIP:
- track_script: check_port
+ track_script: check_pidof
+ haproxy:
+ proxy:
+ listen:
+ opendaylight_api:
+ type: general-service
+ balance: source
+ binds:
+ - address: ${_param:opendaylight_service_host}
+ port: ${_param:opendaylight_rest_port}
+ servers:
+ - name: ${_param:opendaylight_server_node01_hostname}
+ host: ${_param:opendaylight_server_node01_address}
+ port: ${_param:opendaylight_rest_port}
+ params: ${_param:haproxy_odl_api_check_params}
+ - name: ${_param:opendaylight_server_node02_hostname}
+ host: ${_param:opendaylight_server_node02_address}
+ port: ${_param:opendaylight_rest_port}
+ params: ${_param:haproxy_odl_api_check_params}
+ - name: ${_param:opendaylight_server_node03_hostname}
+ host: ${_param:opendaylight_server_node03_address}
+ port: ${_param:opendaylight_rest_port}
+ params: ${_param:haproxy_odl_api_check_params}