a310fa3e850e3b922336d92378999ddd0480d621
[fuel.git] / mcp / salt-formulas / salt-formula-opendaylight / metadata / service / server / cluster.yml
1 ##############################################################################
2 # Copyright (c) 2018 Mirantis Inc. and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 ---
9 applications:
10   - opendaylight
11 classes:
12   - service.keepalived.cluster.single
13   - service.haproxy.proxy.single
14 parameters:
15   _param:
16     opendaylight_version: fluorine
17     keepalived_vip_virtual_router_id: 199
18     keepalived_vip_address: ${_param:opendaylight_service_host}
19     keepalived_vip_password: ${_param:opnfv_main_password}
20     keepalived_vip_interface: ${_param:single_nic}
21     haproxy_odl_api_check_params: check inter 20s fastinter 2s
22   opendaylight:
23     server:
24       enabled: 'True'
25       version: ${_param:opendaylight_version}
26       repo: 'odl-team/${_param:opendaylight_version}'
27       cluster_enabled: true
28       logging:
29         engine: syslog
30   keepalived:
31     cluster:
32       vrrp_scripts:
33         check_pidof:
34           args: haproxy
35           interval: 20
36           rise: 3
37           fall: 1
38       instance:
39         VIP:
40           track_script: check_pidof
41   haproxy:
42     proxy:
43       listen:
44         opendaylight_api:
45           type: general-service
46           balance: source
47           binds:
48             - address: ${_param:opendaylight_service_host}
49               port: ${_param:opendaylight_rest_port}
50           servers:
51             - name: ${_param:opendaylight_server_node01_hostname}
52               host: ${_param:opendaylight_server_node01_address}
53               port: ${_param:opendaylight_rest_port}
54               params: ${_param:haproxy_odl_api_check_params}
55             - name: ${_param:opendaylight_server_node02_hostname}
56               host: ${_param:opendaylight_server_node02_address}
57               port: ${_param:opendaylight_rest_port}
58               params: ${_param:haproxy_odl_api_check_params}
59             - name: ${_param:opendaylight_server_node03_hostname}
60               host: ${_param:opendaylight_server_node03_address}
61               port: ${_param:opendaylight_rest_port}
62               params: ${_param:haproxy_odl_api_check_params}