Add recursive whole-file __include__ tag
[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   ComputeKey:
85     Properties:
86       UserName:
87         Ref: ComputeUser
88     Type: AWS::IAM::AccessKey
89   ComputeUser:
90     Properties:
91       Policies:
92       - Ref: ComputeAccessPolicy
93     Type: AWS::IAM::User
94   NovaCompute0Config:
95     Type: FileInclude
96     Path: nova-compute-instance.yaml
97     SubKey: Resources.NovaCompute0Config
98     Parameters:
99         NovaApiHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
100         KeystoneHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
101         RabbitHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
102         NeutronHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
103         GlanceHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
104         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ]}, '/nova']]}
105         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ]}, '/neutron']]}
106         NeutronNetworkType: "gre"
107         NeutronEnableTunnelling: "True"
108         NeutronNetworkVLANRanges: ""
109         NeutronBridgeMappings: ""
110         RabbitPassword: "guest"
111   NovaCompute0:
112     Type: FileInclude
113     Path: nova-compute-instance.yaml
114     SubKey: Resources.NovaCompute0
115   User:
116     Properties:
117       Policies:
118       - Ref: AccessPolicy
119     Type: AWS::IAM::User
120   notcomputeConfig:
121     Type: AWS::AutoScaling::LaunchConfiguration
122     Properties:
123       ImageId: '0'
124       InstanceType: '0'
125     Metadata:
126       OpenStack::Heat::Stack: {}
127       Openstack::ImageBuilder::Elements:
128       - boot-stack
129       - heat-cfntools
130       - heat-localip
131       - neutron-network-node
132       admin-password:
133         Ref: AdminPassword
134       admin-token:
135         Ref: AdminToken
136       cinder:
137         db: mysql://cinder:unset@localhost/cinder
138         volume_size_mb: '5000'
139         service-password:
140           Ref: CinderPassword
141       controller-address:
142         Fn::Select:
143          - 0
144          - Fn::Select:
145              - 'ctlplane'
146              - Fn::GetAtt:
147                - notcompute
148                - networks
149       db-password: unset
150       glance:
151         db: mysql://glance:unset@localhost/glance
152         host:
153           Fn::Select:
154            - 0
155            - Fn::Select:
156                - 'ctlplane'
157                - Fn::GetAtt:
158                  - notcompute
159                  - networks
160         service-password:
161           Ref: GlancePassword
162       os-collect-config:
163         cfn:
164           access_key_id:
165             Ref: Key
166           path: notcomputeConfig.Metadata
167           secret_access_key:
168             Fn::GetAtt:
169             - Key
170             - SecretAccessKey
171           stack_name:
172             Ref: AWS::StackName
173       heat:
174         admin_password:
175           Ref: HeatPassword
176         admin_tenant_name: service
177         admin_user: heat
178         auth_encryption_key: unset___________
179         db: mysql://heat:unset@localhost/heat
180         heat_watch_server_url:
181           Fn::Join:
182             - ''
183             - - 'http://'
184               - Fn::Select:
185                 - 0
186                 - Fn::Select:
187                   - 'ctlplane'
188                   - Fn::GetAtt:
189                     - notcompute
190                     - networks
191               - ':8003'
192         metadata_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               - ':8000'
204         waitcondition_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/v1/waitcondition'
216       interfaces:
217         control: eth0
218       keystone:
219         db: mysql://keystone:unset@localhost/keystone
220         host:
221           Fn::Select:
222             - 0
223             - Fn::Select:
224               - 'ctlplane'
225               - Fn::GetAtt:
226                 - notcompute
227                 - networks
228       nova:
229         compute_driver: libvirt.LibvirtDriver
230         db: mysql://nova:unset@localhost/nova
231         host:
232           Fn::Select:
233             - 0
234             - Fn::Select:
235               - 'ctlplane'
236               - Fn::GetAtt:
237                 - notcompute
238                 - networks
239         metadata-proxy: true
240         service-password:
241           Ref: NovaPassword
242       neutron:
243         host:
244           Fn::Select:
245             - 0
246             - Fn::Select:
247               - ctlplane
248               - Fn::GetAtt:
249                 - notcompute
250                 - networks
251         metadata_proxy_shared_secret: unset
252         ovs:
253           enable_tunneling: 'True'
254           local_ip:
255             Fn::Select:
256               - 0
257               - Fn::Select:
258                 - ctlplane
259                 - Fn::GetAtt:
260                   - notcompute
261                   - networks
262           public_interface: eth0
263           physical_bridge: br-ex
264           tenant_network_type: gre
265         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
266         service-password:
267           Ref: NeutronPassword
268       rabbit:
269         host:
270           Fn::Select:
271             - 0
272             - Fn::Select:
273               - ctlplane
274               - Fn::GetAtt:
275                 - notcompute
276                 - networks
277         password: guest
278   notcompute:
279     Type: OS::Nova::Server
280     Properties:
281       image:
282         Ref: notcomputeImage
283       flavor:
284         Ref: Flavor
285       key_name:
286         Ref: KeyName
287     Metadata:
288       os-collect-config:
289         cfn:
290           access_key_id:
291             Ref: Key
292           path: notcomputeConfig.Metadata
293           secret_access_key:
294             Fn::GetAtt:
295             - Key
296             - SecretAccessKey
297           stack_name:
298             Ref: AWS::StackName