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