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