Merge "Convert service_name to underscore syntax"
[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             bootstrap_node:
110               mapped_data:
111                 bootstrap_nodeid: {get_input: bootstrap_nodeid}
112                 bootstrap_nodeid_ip: {get_input: bootstrap_nodeid_ip}
113             all_nodes:
114               mapped_data:
115                 controller_node_ips:
116                   list_join:
117                   - ','
118                   - {get_param: controller_ips}
119                 controller_node_names:
120                   list_join:
121                   - ','
122                   - {get_param: controller_names}
123                 galera_node_names:
124                   list_join:
125                   - ','
126                   - {get_param: controller_names}
127                 rabbit_node_ips: &rabbit_nodes_array
128                   str_replace:
129                     template: "['SERVERS_LIST']"
130                     params:
131                       SERVERS_LIST:
132                         list_join:
133                         - "','"
134                         - {get_param: rabbit_node_ips}
135                 mongo_node_ips:
136                   str_replace:
137                     template: "['SERVERS_LIST']"
138                     params:
139                       SERVERS_LIST:
140                         list_join:
141                         - "','"
142                         - {get_param: mongo_node_ips}
143                 redis_node_ips:
144                   str_replace:
145                     template: "['SERVERS_LIST']"
146                     params:
147                       SERVERS_LIST:
148                         list_join:
149                         - "','"
150                         - {get_param: redis_node_ips}
151                 memcache_node_ips:
152                   str_replace:
153                     template: "['SERVERS_LIST']"
154                     params:
155                       SERVERS_LIST:
156                         list_join:
157                         - "','"
158                         - {get_param: memcache_node_ips}
159                 memcache_node_ips_v6:
160                   str_replace:
161                     template: "['inet6:[SERVERS_LIST]']"
162                     params:
163                       SERVERS_LIST:
164                         list_join:
165                         - "]','inet6:["
166                         - {get_param: memcache_node_ips}
167                 mysql_node_ips:
168                   str_replace:
169                     template: "['SERVERS_LIST']"
170                     params:
171                       SERVERS_LIST:
172                         list_join:
173                         - "','"
174                         - {get_param: mysql_node_ips}
175                 horizon_node_ips:
176                   str_replace:
177                     template: "['SERVERS_LIST']"
178                     params:
179                       SERVERS_LIST:
180                         list_join:
181                         - "','"
182                         - {get_param: horizon_node_ips}
183                 heat_api_node_ips:
184                   str_replace:
185                     template: "['SERVERS_LIST']"
186                     params:
187                       SERVERS_LIST:
188                         list_join:
189                         - "','"
190                         - {get_param: heat_api_node_ips}
191                 swift_proxy_node_ips:
192                   str_replace:
193                     template: "['SERVERS_LIST']"
194                     params:
195                       SERVERS_LIST:
196                         list_join:
197                         - "','"
198                         - {get_param: swift_proxy_node_ips}
199                 ceilometer_api_node_ips:
200                   str_replace:
201                     template: "['SERVERS_LIST']"
202                     params:
203                       SERVERS_LIST:
204                         list_join:
205                         - "','"
206                         - {get_param: ceilometer_api_node_ips}
207                 aodh_api_node_ips:
208                   str_replace:
209                     template: "['SERVERS_LIST']"
210                     params:
211                       SERVERS_LIST:
212                         list_join:
213                         - "','"
214                         - {get_param: aodh_api_node_ips}
215                 gnocchi_api_node_ips:
216                   str_replace:
217                     template: "['SERVERS_LIST']"
218                     params:
219                       SERVERS_LIST:
220                         list_join:
221                         - "','"
222                         - {get_param: gnocchi_api_node_ips}
223                 nova_api_node_ips:
224                   str_replace:
225                     template: "['SERVERS_LIST']"
226                     params:
227                       SERVERS_LIST:
228                         list_join:
229                         - "','"
230                         - {get_param: nova_api_node_ips}
231                 nova_metadata_node_ips:
232                   str_replace:
233                     template: "['SERVERS_LIST']"
234                     params:
235                       SERVERS_LIST:
236                         list_join:
237                         - "','"
238                         - {get_param: nova_metadata_node_ips}
239                 glance_api_node_ips:
240                   str_replace:
241                     template: "['SERVERS_LIST']"
242                     params:
243                       SERVERS_LIST:
244                         list_join:
245                         - "','"
246                         - {get_param: glance_api_node_ips}
247                 glance_registry_node_ips:
248                   str_replace:
249                     template: "['SERVERS_LIST']"
250                     params:
251                       SERVERS_LIST:
252                         list_join:
253                         - "','"
254                         - {get_param: glance_registry_node_ips}
255                 cinder_api_node_ips:
256                   str_replace:
257                     template: "['SERVERS_LIST']"
258                     params:
259                       SERVERS_LIST:
260                         list_join:
261                         - "','"
262                         - {get_param: cinder_api_node_ips}
263                 neutron_api_node_ips:
264                   str_replace:
265                     template: "['SERVERS_LIST']"
266                     params:
267                       SERVERS_LIST:
268                         list_join:
269                         - "','"
270                         - {get_param: neutron_api_node_ips}
271                 # TODO: pass a `midonet_api_node_ips` var
272                 midonet_api_node_ips:
273                   str_replace:
274                     template: "['SERVERS_LIST']"
275                     params:
276                       SERVERS_LIST:
277                         list_join:
278                         - "','"
279                         - {get_param: neutron_api_node_ips}
280                 keystone_public_api_node_ips:
281                   str_replace:
282                     template: "['SERVERS_LIST']"
283                     params:
284                       SERVERS_LIST:
285                         list_join:
286                         - "','"
287                         - {get_param: keystone_public_api_node_ips}
288                 keystone_admin_api_node_ips:
289                   str_replace:
290                     template: "['SERVERS_LIST']"
291                     params:
292                       SERVERS_LIST:
293                         list_join:
294                         - "','"
295                         - {get_param: keystone_admin_api_node_ips}
296                 sahara_api_node_ips:
297                   str_replace:
298                     template: "['SERVERS_LIST']"
299                     params:
300                       SERVERS_LIST:
301                         list_join:
302                         - "','"
303                         - {get_param: sahara_api_node_ips}
304                 ironic_api_node_ips:
305                   str_replace:
306                     template: "['SERVERS_LIST']"
307                     params:
308                       SERVERS_LIST:
309                         list_join:
310                         - "','"
311                         - {get_param: ironic_api_node_ips}
312
313                 tripleo::profile::base::ceph::ceph_mon_initial_members:
314                   list_join:
315                   - ','
316                   - {get_param: ceph_mon_node_names}
317                 tripleo::profile::base::ceph::ceph_mon_host:
318                   list_join:
319                   - ','
320                   - {get_param: ceph_mon_node_ips}
321                 tripleo::profile::base::ceph::ceph_mon_host_v6:
322                   str_replace:
323                     template: "'[IPS_LIST]'"
324                     params:
325                       IPS_LIST:
326                         list_join:
327                         - '],['
328                         - {get_param: ceph_mon_node_ips}
329                 # NOTE(gfidente): interpolation with %{} in the
330                 # hieradata file can't be used as it returns string
331                 ceilometer::rabbit_hosts: *rabbit_nodes_array
332                 aodh::rabbit_hosts: *rabbit_nodes_array
333                 cinder::rabbit_hosts: *rabbit_nodes_array
334                 glance::notify::rabbitmq::rabbit_hosts: *rabbit_nodes_array
335                 heat::rabbit_hosts: *rabbit_nodes_array
336                 neutron::rabbit_hosts: *rabbit_nodes_array
337                 nova::rabbit_hosts: *rabbit_nodes_array
338                 keystone::rabbit_hosts: *rabbit_nodes_array
339                 sahara::rabbit_hosts: *rabbit_nodes_array
340                 ironic::rabbit_hosts: *rabbit_nodes_array
341
342                 deploy_identifier: {get_param: DeployIdentifier}
343                 update_identifier: {get_param: UpdateIdentifier}
344                 stack_action: {get_param: StackAction}
345
346 outputs:
347   config_id:
348     description: The ID of the allNodesConfigImpl resource.
349     value:
350       {get_resource: allNodesConfigImpl}
351   hosts_entries:
352     description: |
353       The content that should be appended to your /etc/hosts if you want to get
354       hostname-based access to the deployed nodes (useful for testing without
355       setting up a DNS).
356     value: {get_attr: [allNodesConfigImpl, config, hosts]}