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