Merge "Move *Image parameters into role templates"
[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   manila_api_node_ips:
52     type: comma_delimited_list
53   neutron_api_node_ips:
54     type: comma_delimited_list
55   keystone_public_api_node_ips:
56     type: comma_delimited_list
57   keystone_admin_api_node_ips:
58     type: comma_delimited_list
59   sahara_api_node_ips:
60     type: comma_delimited_list
61   ironic_api_node_ips:
62     type: comma_delimited_list
63   ceph_mon_node_ips:
64     type: comma_delimited_list
65   ceph_mon_node_names:
66     type: comma_delimited_list
67   DeployIdentifier:
68     type: string
69     description: >
70       Setting this to a unique value will re-run any deployment tasks which
71       perform configuration on a Heat stack-update.
72   UpdateIdentifier:
73     type: string
74     description: >
75       Setting to a previously unused value during stack-update will trigger
76       package update on all nodes
77   StackAction:
78     type: string
79     description: >
80       Heat action on performed top-level stack.
81     constraints:
82     - allowed_values: ['CREATE', 'UPDATE']
83
84 resources:
85
86   allNodesConfigImpl:
87     type: OS::Heat::StructuredConfig
88     properties:
89       group: os-apply-config
90       config:
91         hosts:
92           list_join:
93           - "\n"
94           - - list_join:
95               - "\n"
96               - {get_param: compute_hosts}
97             - list_join:
98               - "\n"
99               - {get_param: controller_hosts}
100             - list_join:
101               - "\n"
102               - {get_param: block_storage_hosts}
103             - list_join:
104               - "\n"
105               - {get_param: object_storage_hosts}
106             - list_join:
107               - "\n"
108               - {get_param: ceph_storage_hosts}
109         hiera:
110           datafiles:
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                 manila_api_node_ips:
266                   str_replace:
267                     template: "['SERVERS_LIST']"
268                     params:
269                       SERVERS_LIST:
270                         list_join:
271                         - "','"
272                         - {get_param: manila_api_node_ips}
273                 neutron_api_node_ips:
274                   str_replace:
275                     template: "['SERVERS_LIST']"
276                     params:
277                       SERVERS_LIST:
278                         list_join:
279                         - "','"
280                         - {get_param: neutron_api_node_ips}
281                 # TODO: pass a `midonet_api_node_ips` var
282                 midonet_api_node_ips:
283                   str_replace:
284                     template: "['SERVERS_LIST']"
285                     params:
286                       SERVERS_LIST:
287                         list_join:
288                         - "','"
289                         - {get_param: neutron_api_node_ips}
290                 keystone_public_api_node_ips:
291                   str_replace:
292                     template: "['SERVERS_LIST']"
293                     params:
294                       SERVERS_LIST:
295                         list_join:
296                         - "','"
297                         - {get_param: keystone_public_api_node_ips}
298                 keystone_admin_api_node_ips:
299                   str_replace:
300                     template: "['SERVERS_LIST']"
301                     params:
302                       SERVERS_LIST:
303                         list_join:
304                         - "','"
305                         - {get_param: keystone_admin_api_node_ips}
306                 sahara_api_node_ips:
307                   str_replace:
308                     template: "['SERVERS_LIST']"
309                     params:
310                       SERVERS_LIST:
311                         list_join:
312                         - "','"
313                         - {get_param: sahara_api_node_ips}
314                 ironic_api_node_ips:
315                   str_replace:
316                     template: "['SERVERS_LIST']"
317                     params:
318                       SERVERS_LIST:
319                         list_join:
320                         - "','"
321                         - {get_param: ironic_api_node_ips}
322
323                 tripleo::profile::base::ceph::ceph_mon_initial_members:
324                   list_join:
325                   - ','
326                   - {get_param: ceph_mon_node_names}
327                 tripleo::profile::base::ceph::ceph_mon_host:
328                   list_join:
329                   - ','
330                   - {get_param: ceph_mon_node_ips}
331                 tripleo::profile::base::ceph::ceph_mon_host_v6:
332                   str_replace:
333                     template: "'[IPS_LIST]'"
334                     params:
335                       IPS_LIST:
336                         list_join:
337                         - '],['
338                         - {get_param: ceph_mon_node_ips}
339                 # NOTE(gfidente): interpolation with %{} in the
340                 # hieradata file can't be used as it returns string
341                 ceilometer::rabbit_hosts: *rabbit_nodes_array
342                 aodh::rabbit_hosts: *rabbit_nodes_array
343                 cinder::rabbit_hosts: *rabbit_nodes_array
344                 glance::notify::rabbitmq::rabbit_hosts: *rabbit_nodes_array
345                 manila::rabbit_hosts: *rabbit_nodes_array
346                 heat::rabbit_hosts: *rabbit_nodes_array
347                 neutron::rabbit_hosts: *rabbit_nodes_array
348                 nova::rabbit_hosts: *rabbit_nodes_array
349                 keystone::rabbit_hosts: *rabbit_nodes_array
350                 sahara::rabbit_hosts: *rabbit_nodes_array
351                 ironic::rabbit_hosts: *rabbit_nodes_array
352
353                 deploy_identifier: {get_param: DeployIdentifier}
354                 update_identifier: {get_param: UpdateIdentifier}
355                 stack_action: {get_param: StackAction}
356
357 outputs:
358   config_id:
359     description: The ID of the allNodesConfigImpl resource.
360     value:
361       {get_resource: allNodesConfigImpl}
362   hosts_entries:
363     description: |
364       The content that should be appended to your /etc/hosts if you want to get
365       hostname-based access to the deployed nodes (useful for testing without
366       setting up a DNS).
367     value: {get_attr: [allNodesConfigImpl, config, hosts]}