Remove uses of functions in parameter defaults
[apex-tripleo-heat-templates.git] / overcloud-source.yaml
1 Description: Nova API,Keystone,Heat Engine and API,Glance,Neutron,Dedicated MySQL
2   server,Dedicated RabbitMQ Server,Group of Nova Computes
3 HeatTemplateFormatVersion: '2012-12-12'
4 Parameters:
5   AdminPassword:
6     Default: unset
7     Description: The password for the keystone admin account, used for monitoring, querying neutron etc.
8     Type: String
9     NoEcho: true
10   AdminToken:
11     Default: unset
12     Description: The keystone auth secret.
13     Type: String
14     NoEcho: true
15   CinderPassword:
16     Default: unset
17     Description: The password for the cinder service account, used by cinder-api.
18     Type: String
19     NoEcho: true
20   Flavor:
21     Default: baremetal
22     Description: Flavor to request when deploying.
23     Type: String
24   GlancePassword:
25     Default: unset
26     Description: The password for the glance service account, used by the glance services.
27     Type: String
28     NoEcho: true
29   HeatPassword:
30     Default: unset
31     Description: The password for the Heat service account, used by the Heat services.
32     Type: String
33     NoEcho: true
34   ImageUpdatePolicy:
35     Default: 'REPLACE'
36     Description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
37     Type: String
38   KeyName:
39     Default: default
40     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
41     Type: String
42   NeutronBridgeMappings:
43     Description: The OVS logical->physical bridge mappings to use.
44     Type: String
45     Default: ''
46   NeutronPassword:
47     Default: unset
48     Description: The password for the neutron service account, used by neutron agents.
49     Type: String
50     NoEcho: true
51   CeilometerComputeAgent:
52     Description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
53     Type: String
54     Default: ''
55     AllowedValues: ['', Present]
56   CeilometerMeteringSecret:
57     Default: unset
58     Description: Secret shared by the ceilometer services.
59     Type: String
60     NoEcho: true
61   CeilometerPassword:
62     Default: unset
63     Description: The password for the ceilometer service account.
64     Type: String
65     NoEcho: true
66   CloudName:
67     Default: ''
68     Description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
69     Type: String
70   NovaComputeDriver:
71     Default: libvirt.LibvirtDriver
72     Type: String
73   NovaComputeLibvirtType:
74     Default: ''
75     Type: String
76   NovaImage:
77     Type: String
78     Default: overcloud-compute
79   NovaPassword:
80     Default: unset
81     Description: The password for the nova service account, used by nova-api.
82     Type: String
83     NoEcho: true
84   NeutronFlatNetworks:
85     Type: String
86     Default: ''
87     Description: If set, flat networks to configure in neutron plugins.
88   HypervisorNeutronPhysicalBridge:
89     Default: ''
90     Description: An OVS bridge to create on each hypervisor.
91     Type: String
92   HypervisorNeutronPublicInterface:
93     Default: ''
94     Description: What interface to add to the HypervisorNeutronPhysicalBridge.
95     Type: String
96   NeutronPublicInterface:
97     Default: eth0
98     Description: What interface to bridge onto br-ex for network nodes.
99     Type: String
100   NeutronPublicInterfaceDefaultRoute:
101     Default: ''
102     Description: A custom default route for the NeutronPublicInterface.
103     Type: String
104   NeutronPublicInterfaceIP:
105     Default: ''
106     Description: A custom IP address to put onto the NeutronPublicInterface.
107     Type: String
108   NeutronPublicInterfaceRawDevice:
109     Default: ''
110     Description: If set, the public interface is a vlan with this device as the raw device.
111     Type: String
112   notcomputeImage:
113     Type: String
114     Default: overcloud-control
115   NtpServer:
116     Type: String
117     Default: ''
118   RabbitUserName:
119     Default: guest
120     Description: The username for RabbitMQ
121     Type: String
122   RabbitPassword:
123     Default: guest
124     Description: The password for RabbitMQ
125     Type: String
126     NoEcho: true
127 Resources:
128   AccessPolicy:
129     Properties:
130       AllowedResources:
131       - notCompute0
132       - notCompute0Config
133     Type: OS::Heat::AccessPolicy
134   ComputeAccessPolicy:
135     Properties:
136       AllowedResources:
137       - NovaCompute0
138       - NovaCompute0Config
139     Type: OS::Heat::AccessPolicy
140   notCompute0Key:
141     Properties:
142       UserName:
143         Ref: User
144     Type: AWS::IAM::AccessKey
145   notCompute0CompletionCondition:
146     Type: AWS::CloudFormation::WaitCondition
147     DependsOn: notCompute0
148     Properties:
149       Handle: {Ref: notCompute0CompletionHandle}
150       Count: '1'
151       Timeout: '1800'
152   notCompute0CompletionHandle:
153     Type: OS::Heat::UpdateWaitConditionHandle
154   NovaCompute0Key:
155     Type: FileInclude
156     Path: nova-compute-instance.yaml
157     SubKey: Resources.NovaCompute0Key
158   NovaCompute0CompletionCondition:
159     Type: FileInclude
160     Path: nova-compute-instance.yaml
161     SubKey: Resources.NovaCompute0CompletionCondition
162   NovaCompute0CompletionHandle:
163     Type: FileInclude
164     Path: nova-compute-instance.yaml
165     SubKey: Resources.NovaCompute0CompletionHandle
166   ComputeUser:
167     Properties:
168       Policies:
169       - Ref: ComputeAccessPolicy
170     Type: AWS::IAM::User
171   NovaCompute0Config:
172     Type: FileInclude
173     Path: nova-compute-instance.yaml
174     SubKey: Resources.NovaCompute0Config
175     Parameters:
176         NovaApiHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
177         KeystoneHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
178         RabbitHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
179         NeutronHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
180         GlanceHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
181         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ]}, '/nova']]}
182         CeilometerDSN: {"Fn::Join": ['', ['mysql://ceilometer:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ]}, '/ceilometer']]}
183         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ]}, '/neutron']]}
184         NeutronNetworkType: "gre"
185         NeutronEnableTunnelling: "True"
186         NeutronFlatNetworks:
187             Ref: NeutronFlatNetworks
188         NeutronNetworkVLANRanges: ""
189         NeutronPhysicalBridge:
190             Ref: HypervisorNeutronPhysicalBridge
191         NeutronPublicInterface:
192             Ref: HypervisorNeutronPublicInterface
193         NeutronBridgeMappings:
194             Ref: NeutronBridgeMappings
195         StaticHosts:
196           Fn::Join:
197           - ' '
198           - - Fn::Select:
199               - 0
200               - Fn::Select:
201                 - ctlplane
202                 - Fn::GetAtt:
203                   - notCompute0
204                   - networks
205             - {Ref: CloudName}
206   NovaCompute0:
207     Type: FileInclude
208     Path: nova-compute-instance.yaml
209     SubKey: Resources.NovaCompute0
210   User:
211     Properties:
212       Policies:
213       - Ref: AccessPolicy
214     Type: AWS::IAM::User
215   notCompute0Config:
216     Type: AWS::AutoScaling::LaunchConfiguration
217     Properties:
218       ImageId: '0'
219       InstanceType: '0'
220     Metadata:
221       OpenStack::Heat::Stack: {}
222       OpenStack::ImageBuilder::Elements:
223       - boot-stack
224       - heat-cfntools
225       - heat-localip
226       - neutron-network-node
227       admin-password:
228         Ref: AdminPassword
229       admin-token:
230         Ref: AdminToken
231       bootstack:
232         public_interface_ip:
233           Ref: NeutronPublicInterfaceIP
234       cinder:
235         db: mysql://cinder:unset@localhost/cinder
236         volume_size_mb: '5000'
237         service-password:
238           Ref: CinderPassword
239       completion-handle:
240         Ref: notCompute0CompletionHandle
241       controller-address:
242         Fn::Select:
243          - 0
244          - Fn::Select:
245              - 'ctlplane'
246              - Fn::GetAtt:
247                - notCompute0
248                - networks
249       db-password: unset
250       glance:
251         backend: swift
252         db: mysql://glance:unset@localhost/glance
253         host:
254           Fn::Select:
255            - 0
256            - Fn::Select:
257                - 'ctlplane'
258                - Fn::GetAtt:
259                  - notCompute0
260                  - networks
261         service-password:
262           Ref: GlancePassword
263         swift-store-user: service:glance
264         swift-store-key:
265           Ref: GlancePassword
266       heat:
267         admin_password:
268           Ref: HeatPassword
269         admin_tenant_name: service
270         admin_user: heat
271         auth_encryption_key: unset___________
272         db: mysql://heat:unset@localhost/heat
273         watch_server_url:
274           Fn::Join:
275             - ''
276             - - 'http://'
277               - Fn::Select:
278                 - 0
279                 - Fn::Select:
280                   - 'ctlplane'
281                   - Fn::GetAtt:
282                     - notCompute0
283                     - networks
284               - ':8003'
285         metadata_server_url:
286           Fn::Join:
287             - ''
288             - - 'http://'
289               - Fn::Select:
290                 - 0
291                 - Fn::Select:
292                   - 'ctlplane'
293                   - Fn::GetAtt:
294                     - notCompute0
295                     - networks
296               - ':8000'
297         waitcondition_server_url:
298           Fn::Join:
299             - ''
300             - - 'http://'
301               - Fn::Select:
302                 - 0
303                 - Fn::Select:
304                   - 'ctlplane'
305                   - Fn::GetAtt:
306                     - notCompute0
307                     - networks
308               - ':8000/v1/waitcondition'
309       hosts:
310         Fn::Join:
311         - ' '
312         - - Fn::Select:
313             - 0
314             - Fn::Select:
315               - ctlplane
316               - Fn::GetAtt:
317                 - notCompute0
318                 - networks
319           - {Ref: CloudName}
320       keystone:
321         db: mysql://keystone:unset@localhost/keystone
322         host:
323           Fn::Select:
324             - 0
325             - Fn::Select:
326               - 'ctlplane'
327               - Fn::GetAtt:
328                 - notCompute0
329                 - networks
330       neutron:
331         flat-networks: {Ref: NeutronFlatNetworks}
332         host:
333           Fn::Select:
334             - 0
335             - Fn::Select:
336               - ctlplane
337               - Fn::GetAtt:
338                 - notCompute0
339                 - networks
340         metadata_proxy_shared_secret: unset
341         ovs:
342           enable_tunneling: 'True'
343           local_ip:
344             Fn::Select:
345               - 0
346               - Fn::Select:
347                 - ctlplane
348                 - Fn::GetAtt:
349                   - notCompute0
350                   - networks
351           bridge_mappings: {Ref: NeutronBridgeMappings}
352           public_interface:
353             Ref: NeutronPublicInterface
354           public_interface_raw_device:
355             Ref: NeutronPublicInterfaceRawDevice
356           public_interface_route:
357             Ref: NeutronPublicInterfaceDefaultRoute
358           physical_bridge: br-ex
359           tenant_network_type: gre
360         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
361         service-password:
362           Ref: NeutronPassword
363       ceilometer:
364         db: mysql://ceilometer:unset@localhost/ceilometer
365         metering_secret: {Ref: CeilometerMeteringSecret}
366         service-password:
367           Ref: CeilometerPassword
368       nova:
369         compute_driver: libvirt.LibvirtDriver
370         db: mysql://nova:unset@localhost/nova
371         default_floating_pool:
372           ext-net
373         host:
374           Fn::Select:
375             - 0
376             - Fn::Select:
377               - 'ctlplane'
378               - Fn::GetAtt:
379                 - notCompute0
380                 - networks
381         metadata-proxy: true
382         service-password:
383           Ref: NovaPassword
384       os-collect-config:
385         cfn:
386           access_key_id:
387             Ref: notCompute0Key
388           path: notCompute0Config.Metadata
389           secret_access_key:
390             Fn::GetAtt:
391             - notCompute0Key
392             - SecretAccessKey
393           stack_name:
394             Ref: AWS::StackName
395       rabbit:
396         host:
397           Fn::Select:
398             - 0
399             - Fn::Select:
400               - ctlplane
401               - Fn::GetAtt:
402                 - notCompute0
403                 - networks
404         username:
405           Ref: RabbitUserName
406         password:
407           Ref: RabbitPassword
408       ntp:
409         servers:
410             - {server: {Ref: NtpServer}, fudge: "stratum 0"}
411   notCompute0:
412     Type: OS::Nova::Server
413     Properties:
414       image:
415         Ref: notcomputeImage
416       image_update_policy:
417         Ref: ImageUpdatePolicy
418       flavor:
419         Ref: Flavor
420       key_name:
421         Ref: KeyName
422     Metadata:
423       os-collect-config:
424         cfn:
425           access_key_id:
426             Ref: notCompute0Key
427           path: notCompute0Config.Metadata
428           secret_access_key:
429             Fn::GetAtt:
430             - notCompute0Key
431             - SecretAccessKey
432           stack_name:
433             Ref: AWS::StackName
434 Outputs:
435   KeystoneURL:
436     Description: URL for the Overcloud Keystone service
437     Value:
438       Fn::Join:
439       - ''
440       - - http://
441         - Fn::Select:
442           - 0
443           - Fn::Select:
444             - ctlplane
445             - Fn::GetAtt:
446               - notCompute0
447               - networks
448         - :5000/v2.0/