**由前面兩天介紹部屬完3GPP管理系統與NFV MANO系統,接下來要介紹VNF的通用樣板,而我們樣板使用TOSCA通用樣板,這點有在ETSI GS NFV-SOL 001裡被定義,因此我們先來介紹TOSCA樣板裡的幾個重要欄位,首先先來看一般VNF的通用樣板長的如何。
tosca_definitions_version: tosca_simple_yaml_1_0
topology_template:
node_templates:
VNF1:
type: tosca.nodes.nfv.VNF
properties:
descriptor_id: 367f45fd-1dd2-11b2-8000-08002mongodb
descriptor_version: 1.0
provider: imac
product_name: mongodb
software_version: latest
VDU1:
type: tosca.nodes.nfv.Vdu.Compute
properties:
sw_image_data:
name: free5gc-mongodb
provider: free5gmano
version: latest
diskFormat: raw
capabilities:
virtual_compute:
properties:
virtual_memory:
virtual_mem_size: 512Mi
virtual_cpu:
num_virtual_cpu: 500m
artifacts:
sw_image:
type: tosca.artifacts.nfv.SwImage
file: free5gmano/nextepc-mongodb
requirements:
virtual_storage:
properties:
type_of_storage: volume
size_of_storage: 20Gi
path_of_storage: /data/db
attributes:
namespace: default
replicas: 1
name_of_service: mongodb-svc
ports:
- 27017
CP1:
type: tosca.nodes.nfv.Cpd
properties:
layer_protocol: ipv4
requirements:
virtual_binding: VDU1
virtual_link: VL1
VL1:
type: tosca.nodes.nfv.VnfVirtualLink
properties:
network_name: management
vl_profile:
virtual_link_protocol_data:
l3_protocol_data:
dhcp_enabled: False
如果英文好一點的 可能已經可以看出大概是如何運作的,首先VNF的欄位 會填入VNF的ID名稱與版本等訊息
VDU 則會填入這個VNF部屬時需要的資訊 如使用的IMAGE,需要的空間,CPU與記憶體的使用量,跟要開放出來的port號等
最後CP與VL則是定義這個VNF的網路的設定資訊
而除了VNF的描述檔 我們還需要子網路切片的描述檔 告訴NFVO我們部屬的子網路切片有那些VNF,這個名稱統稱為NSD
tosca_definitions_version: tosca_simple_yaml_1_2
topology_template:
node_templates:
NS1:
type: tosca.nodes.nfv.NS
properties:
descriptor_id: 1b4dd4c7-1dd2-11b2-8000-080027b246c3
designer: imac
version: 1.0
name: free5gc-stage3.2.1-amd64
invariant_id: 1111-2222-aaaa-bbbb
constituent_vnfd:
- vnfd_id: 367f45fd-1dd2-11b2-8001-080027b24amf
- vnfd_id: 367f45fd-1dd2-11b2-8001-080027b2ausf
- vnfd_id: 367f45fd-1dd2-11b2-8001-080027b24nrf
- vnfd_id: 367f45fd-1dd2-11b2-8001-080027b2nssf
- vnfd_id: 367f45fd-1dd2-11b2-8001-080027b24pcf
- vnfd_id: 367f45fd-1dd2-11b2-8008-080027b24smf
- vnfd_id: 367f45fd-1dd2-11b2-8006-080027b24udm
- vnfd_id: 367f45fd-1dd2-11b2-8004-080027b24udr
- vnfd_id: 367f45fd-1dd2-11b2-8002-080027b24upf
- vnfd_id: 367f45fd-1dd2-11b2-8000-08002mongodb
- vnfd_id: 367f45fd-1dd2-11b2-8002-080027b25webui
除了NSD自己的ID與資訊,我們還需要填入剛剛可以看到的VNF的ID
最後我們還需要告訴NFVO他所能需要的資源型態 也就是NRM
{
"schema": "Slice template",
"description": "JSON based solution set definitions for network slice and network slice subnet",
"definitions": {
"networkSliceSubnet": {
"properties": {
"mFIdList": [],
"constituentNSSIIdList": [],
"operationalState": "ENABLED",
"administrativeState": "LOCKED",
"nsInfo": ""
}
},
"PrefReq": {
"type": "PerfReqEmbb",
"properties": {
"scenario": "Urban macro",
"expDataRateDL": "50 Mbps",
"expDataRateUL": "50 Mbps",
"areaTrafficCapDL": "50 Mbps",
"areaTrafficCapUL": "50 Mbps",
"userDensity": "10 000/km2",
"activityFactor": "20%",
"uESpeed": "Pedestrians and users in vehicles (up to 120 km/h)",
"coverage": "Full network"
}
},
"PlmnIdList": {
"mcc": "466",
"mnc": "01",
"operator": "Telecom01"
},
"SnssaiList": {
"sst": {
"value": "1",
"type": "eMBB",
"characteristics": "Slice suitable for the handling of 5G enhanced Mobile Broadband."
},
"sd": "FFFFFF"
}
}
}
最後將這三份 分別包成ZIP檔,上傳至free5gmano進行部屬,若沒發生錯誤且可以看到k8s上有pod被建立,及代表部屬成功,這部分會在下周實際包一份free5gc進行部屬測試