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