f9ca995ac9fe7ff3363b907afe88300157643770
[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   NovaPassword:
52     Default: unset
53     Description: The password for the nova service account, used by nova-api.
54     Type: String
55     NoEcho: true
56   PowerUserName:
57     Default: stack
58     Description: What username to ssh to the virtual power host with.
59     Type: String
60   NeutronPublicInterface:
61     Default: eth0
62     Description: What interface to bridge onto br-ex for network nodes.
63     Type: String
64   notcomputeImage:
65     Type: String
66     Default: overcloud-control
67 Resources:
68   AccessPolicy:
69     Properties:
70       AllowedResources:
71       - notcompute
72       - notcomputeConfig
73     Type: OS::Heat::AccessPolicy
74   ComputeAccessPolicy:
75     Properties:
76       AllowedResources:
77       - NovaCompute0
78       - NovaCompute0Config
79     Type: OS::Heat::AccessPolicy
80   Key:
81     Properties:
82       UserName:
83         Ref: User
84     Type: AWS::IAM::AccessKey
85   CompletionCondition:
86     Type: AWS::CloudFormation::WaitCondition
87     DependsOn: notcompute
88     Properties:
89       Handle: {Ref: CompletionHandle}
90       Count: '1'
91       Timeout: '1800'
92   CompletionHandle:
93     Type: AWS::CloudFormation::WaitConditionHandle
94   ComputeKey:
95     Properties:
96       UserName:
97         Ref: ComputeUser
98     Type: AWS::IAM::AccessKey
99   ComputeUser:
100     Properties:
101       Policies:
102       - Ref: ComputeAccessPolicy
103     Type: AWS::IAM::User
104   NovaCompute0Config:
105     Type: FileInclude
106     Path: nova-compute-instance.yaml
107     SubKey: Resources.NovaCompute0Config
108     Parameters:
109         NovaApiHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
110         KeystoneHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
111         RabbitHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
112         NeutronHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
113         GlanceHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
114         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ]}, '/nova']]}
115         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ]}, '/neutron']]}
116         NeutronNetworkType: "gre"
117         NeutronEnableTunnelling: "True"
118         NeutronNetworkVLANRanges: ""
119         NeutronBridgeMappings: ""
120         RabbitPassword: "guest"
121   NovaCompute0:
122     Type: FileInclude
123     Path: nova-compute-instance.yaml
124     SubKey: Resources.NovaCompute0
125   User:
126     Properties:
127       Policies:
128       - Ref: AccessPolicy
129     Type: AWS::IAM::User
130   notcomputeConfig:
131     Type: AWS::AutoScaling::LaunchConfiguration
132     Properties:
133       ImageId: '0'
134       InstanceType: '0'
135     Metadata:
136       OpenStack::Heat::Stack: {}
137       Openstack::ImageBuilder::Elements:
138       - boot-stack
139       - heat-cfntools
140       - heat-localip
141       - neutron-network-node
142       admin-password:
143         Ref: AdminPassword
144       admin-token:
145         Ref: AdminToken
146       cinder:
147         db: mysql://cinder:unset@localhost/cinder
148         volume_size_mb: '5000'
149         service-password:
150           Ref: CinderPassword
151       completion-handle:
152         Ref: CompletionHandle
153       controller-address:
154         Fn::Select:
155          - 0
156          - Fn::Select:
157              - 'ctlplane'
158              - Fn::GetAtt:
159                - notcompute
160                - networks
161       db-password: unset
162       glance:
163         db: mysql://glance:unset@localhost/glance
164         host:
165           Fn::Select:
166            - 0
167            - Fn::Select:
168                - 'ctlplane'
169                - Fn::GetAtt:
170                  - notcompute
171                  - networks
172         service-password:
173           Ref: GlancePassword
174       os-collect-config:
175         cfn:
176           access_key_id:
177             Ref: Key
178           path: notcomputeConfig.Metadata
179           secret_access_key:
180             Fn::GetAtt:
181             - Key
182             - SecretAccessKey
183           stack_name:
184             Ref: AWS::StackName
185       heat:
186         admin_password:
187           Ref: HeatPassword
188         admin_tenant_name: service
189         admin_user: heat
190         auth_encryption_key: unset___________
191         db: mysql://heat:unset@localhost/heat
192         heat_watch_server_url:
193           Fn::Join:
194             - ''
195             - - 'http://'
196               - Fn::Select:
197                 - 0
198                 - Fn::Select:
199                   - 'ctlplane'
200                   - Fn::GetAtt:
201                     - notcompute
202                     - networks
203               - ':8003'
204         metadata_server_url:
205           Fn::Join:
206             - ''
207             - - 'http://'
208               - Fn::Select:
209                 - 0
210                 - Fn::Select:
211                   - 'ctlplane'
212                   - Fn::GetAtt:
213                     - notcompute
214                     - networks
215               - ':8000'
216         waitcondition_server_url:
217           Fn::Join:
218             - ''
219             - - 'http://'
220               - Fn::Select:
221                 - 0
222                 - Fn::Select:
223                   - 'ctlplane'
224                   - Fn::GetAtt:
225                     - notcompute
226                     - networks
227               - ':8000/v1/waitcondition'
228       keystone:
229         db: mysql://keystone:unset@localhost/keystone
230         host:
231           Fn::Select:
232             - 0
233             - Fn::Select:
234               - 'ctlplane'
235               - Fn::GetAtt:
236                 - notcompute
237                 - networks
238       nova:
239         compute_driver: libvirt.LibvirtDriver
240         db: mysql://nova:unset@localhost/nova
241         host:
242           Fn::Select:
243             - 0
244             - Fn::Select:
245               - 'ctlplane'
246               - Fn::GetAtt:
247                 - notcompute
248                 - networks
249         metadata-proxy: true
250         service-password:
251           Ref: NovaPassword
252       neutron:
253         host:
254           Fn::Select:
255             - 0
256             - Fn::Select:
257               - ctlplane
258               - Fn::GetAtt:
259                 - notcompute
260                 - networks
261         metadata_proxy_shared_secret: unset
262         ovs:
263           enable_tunneling: 'True'
264           local_ip:
265             Fn::Select:
266               - 0
267               - Fn::Select:
268                 - ctlplane
269                 - Fn::GetAtt:
270                   - notcompute
271                   - networks
272           public_interface:
273             Ref: NeutronPublicInterface
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