Merge "add heat-api-cfn to endpoint map"
[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
60   DeployIdentifier:
61     type: string
62     description: >
63       Setting this to a unique value will re-run any deployment tasks which
64       perform configuration on a Heat stack-update.
65   UpdateIdentifier:
66     type: string
67     description: >
68       Setting to a previously unused value during stack-update will trigger
69       package update on all nodes
70   StackAction:
71     type: string
72     description: >
73       Heat action on performed top-level stack.
74     constraints:
75     - allowed_values: ['CREATE', 'UPDATE']
76
77 resources:
78
79   allNodesConfigImpl:
80     type: OS::Heat::StructuredConfig
81     properties:
82       group: os-apply-config
83       config:
84         hosts:
85           list_join:
86           - "\n"
87           - - list_join:
88               - "\n"
89               - {get_param: compute_hosts}
90             - list_join:
91               - "\n"
92               - {get_param: controller_hosts}
93             - list_join:
94               - "\n"
95               - {get_param: block_storage_hosts}
96             - list_join:
97               - "\n"
98               - {get_param: object_storage_hosts}
99             - list_join:
100               - "\n"
101               - {get_param: ceph_storage_hosts}
102         hiera:
103           datafiles:
104             RedHat:
105               raw_data: {get_file: hieradata/RedHat.yaml}
106             all_nodes:
107               mapped_data:
108                 controller_node_ips:
109                   list_join:
110                   - ','
111                   - {get_param: controller_ips}
112                 controller_node_names:
113                   list_join:
114                   - ','
115                   - {get_param: controller_names}
116                 galera_node_names:
117                   list_join:
118                   - ','
119                   - {get_param: controller_names}
120                 rabbit_node_ips: &rabbit_nodes_array
121                   str_replace:
122                     template: "['SERVERS_LIST']"
123                     params:
124                       SERVERS_LIST:
125                         list_join:
126                         - "','"
127                         - {get_param: rabbit_node_ips}
128                 mongo_node_ips:
129                   str_replace:
130                     template: "['SERVERS_LIST']"
131                     params:
132                       SERVERS_LIST:
133                         list_join:
134                         - "','"
135                         - {get_param: mongo_node_ips}
136                 redis_node_ips:
137                   str_replace:
138                     template: "['SERVERS_LIST']"
139                     params:
140                       SERVERS_LIST:
141                         list_join:
142                         - "','"
143                         - {get_param: redis_node_ips}
144                 memcache_node_ips:
145                   str_replace:
146                     template: "['SERVERS_LIST']"
147                     params:
148                       SERVERS_LIST:
149                         list_join:
150                         - "','"
151                         - {get_param: memcache_node_ips}
152                 memcache_node_ips_v6:
153                   str_replace:
154                     template: "['inet6:[SERVERS_LIST]']"
155                     params:
156                       SERVERS_LIST:
157                         list_join:
158                         - "]','inet6:["
159                         - {get_param: memcache_node_ips}
160                 mysql_node_ips:
161                   str_replace:
162                     template: "['SERVERS_LIST']"
163                     params:
164                       SERVERS_LIST:
165                         list_join:
166                         - "','"
167                         - {get_param: mysql_node_ips}
168                 horizon_node_ips:
169                   str_replace:
170                     template: "['SERVERS_LIST']"
171                     params:
172                       SERVERS_LIST:
173                         list_join:
174                         - "','"
175                         - {get_param: horizon_node_ips}
176                 heat_api_node_ips:
177                   str_replace:
178                     template: "['SERVERS_LIST']"
179                     params:
180                       SERVERS_LIST:
181                         list_join:
182                         - "','"
183                         - {get_param: heat_api_node_ips}
184                 swift_proxy_node_ips:
185                   str_replace:
186                     template: "['SERVERS_LIST']"
187                     params:
188                       SERVERS_LIST:
189                         list_join:
190                         - "','"
191                         - {get_param: swift_proxy_node_ips}
192                 ceilometer_api_node_ips:
193                   str_replace:
194                     template: "['SERVERS_LIST']"
195                     params:
196                       SERVERS_LIST:
197                         list_join:
198                         - "','"
199                         - {get_param: ceilometer_api_node_ips}
200                 aodh_api_node_ips:
201                   str_replace:
202                     template: "['SERVERS_LIST']"
203                     params:
204                       SERVERS_LIST:
205                         list_join:
206                         - "','"
207                         - {get_param: aodh_api_node_ips}
208                 gnocchi_api_node_ips:
209                   str_replace:
210                     template: "['SERVERS_LIST']"
211                     params:
212                       SERVERS_LIST:
213                         list_join:
214                         - "','"
215                         - {get_param: gnocchi_api_node_ips}
216                 nova_api_node_ips:
217                   str_replace:
218                     template: "['SERVERS_LIST']"
219                     params:
220                       SERVERS_LIST:
221                         list_join:
222                         - "','"
223                         - {get_param: nova_api_node_ips}
224                 nova_metadata_node_ips:
225                   str_replace:
226                     template: "['SERVERS_LIST']"
227                     params:
228                       SERVERS_LIST:
229                         list_join:
230                         - "','"
231                         - {get_param: nova_metadata_node_ips}
232                 glance_api_node_ips:
233                   str_replace:
234                     template: "['SERVERS_LIST']"
235                     params:
236                       SERVERS_LIST:
237                         list_join:
238                         - "','"
239                         - {get_param: glance_api_node_ips}
240                 glance_registry_node_ips:
241                   str_replace:
242                     template: "['SERVERS_LIST']"
243                     params:
244                       SERVERS_LIST:
245                         list_join:
246                         - "','"
247                         - {get_param: glance_registry_node_ips}
248                 cinder_api_node_ips:
249                   str_replace:
250                     template: "['SERVERS_LIST']"
251                     params:
252                       SERVERS_LIST:
253                         list_join:
254                         - "','"
255                         - {get_param: cinder_api_node_ips}
256                 neutron_api_node_ips:
257                   str_replace:
258                     template: "['SERVERS_LIST']"
259                     params:
260                       SERVERS_LIST:
261                         list_join:
262                         - "','"
263                         - {get_param: neutron_api_node_ips}
264                 # TODO: pass a `midonet_api_node_ips` var
265                 midonet_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                 keystone_public_api_node_ips:
274                   str_replace:
275                     template: "['SERVERS_LIST']"
276                     params:
277                       SERVERS_LIST:
278                         list_join:
279                         - "','"
280                         - {get_param: keystone_public_api_node_ips}
281                 keystone_admin_api_node_ips:
282                   str_replace:
283                     template: "['SERVERS_LIST']"
284                     params:
285                       SERVERS_LIST:
286                         list_join:
287                         - "','"
288                         - {get_param: keystone_admin_api_node_ips}
289                 sahara_api_node_ips:
290                   str_replace:
291                     template: "['SERVERS_LIST']"
292                     params:
293                       SERVERS_LIST:
294                         list_join:
295                         - "','"
296                         - {get_param: sahara_api_node_ips}
297
298                 # NOTE(gfidente): interpolation with %{} in the
299                 # hieradata file can't be used as it returns string
300                 ceilometer::rabbit_hosts: *rabbit_nodes_array
301                 aodh::rabbit_hosts: *rabbit_nodes_array
302                 cinder::rabbit_hosts: *rabbit_nodes_array
303                 glance::notify::rabbitmq::rabbit_hosts: *rabbit_nodes_array
304                 heat::rabbit_hosts: *rabbit_nodes_array
305                 neutron::rabbit_hosts: *rabbit_nodes_array
306                 nova::rabbit_hosts: *rabbit_nodes_array
307                 keystone::rabbit_hosts: *rabbit_nodes_array
308                 sahara::rabbit_hosts: *rabbit_nodes_array
309
310                 deploy_identifier: {get_param: DeployIdentifier}
311                 update_identifier: {get_param: UpdateIdentifier}
312                 stack_action: {get_param: StackAction}
313
314 outputs:
315   config_id:
316     description: The ID of the allNodesConfigImpl resource.
317     value:
318       {get_resource: allNodesConfigImpl}
319   hosts_entries:
320     description: |
321       The content that should be appended to your /etc/hosts if you want to get
322       hostname-based access to the deployed nodes (useful for testing without
323       setting up a DNS).
324     value: {get_attr: [allNodesConfigImpl, config, hosts]}