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