From 607c637821bcc430a811ead7a379d0e87364ab4d Mon Sep 17 00:00:00 2001 From: yangyan Date: Tue, 29 Jan 2019 23:23:22 +0800 Subject: fix the rst file of installation Change-Id: Idb66e549710f19a6ada012b10495bbc924c41a00 Signed-off-by: yangyan Issue-ID: VFC-1254 --- docs/platform/casrImage.PNG | Bin 0 -> 9699 bytes docs/platform/gvnfm.png | Bin 0 -> 96065 bytes docs/platform/image2018-12-10_12-1-36.png | Bin 0 -> 12304 bytes docs/platform/installation.rst | 291 ++++++++++++++++++++++-------- docs/platform/vim.png | Bin 0 -> 21949 bytes 5 files changed, 215 insertions(+), 76 deletions(-) create mode 100644 docs/platform/casrImage.PNG create mode 100644 docs/platform/gvnfm.png create mode 100644 docs/platform/image2018-12-10_12-1-36.png create mode 100644 docs/platform/vim.png (limited to 'docs') diff --git a/docs/platform/casrImage.PNG b/docs/platform/casrImage.PNG new file mode 100644 index 00000000..fc6b555c Binary files /dev/null and b/docs/platform/casrImage.PNG differ diff --git a/docs/platform/gvnfm.png b/docs/platform/gvnfm.png new file mode 100644 index 00000000..b59c8ed1 Binary files /dev/null and b/docs/platform/gvnfm.png differ diff --git a/docs/platform/image2018-12-10_12-1-36.png b/docs/platform/image2018-12-10_12-1-36.png new file mode 100644 index 00000000..334bae7b Binary files /dev/null and b/docs/platform/image2018-12-10_12-1-36.png differ diff --git a/docs/platform/installation.rst b/docs/platform/installation.rst index d1b66ec1..961186ea 100644 --- a/docs/platform/installation.rst +++ b/docs/platform/installation.rst @@ -1,10 +1,20 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 -VF-C Installation ------------------ +VF-C Installation and Explaination +----------------------------------- Describe the environment and steps to install VF-C components. +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 + + +|image0| + +.. |image0| image:: casrImage.png + :width: 1000px + :height: 600px + Environment +++++++++++ @@ -21,143 +31,272 @@ The following scripts show the docker service install commands in centos7. Steps +++++ -- Install MSB components. - -VF-C components need to register to MSB when starting, so MSB components should be installed first, you can ref the following link to install MSB. + + +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-lcm component. +1. Install vfc-nfvo-db component :: - docker run -d --name vfc-nslcm -v /var/lib/mysql -p 8403:8403 -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/nslcm - -For testing, we can use curl command to access the swagger api. + 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. + +2. Install vfc-nfvo-lcm component. :: - curl http://${MSB_IP}:80/api/nslcm/v1/swagger.json + 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-wfengine components. +3. Install vfc-nfvo-catalog component. -Totally, there are two docker images should be installed before you can use the workflow normally, \ -one is wfengine-activiti for manage the original activiti service, the other is for manage engine service. +:: + 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 -1. Pull related docker images +4. Install vfc-nfvo-gvnfmdriver component. :: - docker pull $NEXUS_DOCKER_REPO/onap/vfc/wfengine-activiti:$DOCKER_IMAGE_VERSION - docker pull $NEXUS_DOCKER_REPO/onap/vfc/wfengine-mgrservice:$DOCKER_IMAGE_VERSION + docker run -d -p 8484:8484 --name vfc-gvnfmdriver -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/gvnfmdriver -2. Run the two docker images - -The first container is wfengine-activiti,there are some parameters should be injected into container. \ -OPENPALETTE_MSB_IP represents msb server address and OPENPALETTE_MSB_PORT is the relative port, \ -SERVICE_IP represents the docker run environment server address. +5. Install vfc-gvnfm-vnflcm component. :: - docker run -i -t -d --name vfc_wfengine_activiti -p 8804:8080 -e SERVICE_IP=$OPENO_IP -e SERVICE_PORT=8804 - -e OPENPALETTE_MSB_IP=$OPENO_IP -e OPENPALETTE_MSB_PORT=80 $NEXUS_DOCKER_REPO/onap/vfc/wfengine-activiti:$DOCKER_IMAGE_VERSION + 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 - docker run -i -t -d --name vfc_wfengine_mgrservice -p 8805:10550 -e SERVICE_IP=$OPENO_IP -e SERVICE_PORT=8805 - -e OPENPALETTE_MSB_IP=$OPENO_IP -e OPENPALETTE_MSB_PORT=80 $NEXUS_DOCKER_REPO/onap/vfc/wfengine-mgrservice:$DOCKER_IMAGE_VERSION -- Install vfc-nfvo-catalog component. +ESR Registration +++++++++++++++++ -:: - docker run -d --name vfc-catalog -v /var/lib/mysql -p 8806:8806 -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/catalog - -For testing, we can use curl command to access the swagger api. +Before we instantiate a service, we need to register vim and vnfm which is used to deploy vnfs. + 1.VIM Registration -:: + |image1| - curl http://${MSB_IP}:80/api/catalog/v1/swagger.json + .. |image1| image:: vim.png + :width: 1000px + :height: 600px -- Install vfc-nfvo-resmanagement component. -:: + 2. GVNFM Registration - docker run -d --name vfc-resmanagement -p 8480:8480 -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/resmanagement - -For testing, we can use curl command to access the swagger api. + For VF-C, because we use GVNFM to deploy vnfs , so you can register GVNFM in esr gui as follows: -:: + |image2| - curl http://${MSB_IP}:80/api/resmgr/v1/swagger.json + .. |image2| image:: gvnfm.png + :width: 1000px + :height: 600px -- Install vfc-nfvo-sfcdriver component. -:: +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 - docker run -d --name vfc-ztesdncdriver -p 8411:8411 -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/ztesdncdriver - -For testing, we can use curl command to access the swagger api. +Package Onboarding +++++++++++++++++++ -:: - curl http://${MSB_IP}:80/api/ztesdncdriver/v1/swagger +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.  + -- Install vfc-nfvo-emsdriver component. +1. Create VNF package record in catalog DB :: - docker run -d --name vfc-emsdriver -p 8206:8206 -e MSB_ADDR=${MSB_IP}:80 -e VES_ADDR=${VES_COLLECTOR_IP}:8080 -e VES_AUTHINFO="":"" nexus3.onap.org:10001/onap/vfc/emsdriver - -For testing, we can use curl command to access the swagger api. + 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 + +2. Upload VNF package to VF-C catalog :: - curl http://${MSB_IP}:80/api/emsdriver/v1/swagger.json + 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 file -- Install vfc-gvnfm components. +3. Create NS package record in catalog DB :: - docker run -d --name vfc-vnflcm -v /var/lib/mysql -p 8801:8801 -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/vnflcm - docker run -d --name vfc-vnfmgr -v /var/lib/mysql -p 8803:8803 -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/vnfmgr - docker run -d --name vfc-vnfres -v /var/lib/mysql -p 8802:8802 -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/vnfres - -For testing, we can use curl command to access the swagger api. + 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 created + +4. Upload NS package to VF-C catalog :: - curl http://${MSB_IP}:80/api/vnflcm/v1/swagger.json - curl http://${MSB_IP}:80/api/vnfmgr/v1/swagger.json - curl http://${MSB_IP}:80/api/vnfres/v1/swagger.json + curl -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' + -H 'accept: application/json' \ + -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \ + -F 'file=@C:\ONAP\Integration\R3\vCPE\ns.csar' + +Note: + a.  -F is used to specify the local ns package file + -- Install vfc-gvnfmdriver components. +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.  + +1. NS Create  :: - docker run -d --name vfc-gvnfmdriver -p 8484:8484 -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/gvnfmdriver - docker run -d --name vfc-jujudriver -p 8483:8483 -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/jujudriver - -For testing, we can use curl command to access the swagger api. + curl -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": "79ca81ec-10e0-44e4-bc85-ba968f345711", + "nsName": "ns_vsn", + "description": "description" + }' + +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 name  + +2. NS Instantiate :: - curl http://${MSB_IP}:80/api/gvnfmdriver/v1/swagger.json - curl http://${MSB_IP}:80/api/jujuvnfmdriver/v1/swagger.json + curl -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" + } + }] + }' + +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 NS locationConstraints 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 .  -- Install vfc-svnfmdriver components. + + |image3| + + .. |image3| image:: image2018-12-10_12-1-36.png + :width: 5.97047in + :height: 2.63208in + + c.   before instantiate, you should create one volumntype which called root. + +3. NS Heal + +:: + + curl -X PUT \ + http://172.30.3.104:30280/api/nslcm/v1/ns/f0b4c09f-c653-438a-b091-5218b0f806ec/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"   + }}   + }' + +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.  + +4. NS Terminate :: - docker run -d --name vfc-ztevnfmdriver -p 8410:8410 -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/ztevnfmdriver - docker run -d --name vfc-svnfm-huawei -p 8482:8482 -p 8443:8443 -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/nfvo/svnfm/huawei - docker run -d --name vfc-svnfm-nokia -p 8486:8486 -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/nfvo/svnfm/nokia - -For testing, we can use curl command to access the swagger api. + curl -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' + +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. + +5. NS delete :: - curl http://${MSB_IP}:80/api/ztevnfmdriver/v1/swagger.json - curl http://${MSB_IP}:80/api/huaweivnfmdriver/v1/swagger.json - curl http://${MSB_IP}:80/api/nokiavnfmdriver/v1/swagger.json + curl -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' + +Note: + a.  f0b4c09f-c653-438a-b091-5218b0f806ec  is the ns instance id which create in step 1 : NS create \ No newline at end of file diff --git a/docs/platform/vim.png b/docs/platform/vim.png new file mode 100644 index 00000000..31073be4 Binary files /dev/null and b/docs/platform/vim.png differ -- cgit 1.2.3-korg