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