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