VF-C User Guide
VF-C supports vCPE use case in R3, all VNFs are deployed through VF-C GVNFM . This page describes how to use VF-C to instantiate NS
sample VNF:
sample NS:
VF-C installation
If you want to try VF-C, the small project set should include: VF-C , Multicloud, MSB, A&AI.
VF-C components need to register to MSB when starting, so MSB components should be installed first, you can refer the following link to install MSB.
http://onap.readthedocs.io/en/latest/submodules/msb/apigateway.git/docs/platform/installation.html
Note: In the following steps, we use ${MSB_IP} as the IP of msb_apigateway component.
Install vfc-nfvo-db component
docker run -d -p 3306:3306 -p 6379:6379 --name vfc-db -v /var/lib/mysql nexus3.onap.org:10001/onap/vfc/db
we use ${VFC_DB_IP} as the IP of vfc-db component.Install vfc-nfvo-lcm component.
docker run -d -p 8403:8403 --name vfc-nslcm -e MSB_ADDR=${MSB_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/nslcmInstall vfc-nfvo-catalog component.
docker run -d -p 8806:8806 --name vfc-catalog -e MSB_ADDR=${MSB_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/catalogInstall vfc-nfvo-gvnfmdriver component.
docker run -d -p 8484:8484 --name vfc-gvnfmdriver -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/gvnfmdriverInstall vfc-gvnfm-vnflcm component.
docker run -d -p 8801:8801 --name vfc-vnflcm -e MSB_ADDR=${MSB_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/vnflcm
ESR Registration
Before we instantiate a service, we need to register vim and vnfm which is used to deploy vnfs.
VIM Registration
GVNFM Registration
For VF-C, because we use GVNFM to deploy vnfs , so you can register GVNFM in esr gui as follows:
Note: type should be gvnfmdriver which is the same with gvnfmdriver microservice
url is the msb-iag NodeIp:port
vim corresponds to cloudowner_cloudregionid which registered in step1
Package Onboarding
VF-C R3 support VNF/PNF/NS csar package upload from local csar file. VNF/PNF csar package should be uploaded first, then NS csar package can be uploaded.
Before onboarding a package, should create one record first.
Create VNF package record in catalog DB
Create VNF Package Record
curl -X POST \ http://172.30.3.104:30280/api/vnfpkgm/v1/vnf_packages \ -H 'Postman-Token: f9c45dea-b7bb-4acd-89e1-b9b1c3d70d8a' \ -H 'accept: application/json' \ -H 'cache-control: no-cache' \ -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \ -F 'userDefinedData= "key2": "value2"'
Note:
a. 172.30.3.104:30280 is the node IP and exposed port where the msb-iag pod is located.
b. userDefinedData is the key value pair which defined for the vnf package we created
Upload VNF package to VF-C catalog
Pub/Sub Test
curl -X PUT \ http://172.30.3.104:30280/api/vnfpkgm/v1/vnf_packages/38037a12-a0d4-4aa4-ac50-cd6b05ce0b24/package_content \ -H 'Postman-Token: 88ada218-86fd-4cd7-a06e-cc462f5df651' \ -H 'cache-control: no-cache' -H 'accept: application/json' \ -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \ -F 'file=@C:\ONAP\Integration\R3\vCPE\vnf-vsn.csar'
Note:
a. 38037a12-a0d4-4aa4-ac50-cd6b05ce0b24 is the vnf_pkg_id which we get from the first step
b. -F is used to specify the local vnf package fileCreate NS package record in catalog DB
Pub/Sub Test
curl -X POST \ http://172.30.3.104:30280/api/nsd/v1/ns_descriptors \ -H 'Postman-Token: 71b11910-1708-471c-84bb-5b0dd8d214a2' \ -H 'accept: application/json' \ -H 'cache-control: no-cache' \ -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \ -F 'userDefinedData= "key1": "value1"'
Note:
a. userDefinedData is the key value pair which defined for the ns package we createdUpload NS package to VF-C catalog
Pub/Sub Test
Note:
a. -F is used to specify the local ns package file
NS Life Cycle Management
Currently VF-C GVNFM support NS create/Instantiate/terminate/delete/heal.
VF-C R3 healing only suport restart a vm of an VNF.
NS Create
Pub/Sub Test
Note:
a. globalCustomerId and serviceType is defined in A&AI
b. csar Id is the NS package id which is consistent with the catalog ns package id
c. nsName is the NS nameNS Instantiate
Pub/Sub Test
Note
a. f0b4c09f-c653-438a-b091-5218b0f806ec is the ns instance id which create in step 1 : NS create
b. locationConstraints is an array which contains all the vnfs included under NSlocationConstraints is used to define the VIM( cloudOwner_cloudRegionId) that the VNF will be deployed
vnfProfileId is the vnf descriptor id which defined in NS template under node_templates .
c. before instantiate, you should create one volumntype which called root.NS Heal
Pub/Sub Test
Note:
a. f0b4c09f-c653-438a-b091-5218b0f806ec is the ns instance id which create in step 1 : NS create
b. "vnfInstanceId": "044b705c-e44d-4733-ab64-987f46d9b567" is the VNF instanceId, we can get this from A&AI or VF-C DB
c. action only support restartvm in Casablanca release
d. actionvminfo only supports to include one vm , vmid is the vmid which is the same with the vmid in cloud.NS Terminate
Pub/Sub Test
Note:
a. f0b4c09f-c653-438a-b091-5218b0f806ec is the ns instance id which create in step 1 : NS create
b. terminateType supports FORCEFUL and GRACEFULLc. gracefulTerminationTimeout is the wait time before execute terminate.NS delete
Pub/Sub Test
Note:
a. f0b4c09f-c653-438a-b091-5218b0f806ec is the ns instance id which create in step 1 : NS create