Add metadata to configure swift
[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   KeyName:
35     Default: default
36     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
37     Type: String
38   NeutronPassword:
39     Default: unset
40     Description: The password for the neutron service account, used by neutron agents.
41     Type: String
42     NoEcho: true
43   NovaComputeDriver:
44     Default: libvirt.LibvirtDriver
45     Type: String
46   NovaComputeLibvirtType:
47     Default: ''
48     Type: String
49   NovaImage:
50     Type: String
51     Default: overcloud-compute
52   NovaPassword:
53     Default: unset
54     Description: The password for the nova service account, used by nova-api.
55     Type: String
56     NoEcho: true
57   PowerUserName:
58     Default: stack
59     Description: What username to ssh to the virtual power host with.
60     Type: String
61   NeutronPublicInterface:
62     Default: eth0
63     Description: What interface to bridge onto br-ex for network nodes.
64     Type: String
65   NeutronPublicInterfaceDefaultRoute:
66     Default: ''
67     Description: A custom default route for the NeutronPublicInterface.
68     Type: String
69   NeutronPublicInterfaceIP:
70     Default: ''
71     Description: A custom IP address to put onto the NeutronPublicInterface.
72     Type: String
73   NeutronPublicInterfaceRawDevice:
74     Default: ''
75     Description: If set, the public interface is a vlan with this device as the raw device.
76     Type: String
77   notcomputeImage:
78     Type: String
79     Default: overcloud-control
80 Resources:
81   AccessPolicy:
82     Properties:
83       AllowedResources:
84       - notcompute
85       - notcomputeConfig
86     Type: OS::Heat::AccessPolicy
87   ComputeAccessPolicy:
88     Properties:
89       AllowedResources:
90       - NovaCompute0
91       - NovaCompute0Config
92     Type: OS::Heat::AccessPolicy
93   Key:
94     Properties:
95       UserName:
96         Ref: User
97     Type: AWS::IAM::AccessKey
98   CompletionCondition:
99     Type: AWS::CloudFormation::WaitCondition
100     DependsOn: notcompute
101     Properties:
102       Handle: {Ref: CompletionHandle}
103       Count: '1'
104       Timeout: '1800'
105   CompletionHandle:
106     Type: AWS::CloudFormation::WaitConditionHandle
107   ComputeKey:
108     Properties:
109       UserName:
110         Ref: ComputeUser
111     Type: AWS::IAM::AccessKey
112   ComputeUser:
113     Properties:
114       Policies:
115       - Ref: ComputeAccessPolicy
116     Type: AWS::IAM::User
117   NovaCompute0Config:
118     Type: FileInclude
119     Path: nova-compute-instance.yaml
120     SubKey: Resources.NovaCompute0Config
121     Parameters:
122         NovaApiHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
123         KeystoneHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
124         RabbitHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
125         NeutronHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
126         GlanceHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
127         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ]}, '/nova']]}
128         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ]}, '/neutron']]}
129         NeutronNetworkType: "gre"
130         NeutronEnableTunnelling: "True"
131         NeutronNetworkVLANRanges: ""
132         NeutronBridgeMappings: ""
133         RabbitPassword: "guest"
134   NovaCompute0:
135     Type: FileInclude
136     Path: nova-compute-instance.yaml
137     SubKey: Resources.NovaCompute0
138   User:
139     Properties:
140       Policies:
141       - Ref: AccessPolicy
142     Type: AWS::IAM::User
143   notcomputeConfig:
144     Type: AWS::AutoScaling::LaunchConfiguration
145     Properties:
146       ImageId: '0'
147       InstanceType: '0'
148     Metadata:
149       OpenStack::Heat::Stack: {}
150       Openstack::ImageBuilder::Elements:
151       - boot-stack
152       - heat-cfntools
153       - heat-localip
154       - neutron-network-node
155       admin-password:
156         Ref: AdminPassword
157       admin-token:
158         Ref: AdminToken
159       bootstack:
160         public_interface_ip:
161           Ref: NeutronPublicInterfaceIP
162       cinder:
163         db: mysql://cinder:unset@localhost/cinder
164         volume_size_mb: '5000'
165         service-password:
166           Ref: CinderPassword
167       completion-handle:
168         Ref: CompletionHandle
169       controller-address:
170         Fn::Select:
171          - 0
172          - Fn::Select:
173              - 'ctlplane'
174              - Fn::GetAtt:
175                - notcompute
176                - networks
177       db-password: unset
178       glance:
179         backend: swift
180         db: mysql://glance:unset@localhost/glance
181         host:
182           Fn::Select:
183            - 0
184            - Fn::Select:
185                - 'ctlplane'
186                - Fn::GetAtt:
187                  - notcompute
188                  - networks
189         service-password:
190           Ref: GlancePassword
191         swift-store-user: service:glance
192         swift-store-key:
193           Ref: GlancePassword
194       heat:
195         admin_password:
196           Ref: HeatPassword
197         admin_tenant_name: service
198         admin_user: heat
199         auth_encryption_key: unset___________
200         db: mysql://heat:unset@localhost/heat
201         watch_server_url:
202           Fn::Join:
203             - ''
204             - - 'http://'
205               - Fn::Select:
206                 - 0
207                 - Fn::Select:
208                   - 'ctlplane'
209                   - Fn::GetAtt:
210                     - notcompute
211                     - networks
212               - ':8003'
213         metadata_server_url:
214           Fn::Join:
215             - ''
216             - - 'http://'
217               - Fn::Select:
218                 - 0
219                 - Fn::Select:
220                   - 'ctlplane'
221                   - Fn::GetAtt:
222                     - notcompute
223                     - networks
224               - ':8000'
225         waitcondition_server_url:
226           Fn::Join:
227             - ''
228             - - 'http://'
229               - Fn::Select:
230                 - 0
231                 - Fn::Select:
232                   - 'ctlplane'
233                   - Fn::GetAtt:
234                     - notcompute
235                     - networks
236               - ':8000/v1/waitcondition'
237       keystone:
238         db: mysql://keystone:unset@localhost/keystone
239         host:
240           Fn::Select:
241             - 0
242             - Fn::Select:
243               - 'ctlplane'
244               - Fn::GetAtt:
245                 - notcompute
246                 - networks
247       neutron:
248         host:
249           Fn::Select:
250             - 0
251             - Fn::Select:
252               - ctlplane
253               - Fn::GetAtt:
254                 - notcompute
255                 - networks
256         metadata_proxy_shared_secret: unset
257         ovs:
258           enable_tunneling: 'True'
259           local_ip:
260             Fn::Select:
261               - 0
262               - Fn::Select:
263                 - ctlplane
264                 - Fn::GetAtt:
265                   - notcompute
266                   - networks
267           public_interface:
268             Ref: NeutronPublicInterface
269           public_interface_raw_device:
270             Ref: NeutronPublicInterfaceRawDevice
271           public_interface_route:
272             Ref: NeutronPublicInterfaceDefaultRoute
273           physical_bridge: br-ex
274           tenant_network_type: gre
275         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
276         service-password:
277           Ref: NeutronPassword
278       nova:
279         compute_driver: libvirt.LibvirtDriver
280         db: mysql://nova:unset@localhost/nova
281         default_floating_pool:
282           ext-net
283         host:
284           Fn::Select:
285             - 0
286             - Fn::Select:
287               - 'ctlplane'
288               - Fn::GetAtt:
289                 - notcompute
290                 - networks
291         metadata-proxy: true
292         service-password:
293           Ref: NovaPassword
294       os-collect-config:
295         cfn:
296           access_key_id:
297             Ref: Key
298           path: notcomputeConfig.Metadata
299           secret_access_key:
300             Fn::GetAtt:
301             - Key
302             - SecretAccessKey
303           stack_name:
304             Ref: AWS::StackName
305       rabbit:
306         host:
307           Fn::Select:
308             - 0
309             - Fn::Select:
310               - ctlplane
311               - Fn::GetAtt:
312                 - notcompute
313                 - networks
314         password: guest
315   notcompute:
316     Type: OS::Nova::Server
317     Properties:
318       image:
319         Ref: notcomputeImage
320       flavor:
321         Ref: Flavor
322       key_name:
323         Ref: KeyName
324     Metadata:
325       os-collect-config:
326         cfn:
327           access_key_id:
328             Ref: Key
329           path: notcomputeConfig.Metadata
330           secret_access_key:
331             Fn::GetAtt:
332             - Key
333             - SecretAccessKey
334           stack_name:
335             Ref: AWS::StackName
336 Outputs:
337   KeystoneURL:
338     Description: URL for the Overcloud Keystone service
339     Value:
340       Fn::Join:
341       - ''
342       - - http://
343         - Fn::Select:
344           - 0
345           - Fn::Select:
346             - ctlplane
347             - Fn::GetAtt:
348               - notcompute
349               - networks
350         - :5000/v2.0/