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