We don't need to set a default for the CephX keys and cluster FSID
[apex-tripleo-heat-templates.git] / puppet / all-nodes-config.yaml
1 heat_template_version: 2015-04-30
2 description: 'All Nodes Config for Puppet'
3
4 parameters:
5   compute_hosts:
6     type: comma_delimited_list
7   controller_hosts:
8     type: comma_delimited_list
9   controller_ips:
10     type: comma_delimited_list
11   block_storage_hosts:
12     type: comma_delimited_list
13   object_storage_hosts:
14     type: comma_delimited_list
15   ceph_storage_hosts:
16     type: comma_delimited_list
17   controller_names:
18     type: comma_delimited_list
19   rabbit_node_ips:
20     type: comma_delimited_list
21   mongo_node_ips:
22     type: comma_delimited_list
23   redis_node_ips:
24     type: comma_delimited_list
25   memcache_node_ips:
26     type: comma_delimited_list
27   mysql_node_ips:
28     type: comma_delimited_list
29   horizon_node_ips:
30     type: comma_delimited_list
31   heat_api_node_ips:
32     type: comma_delimited_list
33   swift_proxy_node_ips:
34     type: comma_delimited_list
35   ceilometer_api_node_ips:
36     type: comma_delimited_list
37   aodh_api_node_ips:
38     type: comma_delimited_list
39   nova_api_node_ips:
40     type: comma_delimited_list
41   nova_metadata_node_ips:
42     type: comma_delimited_list
43   glance_api_node_ips:
44     type: comma_delimited_list
45   glance_registry_node_ips:
46     type: comma_delimited_list
47   gnocchi_api_node_ips:
48     type: comma_delimited_list
49   cinder_api_node_ips:
50     type: comma_delimited_list
51   neutron_api_node_ips:
52     type: comma_delimited_list
53   keystone_public_api_node_ips:
54     type: comma_delimited_list
55   keystone_admin_api_node_ips:
56     type: comma_delimited_list
57   sahara_api_node_ips:
58     type: comma_delimited_list
59   ironic_api_node_ips:
60     type: comma_delimited_list
61   ceph_mon_node_ips:
62     type: comma_delimited_list
63   ceph_mon_node_names:
64     type: comma_delimited_list
65   DeployIdentifier:
66     type: string
67     description: >
68       Setting this to a unique value will re-run any deployment tasks which
69       perform configuration on a Heat stack-update.
70   UpdateIdentifier:
71     type: string
72     description: >
73       Setting to a previously unused value during stack-update will trigger
74       package update on all nodes
75   StackAction:
76     type: string
77     description: >
78       Heat action on performed top-level stack.
79     constraints:
80     - allowed_values: ['CREATE', 'UPDATE']
81
82 resources:
83
84   allNodesConfigImpl:
85     type: OS::Heat::StructuredConfig
86     properties:
87       group: os-apply-config
88       config:
89         hosts:
90           list_join:
91           - "\n"
92           - - list_join:
93               - "\n"
94               - {get_param: compute_hosts}
95             - list_join:
96               - "\n"
97               - {get_param: controller_hosts}
98             - list_join:
99               - "\n"
100               - {get_param: block_storage_hosts}
101             - list_join:
102               - "\n"
103               - {get_param: object_storage_hosts}
104             - list_join:
105               - "\n"
106               - {get_param: ceph_storage_hosts}
107         hiera:
108           datafiles:
109             RedHat:
110               raw_data: {get_file: hieradata/RedHat.yaml}
111             bootstrap_node:
112               mapped_data:
113                 bootstrap_nodeid: {get_input: bootstrap_nodeid}
114                 bootstrap_nodeid_ip: {get_input: bootstrap_nodeid_ip}
115             all_nodes:
116               mapped_data:
117                 controller_node_ips:
118                   list_join:
119                   - ','
120                   - {get_param: controller_ips}
121                 controller_node_names:
122                   list_join:
123                   - ','
124                   - {get_param: controller_names}
125                 galera_node_names:
126                   list_join:
127                   - ','
128                   - {get_param: controller_names}
129                 rabbit_node_ips: &rabbit_nodes_array
130                   str_replace:
131                     template: "['SERVERS_LIST']"
132                     params:
133                       SERVERS_LIST:
134                         list_join:
135                         - "','"
136                         - {get_param: rabbit_node_ips}
137                 mongo_node_ips:
138                   str_replace:
139                     template: "['SERVERS_LIST']"
140                     params:
141                       SERVERS_LIST:
142                         list_join:
143                         - "','"
144                         - {get_param: mongo_node_ips}
145                 redis_node_ips:
146                   str_replace:
147                     template: "['SERVERS_LIST']"
148                     params:
149                       SERVERS_LIST:
150                         list_join:
151                         - "','"
152                         - {get_param: redis_node_ips}
153                 memcache_node_ips:
154                   str_replace:
155                     template: "['SERVERS_LIST']"
156                     params:
157                       SERVERS_LIST:
158                         list_join:
159                         - "','"
160                         - {get_param: memcache_node_ips}
161                 memcache_node_ips_v6:
162                   str_replace:
163                     template: "['inet6:[SERVERS_LIST]']"
164                     params:
165                       SERVERS_LIST:
166                         list_join:
167                         - "]','inet6:["
168                         - {get_param: memcache_node_ips}
169                 mysql_node_ips:
170                   str_replace:
171                     template: "['SERVERS_LIST']"
172                     params:
173                       SERVERS_LIST:
174                         list_join:
175                         - "','"
176                         - {get_param: mysql_node_ips}
177                 horizon_node_ips:
178                   str_replace:
179                     template: "['SERVERS_LIST']"
180                     params:
181                       SERVERS_LIST:
182                         list_join:
183                         - "','"
184                         - {get_param: horizon_node_ips}
185                 heat_api_node_ips:
186                   str_replace:
187                     template: "['SERVERS_LIST']"
188                     params:
189                       SERVERS_LIST:
190                         list_join:
191                         - "','"
192                         - {get_param: heat_api_node_ips}
193                 swift_proxy_node_ips:
194                   str_replace:
195                     template: "['SERVERS_LIST']"
196                     params:
197                       SERVERS_LIST:
198                         list_join:
199                         - "','"
200                         - {get_param: swift_proxy_node_ips}
201                 ceilometer_api_node_ips:
202                   str_replace:
203                     template: "['SERVERS_LIST']"
204                     params:
205                       SERVERS_LIST:
206                         list_join:
207                         - "','"
208                         - {get_param: ceilometer_api_node_ips}
209                 aodh_api_node_ips:
210                   str_replace:
211                     template: "['SERVERS_LIST']"
212                     params:
213                       SERVERS_LIST:
214                         list_join:
215                         - "','"
216                         - {get_param: aodh_api_node_ips}
217                 gnocchi_api_node_ips:
218                   str_replace:
219                     template: "['SERVERS_LIST']"
220                     params:
221                       SERVERS_LIST:
222                         list_join:
223                         - "','"
224                         - {get_param: gnocchi_api_node_ips}
225                 nova_api_node_ips:
226                   str_replace:
227                     template: "['SERVERS_LIST']"
228                     params:
229                       SERVERS_LIST:
230                         list_join:
231                         - "','"
232                         - {get_param: nova_api_node_ips}
233                 nova_metadata_node_ips:
234                   str_replace:
235                     template: "['SERVERS_LIST']"
236                     params:
237                       SERVERS_LIST:
238                         list_join:
239                         - "','"
240                         - {get_param: nova_metadata_node_ips}
241                 glance_api_node_ips:
242                   str_replace:
243                     template: "['SERVERS_LIST']"
244                     params:
245                       SERVERS_LIST:
246                         list_join:
247                         - "','"
248                         - {get_param: glance_api_node_ips}
249                 glance_registry_node_ips:
250                   str_replace:
251                     template: "['SERVERS_LIST']"
252                     params:
253                       SERVERS_LIST:
254                         list_join:
255                         - "','"
256                         - {get_param: glance_registry_node_ips}
257                 cinder_api_node_ips:
258                   str_replace:
259                     template: "['SERVERS_LIST']"
260                     params:
261                       SERVERS_LIST:
262                         list_join:
263                         - "','"
264                         - {get_param: cinder_api_node_ips}
265                 neutron_api_node_ips:
266                   str_replace:
267                     template: "['SERVERS_LIST']"
268                     params:
269                       SERVERS_LIST:
270                         list_join:
271                         - "','"
272                         - {get_param: neutron_api_node_ips}
273                 # TODO: pass a `midonet_api_node_ips` var
274                 midonet_api_node_ips:
275                   str_replace:
276                     template: "['SERVERS_LIST']"
277                     params:
278                       SERVERS_LIST:
279                         list_join:
280                         - "','"
281                         - {get_param: neutron_api_node_ips}
282                 keystone_public_api_node_ips:
283                   str_replace:
284                     template: "['SERVERS_LIST']"
285                     params:
286                       SERVERS_LIST:
287                         list_join:
288                         - "','"
289                         - {get_param: keystone_public_api_node_ips}
290                 keystone_admin_api_node_ips:
291                   str_replace:
292                     template: "['SERVERS_LIST']"
293                     params:
294                       SERVERS_LIST:
295                         list_join:
296                         - "','"
297                         - {get_param: keystone_admin_api_node_ips}
298                 sahara_api_node_ips:
299                   str_replace:
300                     template: "['SERVERS_LIST']"
301                     params:
302                       SERVERS_LIST:
303                         list_join:
304                         - "','"
305                         - {get_param: sahara_api_node_ips}
306                 ironic_api_node_ips:
307                   str_replace:
308                     template: "['SERVERS_LIST']"
309                     params:
310                       SERVERS_LIST:
311                         list_join:
312                         - "','"
313                         - {get_param: ironic_api_node_ips}
314
315                 tripleo::profile::base::ceph::ceph_mon_initial_members:
316                   list_join:
317                   - ','
318                   - {get_param: ceph_mon_node_names}
319                 tripleo::profile::base::ceph::ceph_mon_host:
320                   list_join:
321                   - ','
322                   - {get_param: ceph_mon_node_ips}
323                 tripleo::profile::base::ceph::ceph_mon_host_v6:
324                   str_replace:
325                     template: "'[IPS_LIST]'"
326                     params:
327                       IPS_LIST:
328                         list_join:
329                         - '],['
330                         - {get_param: ceph_mon_node_ips}
331                 # NOTE(gfidente): interpolation with %{} in the
332                 # hieradata file can't be used as it returns string
333                 ceilometer::rabbit_hosts: *rabbit_nodes_array
334                 aodh::rabbit_hosts: *rabbit_nodes_array
335                 cinder::rabbit_hosts: *rabbit_nodes_array
336                 glance::notify::rabbitmq::rabbit_hosts: *rabbit_nodes_array
337                 heat::rabbit_hosts: *rabbit_nodes_array
338                 neutron::rabbit_hosts: *rabbit_nodes_array
339                 nova::rabbit_hosts: *rabbit_nodes_array
340                 keystone::rabbit_hosts: *rabbit_nodes_array
341                 sahara::rabbit_hosts: *rabbit_nodes_array
342                 ironic::rabbit_hosts: *rabbit_nodes_array
343
344                 deploy_identifier: {get_param: DeployIdentifier}
345                 update_identifier: {get_param: UpdateIdentifier}
346                 stack_action: {get_param: StackAction}
347
348 outputs:
349   config_id:
350     description: The ID of the allNodesConfigImpl resource.
351     value:
352       {get_resource: allNodesConfigImpl}
353   hosts_entries:
354     description: |
355       The content that should be appended to your /etc/hosts if you want to get
356       hostname-based access to the deployed nodes (useful for testing without
357       setting up a DNS).
358     value: {get_attr: [allNodesConfigImpl, config, hosts]}