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