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