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