6192cc1a6050ec94f657d1714f2d9feab99afa05
[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   PowerUserName:
81     Default: stack
82     Description: What username to ssh to the virtual power host with.
83     Type: String
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       - notcompute
111       - notcomputeConfig
112     Type: OS::Heat::AccessPolicy
113   ComputeAccessPolicy:
114     Properties:
115       AllowedResources:
116       - NovaCompute0
117       - NovaCompute0Config
118     Type: OS::Heat::AccessPolicy
119   Key:
120     Properties:
121       UserName:
122         Ref: User
123     Type: AWS::IAM::AccessKey
124   CompletionCondition:
125     Type: AWS::CloudFormation::WaitCondition
126     DependsOn: notcompute
127     Properties:
128       Handle: {Ref: CompletionHandle}
129       Count: '1'
130       Timeout: '1800'
131   CompletionHandle:
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": [notcompute, networks]} ]} ] }
156         KeystoneHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
157         RabbitHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
158         NeutronHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
159         GlanceHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
160         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ]}, '/nova']]}
161         CeilometerDSN: {"Fn::Join": ['', ['mysql://ceilometer:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ]}, '/ceilometer']]}
162         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ]}, '/neutron']]}
163         NeutronNetworkType: "gre"
164         NeutronEnableTunnelling: "True"
165         NeutronNetworkVLANRanges: ""
166         NeutronBridgeMappings:
167             Ref: NeutronBridgeMappings
168         RabbitPassword: "guest"
169   NovaCompute0:
170     Type: FileInclude
171     Path: nova-compute-instance.yaml
172     SubKey: Resources.NovaCompute0
173   User:
174     Properties:
175       Policies:
176       - Ref: AccessPolicy
177     Type: AWS::IAM::User
178   notcomputeConfig:
179     Type: AWS::AutoScaling::LaunchConfiguration
180     Properties:
181       ImageId: '0'
182       InstanceType: '0'
183     Metadata:
184       OpenStack::Heat::Stack: {}
185       OpenStack::ImageBuilder::Elements:
186       - boot-stack
187       - heat-cfntools
188       - heat-localip
189       - neutron-network-node
190       admin-password:
191         Ref: AdminPassword
192       admin-token:
193         Ref: AdminToken
194       bootstack:
195         public_interface_ip:
196           Ref: NeutronPublicInterfaceIP
197       cinder:
198         db: mysql://cinder:unset@localhost/cinder
199         volume_size_mb: '5000'
200         service-password:
201           Ref: CinderPassword
202       completion-handle:
203         Ref: CompletionHandle
204       controller-address:
205         Fn::Select:
206          - 0
207          - Fn::Select:
208              - 'ctlplane'
209              - Fn::GetAtt:
210                - notcompute
211                - networks
212       db-password: unset
213       glance:
214         backend: swift
215         db: mysql://glance:unset@localhost/glance
216         host:
217           Fn::Select:
218            - 0
219            - Fn::Select:
220                - 'ctlplane'
221                - Fn::GetAtt:
222                  - notcompute
223                  - networks
224         service-password:
225           Ref: GlancePassword
226         swift-store-user: service:glance
227         swift-store-key:
228           Ref: GlancePassword
229       heat:
230         admin_password:
231           Ref: HeatPassword
232         admin_tenant_name: service
233         admin_user: heat
234         auth_encryption_key: unset___________
235         db: mysql://heat:unset@localhost/heat
236         watch_server_url:
237           Fn::Join:
238             - ''
239             - - 'http://'
240               - Fn::Select:
241                 - 0
242                 - Fn::Select:
243                   - 'ctlplane'
244                   - Fn::GetAtt:
245                     - notcompute
246                     - networks
247               - ':8003'
248         metadata_server_url:
249           Fn::Join:
250             - ''
251             - - 'http://'
252               - Fn::Select:
253                 - 0
254                 - Fn::Select:
255                   - 'ctlplane'
256                   - Fn::GetAtt:
257                     - notcompute
258                     - networks
259               - ':8000'
260         waitcondition_server_url:
261           Fn::Join:
262             - ''
263             - - 'http://'
264               - Fn::Select:
265                 - 0
266                 - Fn::Select:
267                   - 'ctlplane'
268                   - Fn::GetAtt:
269                     - notcompute
270                     - networks
271               - ':8000/v1/waitcondition'
272       keystone:
273         db: mysql://keystone:unset@localhost/keystone
274         host:
275           Fn::Select:
276             - 0
277             - Fn::Select:
278               - 'ctlplane'
279               - Fn::GetAtt:
280                 - notcompute
281                 - networks
282       neutron:
283         host:
284           Fn::Select:
285             - 0
286             - Fn::Select:
287               - ctlplane
288               - Fn::GetAtt:
289                 - notcompute
290                 - networks
291         metadata_proxy_shared_secret: unset
292         ovs:
293           enable_tunneling: 'True'
294           local_ip:
295             Fn::Select:
296               - 0
297               - Fn::Select:
298                 - ctlplane
299                 - Fn::GetAtt:
300                   - notcompute
301                   - networks
302           bridge_mappings: {Ref: NeutronBridgeMappings}
303           public_interface:
304             Ref: NeutronPublicInterface
305           public_interface_raw_device:
306             Ref: NeutronPublicInterfaceRawDevice
307           public_interface_route:
308             Ref: NeutronPublicInterfaceDefaultRoute
309           physical_bridge: br-ex
310           tenant_network_type: gre
311         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
312         service-password:
313           Ref: NeutronPassword
314       ceilometer:
315         db: mysql://ceilometer:unset@localhost/ceilometer
316         metering_secret: {Ref: CeilometerMeteringSecret}
317         service-password:
318           Ref: CeilometerPassword
319       nova:
320         compute_driver: libvirt.LibvirtDriver
321         db: mysql://nova:unset@localhost/nova
322         default_floating_pool:
323           ext-net
324         host:
325           Fn::Select:
326             - 0
327             - Fn::Select:
328               - 'ctlplane'
329               - Fn::GetAtt:
330                 - notcompute
331                 - networks
332         metadata-proxy: true
333         service-password:
334           Ref: NovaPassword
335       os-collect-config:
336         cfn:
337           access_key_id:
338             Ref: Key
339           path: notcomputeConfig.Metadata
340           secret_access_key:
341             Fn::GetAtt:
342             - Key
343             - SecretAccessKey
344           stack_name:
345             Ref: AWS::StackName
346       rabbit:
347         host:
348           Fn::Select:
349             - 0
350             - Fn::Select:
351               - ctlplane
352               - Fn::GetAtt:
353                 - notcompute
354                 - networks
355         password: guest
356       ntp:
357         servers:
358             - {server: {Ref: NtpServer}, fudge: "stratum 0"}
359   notcompute:
360     Type: OS::Nova::Server
361     Properties:
362       image:
363         Ref: notcomputeImage
364       image_update_policy:
365         Ref: ImageUpdatePolicy
366       flavor:
367         Ref: Flavor
368       key_name:
369         Ref: KeyName
370     Metadata:
371       os-collect-config:
372         cfn:
373           access_key_id:
374             Ref: Key
375           path: notcomputeConfig.Metadata
376           secret_access_key:
377             Fn::GetAtt:
378             - Key
379             - SecretAccessKey
380           stack_name:
381             Ref: AWS::StackName
382 Outputs:
383   KeystoneURL:
384     Description: URL for the Overcloud Keystone service
385     Value:
386       Fn::Join:
387       - ''
388       - - http://
389         - Fn::Select:
390           - 0
391           - Fn::Select:
392             - ctlplane
393             - Fn::GetAtt:
394               - notcompute
395               - networks
396         - :5000/v2.0/