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
|
## Licensed under the Apache License, Version 2.0 (the "License"); you may
## not use this file except in compliance with the License. You may obtain
## a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
## License for the specific language governing permissions and limitations
## under the License.
tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
metadata:
template_name: tosca_simple_profile_for_nfv_vRNC
template_author: opnfv_parser_project_from_zte
template_version: tosca_simple_profile_for_nfv_1_0
# Optional description of the definitions inside the file.
description: >
TOSCA simple profile for RNC
1. Compute Node MM, CM, DM, LB...
1.1 MM: MaintainModule;
1.2 CM: Control Module;
1.3 DM: Data Module;
1.4 LB: LineCard Module
2. Network Node VL and CP
imports:
- Simple_RNC_definition.yaml
# list of YAML alias anchors (or macros)
dsl_definitions:
compute_props_os_DEF: &compute_props_os_DEF
architecture: x86_64
type: Linux
distribution: Ubuntu
version: 14.10
compute_props_host_MM: &compute_props_host_MM
disk_size: 80 GB
iops: 300
num_cpus: 8
mem_size: 8192 MB
swap: 512 MB
compute_props_host_CM: &compute_props_host_CM
disk_size: 0 GB
num_cpus: 8
mem_size: 8192 MB
compute_props_host_DM: &compute_props_host_DM
disk_size: 0 GB
num_cpus: 8
mem_size: 8192 MB
compute_props_host_LB: &compute_props_host_LB
disk_size: 0 GB
num_cpus: 4
mem_size: 8192 MB
# topology template definition of the cloud application or service
topology_template:
# a description of the topology template
description: >
simple RNC template
inputs:
mm_storage_size:
type: integer
default: 40 GB
description: mm additional block storage size
constraints:
- in_range: [ 1, 200 ]
substitution_mappings:
node_type: rnc.nodes.VNF
properties:
vnfmtype: UMTS
requirements:
virtualLink_VNFM: [ MM_Port_CTRL, virtualLink ]
virtualLink_EMS: [ MM_Port_EMS, virtualLink ]
virtualLink_TRAFFIC: [ LB_Port_EXTERMEDIA, virtualLink ]
# definition of the node templates of the topology
node_templates:
MM_Active:
type: rnc.nodes.compute.MM
properties:
activestatus: 1
capabilities:
os:
properties: *compute_props_os_DEF
host:
properties: *compute_props_host_MM
requirements:
- local_storage:
node: MM_BlockStorage
relationship: Storage_attachesto
- high_availability: MM_Passive
artifacts:
#the VM image of MM
vm_image: mm.image
interfaces:
Standard:
create:
implementation: mm_install.sh
configure:
implementation: mm_active_configure.sh
attributes:
ip_address: { get_attribute: [ SELF, private_address ] }
MM_Passive:
type: rnc.nodes.compute.MM
properties:
activestatus: 0
capabilities:
os:
properties: *compute_props_os_DEF
host:
properties: *compute_props_host_MM
requirements:
- local_storage:
node: MM_BlockStorage
relationship: Storage_attachesto
- high_availability: MM_Active
artifacts:
#the VM image of MM
vm_image: mm.image
interfaces:
Standard:
create:
implementation: mm_install.sh
configure:
implementation: mm_passvie_configure.sh
attributes:
ip_address: { get_attribute: [ SELF, private_address ] }
CM_Active:
type: rnc.nodes.compute.CM
properties:
activestatus: 1
capabilities:
os:
properties: *compute_props_os_DEF
host:
properties: *compute_props_host_CM
scalable:
properties:
min_instances: 1
max_instances: 126
default_instances: 1
requirements:
- high_availability: CM_Passive
artifacts:
#the VM image of CM
vm_image: cm.image
interfaces:
Standard:
create:
implementation: cm_install.sh
configure:
implementation: cm_active_configure.sh
attributes:
ip_address: { get_attribute: [ SELF, private_address ] }
CM_Passive:
type: rnc.nodes.compute.CM
properties:
activestatus: 0
capabilities:
os:
properties: *compute_props_os_DEF
host:
properties: *compute_props_host_CM
scalable:
properties:
min_instances: 1
max_instances: 126
default_instances: 1
requirements:
- high_availability: CM_Active
artifacts:
#the VM image of CM
vm_image: mm.image
interfaces:
Standard:
create:
implementation: cm_install.sh
configure:
implementation: cm_passvie_configure.sh
attributes:
ip_address: { get_attribute: [ SELF, private_address ] }
DM:
type: rnc.nodes.compute.DM
capabilities:
os:
properties: *compute_props_os_DEF
host:
properties: *compute_props_host_DM
scalable:
properties:
min_instances: 1
max_instances: 120
default_instances: 1
artifacts:
vm_image: dm.image
interfaces:
Standard:
create:
implementation: dm_install.sh
configure:
implementation: dm_configure.sh
attributes:
ip_address: { get_attribute: [ SELF, private_address ] }
LB:
type: rnc.nodes.compute.LB
capabilities:
os:
properties: *compute_props_os_DEF
host:
properties: *compute_props_host_LB
scalable:
properties:
min_instances: 1
max_instances: 20
default_instances: 1
artifacts:
#the VM image of LB
vm_image: lb.image
interfaces:
Standard:
create:
implementation: lb_install.sh
configure:
implementation: lb_configure.sh
attributes:
ip_address: { get_attribute: [ SELF, private_address ] }
MM_BlockStorage:
type: rnc.nodes.BlockStorage
properties:
size: { get_input: mm_storage_size }
interfaces:
Configure:
post_configure_target:
implementation: default_script.sh
CTRL_Net:
type: rnc.nodes.VL
properties:
vendor: ZTE
cidr: "128.0.0.0/8"
network_name: Ctrl_Net
network_type: vlan
segmentation_id: 110
dhcp_enabled: false
INTERMEDIA_Net:
type: rnc.nodes.VL
properties:
vendor: ZTE
cidr: 10.0.0.0/8
start_ip: 10.1.0.1
end_ip: 10.1.2.254
network_name: InterMedia_Net
network_type: vlan
segmentation_id: 111
dhcp_enabled: false
EXTERMEDIA_Net:
type: rnc.nodes.VL
properties:
vendor: ZTE
cidr: 172.1.0.0/16
start_ip: 172.1.0.2
end_ip: 172.1.2.254
gateway_ip: 172.1.0.1
network_name: ExterMdedia_Net
network_type: vlan
segmentation_id: 100
dhcp_enabled: false
EMS_Net:
type: rnc.nodes.VL
properties:
vendor: ZTE
cidr: 129.0.0.0/24
start_ip: 129.0.0.2
end_ip: 129.0.0.64
gateway_ip: 129.0.0.1
network_name: Ems_Net
network_type: vlan
segmentation_id: 101
dhcp_enabled: false
MM_Port_EMS:
type: rnc.nodes.CP
properties:
order: 0
is_default: true
requirements:
- virtualBinding: MM_Active
- virtualLink: EMS_Net
MM_Port_CTRL:
type: rnc.nodes.CP
properties:
order: 1
is_default: false
requirements:
- virtualBinding: MM_Active
- virtualLink: CTRL_Net
MM_Port_EXTERMEDIA:
type: rnc.nodes.CP
properties:
order: 2
is_default: false
requirements:
- virtualBinding: MM_Active
- virtualLink: EXTERMEDIA_Net
CM_Port_CTRL:
type: rnc.nodes.CP
properties:
order: 0
is_default: true
requirements:
- virtualBinding: CM_Active
- virtualLink: CTRL_Net
CM_Port_INTERMEDIA:
type: rnc.nodes.CP
properties:
order: 1
is_default: false
requirements:
- virtualBinding: CM_Active
- virtualLink: INTERMEDIA_Net
DM_Port_CTRL:
type: rnc.nodes.CP
properties:
order: 0
is_default: true
requirements:
- virtualBinding: DM
- virtualLink: CTRL_Net
DM_Port_INTERMEDIA:
type: rnc.nodes.CP
properties:
order: 1
is_default: false
requirements:
- virtualBinding: DM
- virtualLink: INTERMEDIA_Net
LB_Port_CTRL:
type: rnc.nodes.CP
properties:
order: 0
is_default: true
requirements:
- virtualBinding: LB
- virtualLink: CTRL_Net
LB_Port_INTERMEDIA:
type: rnc.nodes.CP
properties:
order: 1
is_default: false
requirements:
- virtualBinding: LB
- virtualLink: INTERMEDIA_Net
LB_Port_EXTERMEDIA:
type: rnc.nodes.CP
properties:
order: 2
is_default: false
requirements:
- virtualBinding: LB
- virtualLink: EXTERMEDIA_Net
# definition of the relationship templates of the topology
relationship_templates:
Storage_attachesto:
type: tosca.relationships.AttachesTo
properties:
location: /data_location
# definition of output parameters for the topology template
outputs:
private_ip_of_MM:
description: The private IP address of the MM.
value: { get_attribute: [ MM_Active, private_address ] }
private_ip_of_CM:
description: The private IP address of the CM.
value: { get_attribute: [ CM_Active, private_address ] }
private_ip_of_DM:
description: The private IP address of the DM.
value: { get_attribute: [ DM, private_address ] }
private_ip_of_LB:
description: The private IP address of the LB.
value: { get_attribute: [ LB, private_address ] }
# definition of logical groups of node templates within the topology
# To be continue about this section
groups:
AnitAffinityServerGroup:
type: tosca.groups.Root
description: >
Logical component grouping for anti affinity placement,
MM_Acitve, MM_Passive, CM_Acitve, CM_Passive, LB must host
on different host to reduce the impact to each other.
members: [ MM_Active, MM_Passive, CM_Active, CM_Passive, LB ]
policies:
type: tosca.policy.placement.Antilocate
AffinityServerGroup:
type: tosca.groups.Root
description: >
Logical component grouping for affinity placement,
CM and DM will be host on the same host to get high performence
members: [ CM_Active, DM ]
policies:
type: tosca.policy.placement.Antilocate
policies:
- AnitAffinityPolicy:
type: tosca.policies.Placement.Antilocate
description: Apply anti-locate placement policy to group
targets: [ AnitAffinityServerGroup ]
- AffinityPolicy:
type: tosca.policies.Placement.Colocate
description: Apply anti-locate placement policy to group
targets: [ AffinityServerGroup ]
# ServerGroupScaling_DM: # added future
# members: [ DM, ]# only one, will be error
# policies:
# - name: MyScaleUpPolicy
# - type: tosca.policy.scale.up | tosca.policy.scale.down
# - rule: fn.utilizaton [ DM ], greater_than: 80
# - trigger: script_dm
# ServerGroupScaling_LB: # added future
# members: [ LB, ] # only one, will be error
# policies:
# - name: MyScaleUpPolicy
# - type: tosca.policy.scale.up | tosca.policy.scale.down
# - rule: fn.utilizaton [ LB ], greater_than: 80
# - trigger: script_lb
|