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