fa626aa2f7e7994fa468ead6c1e5e126b881aa94
[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   RabbitCookieSalt:
128     Type: String
129     Default: unset
130     Description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
131 Resources:
132   RabbitCookie:
133     Type: OS::Heat::RandomString
134     Properties:
135       length: 20
136       salt:
137         Ref: RabbitCookieSalt
138   AccessPolicy:
139     Properties:
140       AllowedResources:
141       - notCompute0
142       - notCompute0Config
143     Type: OS::Heat::AccessPolicy
144   ComputeAccessPolicy:
145     Properties:
146       AllowedResources:
147       - NovaCompute0
148       - NovaCompute0Config
149     Type: OS::Heat::AccessPolicy
150   notCompute0Key:
151     Properties:
152       UserName:
153         Ref: User
154     Type: AWS::IAM::AccessKey
155   notCompute0CompletionCondition:
156     Type: AWS::CloudFormation::WaitCondition
157     DependsOn: notCompute0
158     Properties:
159       Handle: {Ref: notCompute0CompletionHandle}
160       Count: '1'
161       Timeout: '1800'
162   notCompute0CompletionHandle:
163     Type: OS::Heat::UpdateWaitConditionHandle
164   NovaCompute0Key:
165     Type: FileInclude
166     Path: nova-compute-instance.yaml
167     SubKey: Resources.NovaCompute0Key
168   NovaCompute0CompletionCondition:
169     Type: FileInclude
170     Path: nova-compute-instance.yaml
171     SubKey: Resources.NovaCompute0CompletionCondition
172   NovaCompute0CompletionHandle:
173     Type: FileInclude
174     Path: nova-compute-instance.yaml
175     SubKey: Resources.NovaCompute0CompletionHandle
176   ComputeUser:
177     Properties:
178       Policies:
179       - Ref: ComputeAccessPolicy
180     Type: AWS::IAM::User
181   NovaCompute0Config:
182     Type: FileInclude
183     Path: nova-compute-instance.yaml
184     SubKey: Resources.NovaCompute0Config
185     Parameters:
186         NovaApiHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
187         KeystoneHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
188         RabbitHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
189         NeutronHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
190         GlanceHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
191         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ]}, '/nova']]}
192         CeilometerDSN: {"Fn::Join": ['', ['mysql://ceilometer:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ]}, '/ceilometer']]}
193         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ]}, '/neutron']]}
194         NeutronNetworkType: "gre"
195         NeutronEnableTunnelling: "True"
196         NeutronFlatNetworks:
197             Ref: NeutronFlatNetworks
198         NeutronNetworkVLANRanges: ""
199         NeutronPhysicalBridge:
200             Ref: HypervisorNeutronPhysicalBridge
201         NeutronPublicInterface:
202             Ref: HypervisorNeutronPublicInterface
203         NeutronBridgeMappings:
204             Ref: NeutronBridgeMappings
205         StaticHosts:
206           Fn::Join:
207           - "\n"
208           - - Fn::Join:
209               - "\n"
210               - Merge::Map:
211                   NovaCompute0:
212                     Fn::Join:
213                     - ' '
214                     - - Fn::Select:
215                         - 0
216                         - Fn::Select:
217                           - ctlplane
218                           - Fn::GetAtt:
219                             - NovaCompute0
220                             - networks
221                       - Fn::Select:
222                         - name
223                         - Fn::GetAtt:
224                           - NovaCompute0
225                           - show
226                       - Fn::Join:
227                         - '.'
228                         - - Fn::Select:
229                             - name
230                             - Fn::GetAtt:
231                               - NovaCompute0
232                               - show
233                           - 'novalocal'
234             - Fn::Join:
235               - ' '
236               - - Fn::Select:
237                   - 0
238                   - Fn::Select:
239                     - ctlplane
240                     - Fn::GetAtt:
241                       - notCompute0
242                       - networks
243                 - {Ref: CloudName}
244                 # If CloudName is unset, make the hosts line still valid
245                 - unused
246   NovaCompute0:
247     Type: FileInclude
248     Path: nova-compute-instance.yaml
249     SubKey: Resources.NovaCompute0
250   User:
251     Properties:
252       Policies:
253       - Ref: AccessPolicy
254     Type: AWS::IAM::User
255   notCompute0Config:
256     Type: AWS::AutoScaling::LaunchConfiguration
257     Properties:
258       ImageId: '0'
259       InstanceType: '0'
260     Metadata:
261       OpenStack::Heat::Stack: {}
262       OpenStack::ImageBuilder::Elements:
263       - boot-stack
264       - heat-cfntools
265       - heat-localip
266       - neutron-network-node
267       admin-password:
268         Ref: AdminPassword
269       admin-token:
270         Ref: AdminToken
271       bootstack:
272         public_interface_ip:
273           Ref: NeutronPublicInterfaceIP
274       cinder:
275         db: mysql://cinder:unset@localhost/cinder
276         volume_size_mb: '5000'
277         service-password:
278           Ref: CinderPassword
279       completion-handle:
280         Ref: notCompute0CompletionHandle
281       controller-address:
282         Fn::Select:
283          - 0
284          - Fn::Select:
285              - 'ctlplane'
286              - Fn::GetAtt:
287                - notCompute0
288                - networks
289       db-password: unset
290       glance:
291         backend: swift
292         db: mysql://glance:unset@localhost/glance
293         host:
294           Fn::Select:
295            - 0
296            - Fn::Select:
297                - 'ctlplane'
298                - Fn::GetAtt:
299                  - notCompute0
300                  - networks
301         service-password:
302           Ref: GlancePassword
303         swift-store-user: service:glance
304         swift-store-key:
305           Ref: GlancePassword
306       heat:
307         admin_password:
308           Ref: HeatPassword
309         admin_tenant_name: service
310         admin_user: heat
311         auth_encryption_key: unset___________
312         db: mysql://heat:unset@localhost/heat
313         watch_server_url:
314           Fn::Join:
315             - ''
316             - - 'http://'
317               - Fn::Select:
318                 - 0
319                 - Fn::Select:
320                   - 'ctlplane'
321                   - Fn::GetAtt:
322                     - notCompute0
323                     - networks
324               - ':8003'
325         metadata_server_url:
326           Fn::Join:
327             - ''
328             - - 'http://'
329               - Fn::Select:
330                 - 0
331                 - Fn::Select:
332                   - 'ctlplane'
333                   - Fn::GetAtt:
334                     - notCompute0
335                     - networks
336               - ':8000'
337         waitcondition_server_url:
338           Fn::Join:
339             - ''
340             - - 'http://'
341               - Fn::Select:
342                 - 0
343                 - Fn::Select:
344                   - 'ctlplane'
345                   - Fn::GetAtt:
346                     - notCompute0
347                     - networks
348               - ':8000/v1/waitcondition'
349       hosts:
350         Fn::Join:
351         - ' '
352         - - Fn::Select:
353             - 0
354             - Fn::Select:
355               - ctlplane
356               - Fn::GetAtt:
357                 - notCompute0
358                 - networks
359           - {Ref: CloudName}
360       keystone:
361         db: mysql://keystone:unset@localhost/keystone
362         host:
363           Fn::Select:
364             - 0
365             - Fn::Select:
366               - 'ctlplane'
367               - Fn::GetAtt:
368                 - notCompute0
369                 - networks
370       neutron:
371         flat-networks: {Ref: NeutronFlatNetworks}
372         host:
373           Fn::Select:
374             - 0
375             - Fn::Select:
376               - ctlplane
377               - Fn::GetAtt:
378                 - notCompute0
379                 - networks
380         metadata_proxy_shared_secret: unset
381         ovs:
382           enable_tunneling: 'True'
383           local_ip:
384             Fn::Select:
385               - 0
386               - Fn::Select:
387                 - ctlplane
388                 - Fn::GetAtt:
389                   - notCompute0
390                   - networks
391           bridge_mappings: {Ref: NeutronBridgeMappings}
392           public_interface:
393             Ref: NeutronPublicInterface
394           public_interface_raw_device:
395             Ref: NeutronPublicInterfaceRawDevice
396           public_interface_route:
397             Ref: NeutronPublicInterfaceDefaultRoute
398           physical_bridge: br-ex
399           tenant_network_type: gre
400         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
401         service-password:
402           Ref: NeutronPassword
403       ceilometer:
404         db: mysql://ceilometer:unset@localhost/ceilometer
405         metering_secret: {Ref: CeilometerMeteringSecret}
406         service-password:
407           Ref: CeilometerPassword
408       nova:
409         compute_driver: libvirt.LibvirtDriver
410         db: mysql://nova:unset@localhost/nova
411         default_floating_pool:
412           ext-net
413         host:
414           Fn::Select:
415             - 0
416             - Fn::Select:
417               - 'ctlplane'
418               - Fn::GetAtt:
419                 - notCompute0
420                 - networks
421         metadata-proxy: true
422         service-password:
423           Ref: NovaPassword
424       os-collect-config:
425         cfn:
426           access_key_id:
427             Ref: notCompute0Key
428           path: notCompute0Config.Metadata
429           secret_access_key:
430             Fn::GetAtt:
431             - notCompute0Key
432             - SecretAccessKey
433           stack_name:
434             Ref: AWS::StackName
435       rabbit:
436         host:
437           Fn::Select:
438             - 0
439             - Fn::Select:
440               - ctlplane
441               - Fn::GetAtt:
442                 - notCompute0
443                 - networks
444         username:
445           Ref: RabbitUserName
446         password:
447           Ref: RabbitPassword
448         cookie:
449           Fn::GetAtt:
450           - RabbitCookie
451           - value
452       ntp:
453         servers:
454             - {server: {Ref: NtpServer}, fudge: "stratum 0"}
455   notCompute0:
456     Type: OS::Nova::Server
457     Properties:
458       image:
459         Ref: notcomputeImage
460       image_update_policy:
461         Ref: ImageUpdatePolicy
462       flavor:
463         Ref: Flavor
464       key_name:
465         Ref: KeyName
466     Metadata:
467       os-collect-config:
468         cfn:
469           access_key_id:
470             Ref: notCompute0Key
471           path: notCompute0Config.Metadata
472           secret_access_key:
473             Fn::GetAtt:
474             - notCompute0Key
475             - SecretAccessKey
476           stack_name:
477             Ref: AWS::StackName
478 Outputs:
479   KeystoneURL:
480     Description: URL for the Overcloud Keystone service
481     Value:
482       Fn::Join:
483       - ''
484       - - http://
485         - Fn::Select:
486           - 0
487           - Fn::Select:
488             - ctlplane
489             - Fn::GetAtt:
490               - notCompute0
491               - networks
492         - :5000/v2.0/