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