Merge "Remove spurious for loop from post deploy j2"
[apex-tripleo-heat-templates.git] / puppet / services / pacemaker.yaml
1 heat_template_version: ocata
2
3 description: >
4   Pacemaker 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   MonitoringSubscriptionPacemaker:
22     default: 'overcloud-pacemaker'
23     type: string
24   CorosyncIPv6:
25     default: false
26     description: Enable IPv6 in Corosync
27     type: boolean
28   EnableFencing:
29     default: false
30     description: Whether to enable fencing in Pacemaker or not.
31     type: boolean
32   PacemakerRemoteAuthkey:
33     type: string
34     description: The authkey for the pacemaker remote service.
35     hidden: true
36     default: ''
37   PcsdPassword:
38     type: string
39     description: The password for the 'pcsd' user for pacemaker.
40     hidden: true
41     default: ''
42   FencingConfig:
43     default: {}
44     description: |
45       Pacemaker fencing configuration. The JSON should have
46       the following structure:
47         {
48           "devices": [
49             {
50               "agent": "AGENT_NAME",
51               "host_mac": "HOST_MAC_ADDRESS",
52               "params": {"PARAM_NAME": "PARAM_VALUE"}
53             }
54           ]
55         }
56       For instance:
57         {
58           "devices": [
59             {
60               "agent": "fence_xvm",
61               "host_mac": "52:54:00:aa:bb:cc",
62               "params": {
63                 "multicast_address": "225.0.0.12",
64                 "port": "baremetal_0",
65                 "manage_fw": true,
66                 "manage_key_file": true,
67                 "key_file": "/etc/fence_xvm.key",
68                 "key_file_password": "abcdef"
69               }
70             }
71           ]
72         }
73     type: json
74   PacemakerLoggingSource:
75     type: json
76     default:
77       tag: system.pacemaker
78       path: /var/log/pacemaker.log,/var/log/cluster/corosync.log
79       format: >-
80         /^(?<time>[^ ]*\s*[^ ]* [^ ]*)
81         \[(?<pid>[^ ]*)\]
82         (?<host>[^ ]*)
83         (?<message>.*)$/
84
85 outputs:
86   role_data:
87     description: Role data for the Pacemaker role.
88     value:
89       service_name: pacemaker
90       monitoring_subscription: {get_param: MonitoringSubscriptionPacemaker}
91       logging_groups:
92         - haclient
93       logging_source: {get_param: PacemakerLoggingSource}
94       config_settings:
95         pacemaker::corosync::cluster_name: 'tripleo_cluster'
96         pacemaker::corosync::manage_fw: false
97         pacemaker::resource_defaults::defaults:
98           resource-stickiness: { value: INFINITY }
99         corosync_token_timeout: 10000
100         tripleo.pacemaker.firewall_rules:
101           '130 pacemaker tcp':
102             proto: 'tcp'
103             dport:
104               - 2224
105               - 3121
106               - 21064
107           '131 pacemaker udp':
108             proto: 'udp'
109             dport: 5405
110         corosync_ipv6: {get_param: CorosyncIPv6}
111         tripleo::fencing::config: {get_param: FencingConfig}
112         enable_fencing: {get_param: EnableFencing}
113         hacluster_pwd:
114           yaql:
115             expression: $.data.passwords.where($ != '').first()
116             data:
117               passwords:
118                 - {get_param: PcsdPassword}
119                 - {get_param: [DefaultPasswords, pcsd_password]}
120         tripleo::profile::base::pacemaker::remote_authkey: {get_param: PacemakerRemoteAuthkey}
121       step_config: |
122         include ::tripleo::profile::base::pacemaker