Change flat network name for nosdn fdio scenario
[apex-tripleo-heat-templates.git] / puppet / services / keepalived.yaml
1 heat_template_version: pike
2
3 description: >
4   Keepalived service configured with Puppet
5
6 parameters:
7   ServiceData:
8     default: {}
9     description: Dictionary packing service data
10     type: json
11   ServiceNetMap:
12     default: {}
13     description: Mapping of service_name -> network name. Typically set
14                  via parameter_defaults in the resource registry.  This
15                  mapping overrides those in ServiceNetMapDefaults.
16     type: json
17   DefaultPasswords:
18     default: {}
19     type: json
20   RoleName:
21     default: ''
22     description: Role name on which the service is applied
23     type: string
24   RoleParameters:
25     default: {}
26     description: Parameters specific to the role
27     type: json
28   EndpointMap:
29     default: {}
30     description: Mapping of service endpoint -> protocol. Typically set
31                  via parameter_defaults in the resource registry.
32     type: json
33   ControlVirtualInterface:
34     default: ''
35     description: >
36         Interface where virtual ip will be assigned.  This value will be
37         automatically set by the deployment tool.  Overriding here will
38         override automatic setting.
39     type: string
40   PublicVirtualInterface:
41     default: ''
42     description: >
43         Interface where virtual ip will be assigned.  This value will be
44         automatically set by the deployment tool.  Overriding here will
45         override automatic setting.
46     type: string
47   MonitoringSubscriptionKeepalived:
48     default: 'overcloud-keepalived'
49     type: string
50
51 conditions:
52
53   control_iface_empty: {equals : [{get_param: ControlVirtualInterface}, '']}
54   public_iface_empty: {equals : [{get_param: PublicVirtualInterface}, '']}
55
56 outputs:
57   role_data:
58     description: Role data for the Keepalived role.
59     value:
60       service_name: keepalived
61       monitoring_subscription: {get_param: MonitoringSubscriptionKeepalived}
62       config_settings:
63         map_merge:
64         - tripleo.keepalived.firewall_rules:
65             '106 keepalived vrrp':
66               proto: vrrp
67         -
68           if:
69           - control_iface_empty
70           - {}
71           - tripleo::keepalived::control_virtual_interface: {get_param: ControlVirtualInterface}
72         -
73           if:
74           - public_iface_empty
75           - {}
76           - tripleo::keepalived::public_virtual_interface: {get_param: PublicVirtualInterface}
77       step_config: |
78         include ::tripleo::profile::base::keepalived
79       upgrade_tasks:
80         - name: Stop keepalived service
81           tags: step1
82           service: name=keepalived state=stopped
83         - name: Start keepalived service
84           tags: step4 # Needed at step 4 for mysql
85           service: name=keepalived state=started
86