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