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