bdbf721990e879e8a8e31f740818d5d8a09f4eb3
[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   Flavor:
21     Default: baremetal
22     Description: Flavor to request when deploying.
23     Type: String
24   GlancePassword:
25     Default: unset
26     Description: The password for the glance service account, used by the glance services.
27     Type: String
28     NoEcho: true
29   HeatPassword:
30     Default: unset
31     Description: The password for the Heat service account, used by the Heat services.
32     Type: String
33     NoEcho: true
34   ImageUpdatePolicy:
35     Default: 'REPLACE'
36     Description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
37     Type: String
38   KeyName:
39     Default: default
40     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
41     Type: String
42   NeutronBridgeMappings:
43     Description: The OVS logical->physical bridge mappings to use.
44     Type: String
45     Default: ''
46   NeutronPassword:
47     Default: unset
48     Description: The password for the neutron service account, used by neutron agents.
49     Type: String
50     NoEcho: true
51   CeilometerComputeAgent:
52     Description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
53     Type: String
54     Default: ''
55     AllowedValues: ['', Present]
56   CeilometerMeteringSecret:
57     Default: unset
58     Description: Secret shared by the ceilometer services.
59     Type: String
60     NoEcho: true
61   CeilometerPassword:
62     Default: unset
63     Description: The password for the ceilometer service account.
64     Type: String
65     NoEcho: true
66   NovaComputeDriver:
67     Default: libvirt.LibvirtDriver
68     Type: String
69   NovaComputeLibvirtType:
70     Default: ''
71     Type: String
72   NovaImage:
73     Type: String
74     Default: overcloud-compute
75   NovaPassword:
76     Default: unset
77     Description: The password for the nova service account, used by nova-api.
78     Type: String
79     NoEcho: true
80   NeutronFlatNetworks:
81     Type: String
82     Default: ''
83     Description: If set, flat networks to configure in neutron plugins.
84   NeutronPublicInterface:
85     Default: eth0
86     Description: What interface to bridge onto br-ex for network nodes.
87     Type: String
88   NeutronPublicInterfaceDefaultRoute:
89     Default: ''
90     Description: A custom default route for the NeutronPublicInterface.
91     Type: String
92   NeutronPublicInterfaceIP:
93     Default: ''
94     Description: A custom IP address to put onto the NeutronPublicInterface.
95     Type: String
96   NeutronPublicInterfaceRawDevice:
97     Default: ''
98     Description: If set, the public interface is a vlan with this device as the raw device.
99     Type: String
100   notcomputeImage:
101     Type: String
102     Default: overcloud-control
103   NtpServer:
104     Type: String
105     Default: ''
106 Resources:
107   AccessPolicy:
108     Properties:
109       AllowedResources:
110       - notCompute0
111       - notCompute0Config
112     Type: OS::Heat::AccessPolicy
113   ComputeAccessPolicy:
114     Properties:
115       AllowedResources:
116       - NovaCompute0
117       - NovaCompute0Config
118     Type: OS::Heat::AccessPolicy
119   notCompute0Key:
120     Properties:
121       UserName:
122         Ref: User
123     Type: AWS::IAM::AccessKey
124   notCompute0CompletionCondition:
125     Type: AWS::CloudFormation::WaitCondition
126     DependsOn: notCompute0
127     Properties:
128       Handle: {Ref: notCompute0CompletionHandle}
129       Count: '1'
130       Timeout: '1800'
131   notCompute0CompletionHandle:
132     Type: OS::Heat::UpdateWaitConditionHandle
133   NovaCompute0Key:
134     Type: FileInclude
135     Path: nova-compute-instance.yaml
136     SubKey: Resources.NovaCompute0Key
137   NovaCompute0CompletionCondition:
138     Type: FileInclude
139     Path: nova-compute-instance.yaml
140     SubKey: Resources.NovaCompute0CompletionCondition
141   NovaCompute0CompletionHandle:
142     Type: FileInclude
143     Path: nova-compute-instance.yaml
144     SubKey: Resources.NovaCompute0CompletionHandle
145   ComputeUser:
146     Properties:
147       Policies:
148       - Ref: ComputeAccessPolicy
149     Type: AWS::IAM::User
150   NovaCompute0Config:
151     Type: FileInclude
152     Path: nova-compute-instance.yaml
153     SubKey: Resources.NovaCompute0Config
154     Parameters:
155         NovaApiHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
156         KeystoneHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
157         RabbitHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
158         NeutronHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
159         GlanceHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
160         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ]}, '/nova']]}
161         CeilometerDSN: {"Fn::Join": ['', ['mysql://ceilometer:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ]}, '/ceilometer']]}
162         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ]}, '/neutron']]}
163         NeutronNetworkType: "gre"
164         NeutronEnableTunnelling: "True"
165         NeutronFlatNetworks:
166             Ref: NeutronFlatNetworks
167         NeutronNetworkVLANRanges: ""
168         NeutronBridgeMappings:
169             Ref: NeutronBridgeMappings
170         RabbitPassword: "guest"
171   NovaCompute0:
172     Type: FileInclude
173     Path: nova-compute-instance.yaml
174     SubKey: Resources.NovaCompute0
175   User:
176     Properties:
177       Policies:
178       - Ref: AccessPolicy
179     Type: AWS::IAM::User
180   notCompute0Config:
181     Type: AWS::AutoScaling::LaunchConfiguration
182     Properties:
183       ImageId: '0'
184       InstanceType: '0'
185     Metadata:
186       OpenStack::Heat::Stack: {}
187       OpenStack::ImageBuilder::Elements:
188       - boot-stack
189       - heat-cfntools
190       - heat-localip
191       - neutron-network-node
192       admin-password:
193         Ref: AdminPassword
194       admin-token:
195         Ref: AdminToken
196       bootstack:
197         public_interface_ip:
198           Ref: NeutronPublicInterfaceIP
199       cinder:
200         db: mysql://cinder:unset@localhost/cinder
201         volume_size_mb: '5000'
202         service-password:
203           Ref: CinderPassword
204       completion-handle:
205         Ref: notCompute0CompletionHandle
206       controller-address:
207         Fn::Select:
208          - 0
209          - Fn::Select:
210              - 'ctlplane'
211              - Fn::GetAtt:
212                - notCompute0
213                - networks
214       db-password: unset
215       glance:
216         backend: swift
217         db: mysql://glance:unset@localhost/glance
218         host:
219           Fn::Select:
220            - 0
221            - Fn::Select:
222                - 'ctlplane'
223                - Fn::GetAtt:
224                  - notCompute0
225                  - networks
226         service-password:
227           Ref: GlancePassword
228         swift-store-user: service:glance
229         swift-store-key:
230           Ref: GlancePassword
231       heat:
232         admin_password:
233           Ref: HeatPassword
234         admin_tenant_name: service
235         admin_user: heat
236         auth_encryption_key: unset___________
237         db: mysql://heat:unset@localhost/heat
238         watch_server_url:
239           Fn::Join:
240             - ''
241             - - 'http://'
242               - Fn::Select:
243                 - 0
244                 - Fn::Select:
245                   - 'ctlplane'
246                   - Fn::GetAtt:
247                     - notCompute0
248                     - networks
249               - ':8003'
250         metadata_server_url:
251           Fn::Join:
252             - ''
253             - - 'http://'
254               - Fn::Select:
255                 - 0
256                 - Fn::Select:
257                   - 'ctlplane'
258                   - Fn::GetAtt:
259                     - notCompute0
260                     - networks
261               - ':8000'
262         waitcondition_server_url:
263           Fn::Join:
264             - ''
265             - - 'http://'
266               - Fn::Select:
267                 - 0
268                 - Fn::Select:
269                   - 'ctlplane'
270                   - Fn::GetAtt:
271                     - notCompute0
272                     - networks
273               - ':8000/v1/waitcondition'
274       keystone:
275         db: mysql://keystone:unset@localhost/keystone
276         host:
277           Fn::Select:
278             - 0
279             - Fn::Select:
280               - 'ctlplane'
281               - Fn::GetAtt:
282                 - notCompute0
283                 - networks
284       neutron:
285         flat-networks: {Ref: NeutronFlatNetworks}
286         host:
287           Fn::Select:
288             - 0
289             - Fn::Select:
290               - ctlplane
291               - Fn::GetAtt:
292                 - notCompute0
293                 - networks
294         metadata_proxy_shared_secret: unset
295         ovs:
296           enable_tunneling: 'True'
297           local_ip:
298             Fn::Select:
299               - 0
300               - Fn::Select:
301                 - ctlplane
302                 - Fn::GetAtt:
303                   - notCompute0
304                   - networks
305           bridge_mappings: {Ref: NeutronBridgeMappings}
306           public_interface:
307             Ref: NeutronPublicInterface
308           public_interface_raw_device:
309             Ref: NeutronPublicInterfaceRawDevice
310           public_interface_route:
311             Ref: NeutronPublicInterfaceDefaultRoute
312           physical_bridge: br-ex
313           tenant_network_type: gre
314         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
315         service-password:
316           Ref: NeutronPassword
317       ceilometer:
318         db: mysql://ceilometer:unset@localhost/ceilometer
319         metering_secret: {Ref: CeilometerMeteringSecret}
320         service-password:
321           Ref: CeilometerPassword
322       nova:
323         compute_driver: libvirt.LibvirtDriver
324         db: mysql://nova:unset@localhost/nova
325         default_floating_pool:
326           ext-net
327         host:
328           Fn::Select:
329             - 0
330             - Fn::Select:
331               - 'ctlplane'
332               - Fn::GetAtt:
333                 - notCompute0
334                 - networks
335         metadata-proxy: true
336         service-password:
337           Ref: NovaPassword
338       os-collect-config:
339         cfn:
340           access_key_id:
341             Ref: notCompute0Key
342           path: notCompute0Config.Metadata
343           secret_access_key:
344             Fn::GetAtt:
345             - notCompute0Key
346             - SecretAccessKey
347           stack_name:
348             Ref: AWS::StackName
349       rabbit:
350         host:
351           Fn::Select:
352             - 0
353             - Fn::Select:
354               - ctlplane
355               - Fn::GetAtt:
356                 - notCompute0
357                 - networks
358         password: guest
359       ntp:
360         servers:
361             - {server: {Ref: NtpServer}, fudge: "stratum 0"}
362   notCompute0:
363     Type: OS::Nova::Server
364     Properties:
365       image:
366         Ref: notcomputeImage
367       image_update_policy:
368         Ref: ImageUpdatePolicy
369       flavor:
370         Ref: Flavor
371       key_name:
372         Ref: KeyName
373     Metadata:
374       os-collect-config:
375         cfn:
376           access_key_id:
377             Ref: notCompute0Key
378           path: notCompute0Config.Metadata
379           secret_access_key:
380             Fn::GetAtt:
381             - notCompute0Key
382             - SecretAccessKey
383           stack_name:
384             Ref: AWS::StackName
385 Outputs:
386   KeystoneURL:
387     Description: URL for the Overcloud Keystone service
388     Value:
389       Fn::Join:
390       - ''
391       - - http://
392         - Fn::Select:
393           - 0
394           - Fn::Select:
395             - ctlplane
396             - Fn::GetAtt:
397               - notCompute0
398               - networks
399         - :5000/v2.0/