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