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