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