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