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