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/nslcm - Install 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/catalog - Install 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/gvnfmdriver - Install 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
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
Pub/Sub Testcurl -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"'
Upload VNF package to VF-C catalog
Pub/Sub Testcurl -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'
Create NS package record in catalog DB
Pub/Sub Testcurl -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"'
Upload NS package to VF-C catalog
Pub/Sub Testcurl -X PUT \ http://172.30.3.104:30280/api/nsd/v1/ns_descriptors/79ca81ec-10e0-44e4-bc85-ba968f345711/nsd_content \ -H 'Postman-Token: f16e4a54-a514-4878-b307-9b80c630166e' \ -H 'cache-control: no-cache'
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 Testcurl -X POST \ http://172.30.3.104:30280/api/nslcm/v1/ns \ -H 'Postman-Token: 27e2c576-2d9b-4753-a6b0-6262a4a7ec86' \ -H 'accept: application/json' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -d '{ "context": { "globalCustomerId": "global-customer-id-test1", "serviceType": "service-type-test1" }, "csarId": "d5d678dc-80ef-461e-8630-d105f43b0a18", "nsName": "ns_vsn", "description": "description" }'
NS Instantiate
Pub/Sub Testcurl -X POST \ http://172.30.3.104:30280/api/nslcm/v1/ns/f0b4c09f-c653-438a-b091-5218b0f806ec/instantiate \ -H 'Postman-Token: 2a9542b2-3364-4a40-8513-45e10b8ca2ce' \ -H 'accept: application/json' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -d '{ "additionalParamForNs": { "sdnControllerId": "2" }, "locationConstraints": [{ "vnfProfileId": "45711f40-3f43-415b-bb45-46e5c6940735", "locationConstraints": { "vimId": "CPE-DC_RegionOne" } }] } '
NS Heal
Pub/Sub Testcurl -X PUT \ http://172.30.3.104:30280/api/nslcm/v1/ns/5443e9f8-7993-479d-8d7a-34e422eabc8f/heal \ -H 'Content-Type: application/json' \ -H 'Postman-Token: f18754b8-ed68-43b0-ae55-b8b8780e5c6a' \ -H 'accept: application/json' \ -H 'cache-control: no-cache' \ -d '{ "vnfInstanceId": "044b705c-e44d-4733-ab64-987f46d9b567", "cause": "restartvm", "additionalParams": { "action": "restartvm", "actionvminfo": { "vmid": "1623cd25-ae6f-4880-8132-15914367e47b", "vduid": "", "vmname": "1623cd25-ae6f-4880-8132-15914367e47b" }} }'
NS Terminate
Pub/Sub Testcurl -X POST \ http://172.30.3.104:30280/api/nslcm/v1/ns/f0b4c09f-c653-438a-b091-5218b0f806ec/terminate \ -H 'Postman-Token: 5190e46f-f612-432a-90d8-161ea67778b2' \ -H 'accept: application/json' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -d 'gracefulTerminationTimeout: 600, terminationType: FORCEFUL '
NS delete
Pub/Sub Testcurl -X DELETE \ http://172.30.3.104:30280/api/nslcm/v1/ns/f0b4c09f-c653-438a-b091-5218b0f806ec \ -H 'Postman-Token: 62b35de6-1785-40ed-8026-06d73f9770d8' \ -H 'cache-control: no-cache'