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