-
Notifications
You must be signed in to change notification settings - Fork 4
/
tripleo.yaml
469 lines (435 loc) · 13.7 KB
/
tripleo.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
heat_template_version: rocky
parameters:
OvercloudImage:
type: string
default: RHEL-8.4.0-x86_64-latest
UndercloudImage:
type: string
default: RHEL-8.4.0-x86_64-latest
UndercloudUsername:
type: string
default: stack
ControllerCount:
type: number
default: 3
ComputeCount:
type: number
default: 1
ExternalComputeCount:
type: number
default: 0
ControllerFlavor:
type: string
default: ci.m4.xlarge
ComputeFlavor:
type: string
default: m1.small
UndercloudFlavor:
type: string
default: m1.xlarge
KeyName:
type: string
default: jslagle
FloatingNetwork:
type: string
default: provider_net_sysops
PrivateKeyContents:
type: string
description: |
SSH private key absolute file path used to connect to the created
servers. The private key is needed so that the undercloud can SSH to the
overcloud nodes. Do not use a key that should be otherwise protected.
PublicKey:
type: string
description: |
SSH public key absolute file path used to connect to the created servers.
PublicKeyContents:
type: string
description: |
SSH public key contents used to connect to the created servers.
ContainerImagePrepareFile:
type: string
default: deploy-templates/container-image-prepare-osp17.yaml
EnvironmentName:
type: string
default: osp17
TripleOClientName:
type: string
default: python3-tripleoclient
PackageManagerName:
type: string
default: dnf
resources:
KeyPair:
type: OS::Nova::KeyPair
properties:
name:
list_join:
- '-'
- - {get_param: OS::stack_name}
- keypair
public_key: {get_param: PublicKeyContents}
DeployNetwork:
type: OS::Neutron::Net
properties:
name:
list_join:
- '-'
- - {get_param: OS::stack_name}
- deploy
port_security_enabled: false
ManagementNetwork:
type: OS::Neutron::Net
properties:
name:
list_join:
- '-'
- - {get_param: OS::stack_name}
- management
port_security_enabled: false
DeploySubnet:
type: OS::Neutron::Subnet
properties:
network: {get_resource: DeployNetwork}
allocation_pools:
- start: 192.168.24.1
end: 192.168.24.200
cidr: 192.168.24.0/24
enable_dhcp: false
gateway_ip: null
DeployStorageSubnet:
type: OS::Neutron::Subnet
properties:
network: {get_resource: DeployNetwork}
allocation_pools:
- start: 172.16.1.1
end: 172.16.1.200
cidr: 172.16.1.0/24
enable_dhcp: false
gateway_ip: null
DeployStorageMgmtSubnet:
type: OS::Neutron::Subnet
properties:
network: {get_resource: DeployNetwork}
allocation_pools:
- start: 172.16.3.1
end: 172.16.3.200
cidr: 172.16.3.0/24
enable_dhcp: false
gateway_ip: null
DeployInternalApiSubnet:
type: OS::Neutron::Subnet
properties:
network: {get_resource: DeployNetwork}
allocation_pools:
- start: 172.16.2.1
end: 172.16.2.200
cidr: 172.16.2.0/24
enable_dhcp: false
gateway_ip: null
DeployTenantSubnet:
type: OS::Neutron::Subnet
properties:
network: {get_resource: DeployNetwork}
allocation_pools:
- start: 172.16.0.1
end: 172.16.0.200
cidr: 172.16.0.0/24
enable_dhcp: false
gateway_ip: null
DeployExternalSubnet:
type: OS::Neutron::Subnet
properties:
network: {get_resource: DeployNetwork}
allocation_pools:
- start: 10.0.0.2
end: 10.0.0.200
cidr: 10.0.0.0/24
enable_dhcp: false
gateway_ip: null
ManagementSubnet:
type: OS::Neutron::Subnet
properties:
network: {get_resource: ManagementNetwork}
allocation_pools:
- start: 10.98.0.2
end: 10.98.0.200
enable_dhcp: true
cidr: 10.98.0.0/24
FloatingRouter:
type: OS::Neutron::Router
properties:
external_gateway_info:
network: {get_param: FloatingNetwork}
name:
list_join:
- '-'
- - {get_param: OS::stack_name}
- router
FloatingRouterInterface:
type: OS::Neutron::RouterInterface
properties:
router: {get_resource: FloatingRouter}
subnet: {get_resource: ManagementSubnet}
Undercloud:
type: OS::Nova::Server
properties:
flavor: {get_param: UndercloudFlavor}
key_name: {get_resource: KeyPair}
name:
str_replace:
template: STACK_NAME-undercloud
params:
STACK_NAME: {get_param: OS::stack_name}
image: {get_param: UndercloudImage}
networks:
- port: {get_resource: ManagementPort}
- port: {get_resource: DeployPort}
- port: {get_resource: ExternalPort}
- port: {get_resource: InternalApiPort}
user_data: {get_resource: UndercloudUserData}
user_data_format: RAW
UndercloudServerUserData:
type: server-user-data.yaml
UndercloudTripleOClientConfig:
type: OS::Heat::SoftwareConfig
properties:
config:
str_replace:
template: |
#!/usr/bin/bash
if rpm -q TRIPLEOCLIENT_NAME; then
sudo PACKAGE_MANAGER_NAME -y update TRIPLEOCLIENT_NAME
else
sudo PACKAGE_MANAGER_NAME -y install TRIPLEOCLIENT_NAME
fi
# Needed so the undercloud install doesn't fail fqdn validation
sudo hostnamectl set-hostname STACK_NAME.localdomain
params:
STACK_NAME: {get_param: OS::stack_name}
TRIPLEOCLIENT_NAME: {get_param: TripleOClientName}
PACKAGE_MANAGER_NAME: {get_param: PackageManagerName}
ContainerImagePrepareFiles:
type: OS::Heat::Value
properties:
value:
osp13: {get_file: deploy-templates/container-image-prepare-osp13.yaml}
osp16: {get_file: deploy-templates/container-image-prepare-osp16.yaml}
osp17: {get_file: deploy-templates/container-image-prepare-osp17.yaml}
osp17.1: {get_file: deploy-templates/container-image-prepare-osp17.yaml}
master: {get_file: deploy-templates/container-image-prepare-master.yaml}
UndercloudConfig:
type: OS::OSPHeatTemplates::UndercloudConfig
properties:
EnvironmentName: {get_param: EnvironmentName}
PublicKeyContents: {get_param: PublicKeyContents}
PrivateKeyContents: {get_param: PrivateKeyContents}
BaremetalDeployInput: {get_attr: [BaremetalDeployInput, value]}
DeployedServerPortMap: {get_attr: [DeployedServerPortMap, value]}
HostnameMap:
parameter_defaults:
HostnameMap:
map_merge:
list_concat:
- {get_attr: [Controllers, HostnameMap]}
- {get_attr: [Computes, HostnameMap]}
ContainerImagePrepareFiles: {get_attr: [ContainerImagePrepareFiles, value]}
UndercloudUserData:
type: OS::Heat::MultipartMime
properties:
parts:
list_concat:
- {get_attr: [UndercloudServerUserData, ServerUserData]}
- - config: {get_resource: UndercloudTripleOClientConfig}
subtype: x-shellscript
- config: {get_resource: UndercloudConfig}
BaremetalDeployInput:
type: OS::Heat::Value
properties:
value:
- name: Controller
count: {get_param: ControllerCount}
defaults:
managed: false
networks:
- network: ctlplane
- network: storage
- network: storage_mgmt
- network: internal_api
- network: tenant
- network: external
network_config:
template: /home/stack/net_config_multiple_nics.j2
instances: {get_attr: [Controllers, BaremetalDeployInput]}
- name: Compute
count: {get_param: ComputeCount}
defaults:
managed: false
networks:
- network: ctlplane
- network: storage
- network: storage_mgmt
- network: internal_api
- network: tenant
- network: external
network_config:
template: /home/stack/net_config_multiple_nics.j2
instances: {get_attr: [Computes, BaremetalDeployInput]}
DeployedServerPortMap:
type: OS::Heat::Value
properties:
value:
resource_registry:
OS::TripleO::DeployedServer::ControlPlanePort: /usr/share/openstack-tripleo-heat-templates/deployed-server/deployed-neutron-port.yaml
OS::TripleO::Network::Ports::ControlPlaneVipPort: /usr/share/openstack-tripleo-heat-templates/deployed-server/deployed-neutron-port.yaml
OS::TripleO::Network::Ports::RedisVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
OS::TripleO::Network::Ports::OVNDBsVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
parameter_defaults:
ControllerDeployedServerCount: {get_param: ControllerCount}
ComputeDeployedServerCount: {get_param: ComputeCount}
DeployedServerPortMap:
map_merge:
- control_virtual_ip:
fixed_ips:
- ip_address: 192.168.24.200
subnets:
- cidr: 192.168.24.0/24
- map_merge:
list_concat:
- get_attr: [Controllers, DeployedServerPortMap]
- get_attr: [Computes, DeployedServerPortMap]
ManagementPort:
type: OS::Neutron::Port
properties:
network: {get_resource: ManagementNetwork}
fixed_ips:
- ip_address: 10.98.0.5
subnet: {get_resource: ManagementSubnet}
DeployPort:
type: OS::Neutron::Port
properties:
network: {get_resource: DeployNetwork}
fixed_ips:
- ip_address: 192.168.24.1
subnet: {get_resource: DeploySubnet}
ExternalPort:
type: OS::Neutron::Port
properties:
network: {get_resource: DeployNetwork}
fixed_ips:
- ip_address: 10.0.0.5
subnet: {get_resource: DeployExternalSubnet}
InternalApiPort:
type: OS::Neutron::Port
properties:
network: {get_resource: DeployNetwork}
fixed_ips:
- ip_address: 172.16.2.180
subnet: {get_resource: DeployInternalApiSubnet}
# Not actually associated with the Undercloud server, resource is just here to
# reserve the IP so the undercloud install can use it.
UndercloudAdminVip:
type: OS::Neutron::Port
properties:
network: {get_resource: DeployNetwork}
fixed_ips:
- ip_address: 192.168.24.3
subnet: {get_resource: DeploySubnet}
# Not actually associated with the Undercloud server, resource is just here to
# reserve the IP so the undercloud install can use it.
UndercloudPublicVip:
type: OS::Neutron::Port
properties:
network: {get_resource: DeployNetwork}
fixed_ips:
- ip_address: 192.168.24.2
subnet: {get_resource: DeploySubnet}
UndercloudFloatingIP:
type: OS::Neutron::FloatingIP
properties:
floating_network: {get_param: FloatingNetwork}
UndercloudFloatingIpAssociation:
type: OS::Neutron::FloatingIPAssociation
depends_on: FloatingRouterInterface
properties:
floatingip_id: {get_resource: UndercloudFloatingIP}
port_id: {get_resource: ManagementPort}
Controllers:
type: OS::Heat::ResourceGroup
depends_on:
- DeploySubnet
- ManagementSubnet
properties:
count: {get_param: ControllerCount}
resource_def:
type: overcloud-server.yaml
properties:
flavor: {get_param: ControllerFlavor}
key_name: {get_resource: KeyPair}
name:
list_join:
- '-'
- - {get_param: OS::stack_name}
- 'controller'
- '%index%'
image: {get_param: OvercloudImage}
index: |
%index%
SubnetStart: 10
ManagementNetwork: {get_resource: ManagementNetwork}
DeployNetwork: {get_resource: DeployNetwork}
RoleLower: controller
Computes:
type: OS::Heat::ResourceGroup
depends_on:
- DeploySubnet
- ManagementSubnet
properties:
count: {get_param: ComputeCount}
resource_def:
type: overcloud-server.yaml
properties:
flavor: {get_param: ComputeFlavor}
key_name: {get_resource: KeyPair}
name:
list_join:
- '-'
- - {get_param: OS::stack_name}
- 'compute'
- '%index%'
image: {get_param: OvercloudImage}
index: |
%index%
SubnetStart: 100
ManagementNetwork: {get_resource: ManagementNetwork}
DeployNetwork: {get_resource: DeployNetwork}
RoleLower: novacompute
ExternalComputes:
type: OS::Heat::ResourceGroup
depends_on:
- DeploySubnet
- ManagementSubnet
properties:
count: {get_param: ExternalComputeCount}
resource_def:
type: overcloud-server.yaml
properties:
flavor: {get_param: ComputeFlavor}
key_name: {get_resource: KeyPair}
name:
list_join:
- '-'
- - {get_param: OS::stack_name}
- 'external-compute'
- '%index%'
image: {get_param: OvercloudImage}
index: |
%index%
SubnetStart: 160
ManagementNetwork: {get_resource: ManagementNetwork}
DeployNetwork: {get_resource: DeployNetwork}
RoleLower: external-novacompute
outputs:
UndercloudFloatingIP:
description: UndercloudFloatingIP
value: {get_attr: [UndercloudFloatingIP, floating_ip_address]}