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