blob: fdf34e02fda29c0802f0c0cd4d2a3dbbf45f2cab (
plain)
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
|
heat_template_version: 2015-04-30
description: Base Module of Sample VNF
parameters:
# ONAP Assigned Parameters
workload_context:
type: string
description: Unique ID for this VNF instance
environment_context:
type: string
description: Unique ID for this VNF instance
vnf_id:
type: string
description: Unique ID for this VNF instance
vf_module_id:
type: string
description: Unique ID for this VNF module instance
vf_module_index:
type: number
description: Index of this VF Module
vnf_name:
type: string
description: Unique name for this VNF instance
# Availability Zones
availability_zone_0:
type: string
description: Primary Availability Zone
availability_zone_1:
type: string
description: Secondary Availability Zone
# External Networks
oam_net_id:
type: string
description: Operations, Administration, and Management Network
oam_subnet_id:
type: string
description: Subnet for OAM Network
ha_net_id:
type: string
description: High Availability Network
ctrl_net_id:
type: string
description: Control Plane network
ctrl_subnet_id:
type: string
description: Subnet for High Availability Network
# Server Inputs: Database
db_name_0:
type: string
description: Primary DB Server Name
db_name_1:
type: string
description: Secondary DB
db_image_name:
type: string
description: Database VM Image Name
db_flavor_name:
type: string
description: Database VM Flavor Name
db_ha_floating_v6_ip:
type: string
description: Database Floating IPv6 Address for HA
db_ha_floating_ip:
type: string
description: Database Floating IPv4 Address for HA
db_oam_ip_0:
type: string
description: Fixed IPv4 Address for OAM
db_oam_ip_1:
type: string
description: Fixed IPv4 Address for OAM
db_vol0_id:
type: string
description: Volume ID for DB in AZ 0
db_vol1_id:
type: string
description: Volume ID for DB in AZ 1
# Server Inputs: Loadbalancer
lb_name_0:
type: string
description: Load Balancer Name
lb_image_name:
type: string
description: Loadbalancer VM Image
lb_flavor_name:
type: string
description: Loadbalancer VM Flavor
lb_ha_floating_ip:
type: string
description: Floating HA IP for LB
lb_ha_floating_v6_ip:
type: string
description: Floating HA IP for LB
# Server Inputs: Webservice Controller Plane Interface (mgmt)
mgmt_name_0:
type: string
description: List of Management VM Names
mgmt_image_name:
type: string
description: Management VM Image
mgmt_flavor_name:
type: string
description: Management VM Flavor
mgmt_ctrl_ip_0:
type: string
description: IP to web service for control plane
mgmt_ctrl_v6_ip_0:
type: string
description: IP to web service for control plane
# Server Inputs: Services
svc_names:
type: comma_delimited_list
description: Service VM Names
svc_image_name:
type: string
description: Service VM Image
svc_flavor_name:
type: string
description: Service VM Flavor
svc_count:
type: number
description: Number of instances of Service to create
resources:
int_private_network:
type: OS::Neutron::Net
int_private_subnet:
type: OS::Neutron::Subnet
properties:
name:
str_replace:
template: $VNF_NAME-private_subnet
params:
$VNF_NAME: { get_param: vnf_name }
network: { get_resource: int_private_network }
db_server_0:
type: OS::Nova::Server
properties:
image: { get_param: db_image_name }
flavor: { get_param: db_flavor_name }
name: { get_param: db_name_0 }
metadata:
vnf_id: { get_param: vnf_id }
vf_module_id: { get_param: vf_module_id }
vf_module_index: { get_param: vf_module_index }
vnf_name: { get_param: vnf_name }
workload_context: { get_param: workload_context }
environment_context: { get_param: environment_context }
networks:
- port: { get_resource: db_0_int_private_port_0 }
- port: { get_resource: db_0_ha_port_0 }
- port: { get_resource: db_0_oam_port_0 }
user_data: { get_file: user.data }
availability_zone: { get_param: availability_zone_0 }
db_server_1:
type: OS::Nova::Server
properties:
image: { get_param: db_image_name }
flavor: { get_param: db_flavor_name }
name: { get_param: db_name_1 }
metadata:
vnf_id: { get_param: vnf_id}
vf_module_id: { get_param: vf_module_id }
vnf_name: { get_param: vnf_name }
workload_context: { get_param: workload_context }
environment_context: { get_param: environment_context }
networks:
- port: {get_resource: db_1_int_private_port_0}
- port: {get_resource: db_1_ha_port_0}
- port: { get_resource: db_1_oam_port_0 }
availability_zone: { get_param: availability_zone_1 }
db_0_oam_port_0:
type: OS::Neutron::Port
properties:
network: { get_param: oam_net_id }
fixed_ips:
- subnet_id: { get_param: oam_subnet_id }
ip_address: { get_param: db_oam_ip_0 }
db_0_ha_port_0:
type: OS::Neutron::Port
properties:
network: { get_param: ha_net_id }
allowed_address_pairs:
- ip_address: {get_param: db_ha_floating_ip }
- ip_address: {get_param: db_ha_floating_v6_ip }
db_0_int_private_port_0:
type: OS::Neutron::Port
properties:
network: { get_resource: int_private_network }
fixed_ips:
- subnet_id: { get_resource: int_private_subnet }
db_1_oam_port_0:
type: OS::Neutron::Port
properties:
network: { get_param: oam_net_id }
fixed_ips:
- subnet_id: { get_param: oam_subnet_id }
ip_address: { get_param: db_oam_ip_1 }
db_1_ha_port_0:
type: OS::Neutron::Port
properties:
network: { get_param: ha_net_id }
allowed_address_pairs:
- ip_address: {get_param: db_ha_floating_ip }
- ip_address: {get_param: db_ha_floating_v6_ip }
db_1_int_private_port_0:
type: OS::Neutron::Port
properties:
network: { get_resource: int_private_network }
fixed_ips:
- subnet_id: { get_resource: int_private_subnet }
db_volume_attachment_0:
type: OS::Cinder::VolumeAttachment
properties:
volume_id: { get_param: db_vol0_id }
instance_uuid: { get_resource: db_server_0 }
db_volume_attachment_1:
type: OS::Cinder::VolumeAttachment
properties:
volume_id: { get_param: db_vol1_id }
instance_uuid: { get_resource: db_server_1 }
mgmt_server_0:
type: OS::Nova::Server
properties:
image: { get_param: mgmt_image_name }
flavor: { get_param: mgmt_flavor_name }
name: { get_param: mgmt_name_0 }
metadata:
vnf_id: { get_param: vnf_id }
vf_module_id: { get_param: vf_module_id }
vf_module_index: { get_param: vf_module_index }
vnf_name: { get_param: vnf_name }
workload_context: { get_param: workload_context }
environment_context: { get_param: environment_context }
networks:
- port: { get_resource: mgmt_0_int_private_port_0 }
- port: { get_resource: mgmt_0_ctrl_port_0 }
user_data: { get_file: user.data }
availability_zone: { get_param: availability_zone_0 }
mgmt_0_int_private_port_0:
type: OS::Neutron::Port
properties:
network: { get_resource: int_private_network }
fixed_ips:
- subnet_id: { get_resource: int_private_subnet }
mgmt_0_ctrl_port_0:
type: OS::Neutron::Port
properties:
network: { get_param: ctrl_net_id }
fixed_ips:
- subnet: { get_param: ctrl_subnet_id }
- ip_address: { get_param: mgmt_ctrl_ip_0 }
- ip_address: { get_param: mgmt_ctrl_v6_ip_0}
lb_server_0:
type: OS::Nova::Server
properties:
image: { get_param: lb_image_name }
flavor: { get_param: lb_flavor_name }
name: { get_param: lb_name_0 }
metadata:
vnf_id: { get_param: vnf_id }
vf_module_id: { get_param: vf_module_id }
vf_module_index: { get_param: vf_module_index }
vnf_name: { get_param: vnf_name }
workload_context: { get_param: workload_context }
environment_context: { get_param: environment_context }
networks:
- port: { get_resource: lb_0_int_private_port_0 }
- port: { get_resource: lb_0_ha_port_0 }
user_data: { get_file: user.data }
availability_zone: { get_param: availability_zone_0 }
lb_0_ha_port_0:
type: OS::Neutron::Port
properties:
network: { get_param: ha_net_id }
allowed_address_pairs:
- ip_address: {get_param: lb_ha_floating_ip }
- ip_address: {get_param: lb_ha_floating_v6_ip }
lb_0_int_private_port_0:
type: OS::Neutron::Port
properties:
network: { get_resource: int_private_network }
fixed_ips:
- subnet_id: { get_resource: int_private_subnet }
svc_resource_group_0:
type: OS::Heat::ResourceGroup
properties:
count: { get_param: svc_count }
resource_def:
type: nested_svc.yaml
properties:
workload_context: {get_param: workload_context}
environment_context: {get_param: environment_context}
vnf_id: {get_param: vnf_id}
vf_module_id: {get_param: vf_module_id}
vnf_name: {get_param: vnf_name}
availability_zone_0: {get_param: availability_zone_0}
svc_names: {get_param: svc_names}
svc_image_name: {get_param: svc_image_name}
svc_flavor_name: {get_param: svc_flavor_name}
index: "%index%"
int_private_net_id: {get_resource: int_private_network}
int_private_subnet_id: {get_resource: int_private_subnet}
outputs:
int_private_subnet_id:
value: { get_resource: int_private_subnet }
int_private_net_id:
value: { get_resource: int_private_network }
|