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