aboutsummaryrefslogtreecommitdiffstats
path: root/docs/platform/installation
diff options
context:
space:
mode:
authorliuyuan <liuyuanyjy@chinamobile.com>2019-04-04 15:27:03 +0800
committerYuan Liu <liuyuanyjy@chinamobile.com>2019-04-04 08:52:21 +0000
commit21cc2c63ba04dc1a00233e7ed6ae47e1a974c795 (patch)
tree1e51e9fa713bf3d778ab72f5cde90a9a0bfc0557 /docs/platform/installation
parent96c9717609b3227d183839ab0f3647a35ee772e8 (diff)
add more docutment in lcm
Change-Id: Iba68f049d7e02f533593403980fe7fcbce1cd592 Issue-ID: VFC-1337 Signed-off-by: liuyuan <liuyuanyjy@chinamobile.com>
Diffstat (limited to 'docs/platform/installation')
-rw-r--r--docs/platform/installation/index.rst28
-rw-r--r--docs/platform/installation/installation/index.rst7
-rw-r--r--docs/platform/installation/installation/vfc-over-oom.rst389
-rw-r--r--docs/platform/installation/user-guide/index.rst7
-rw-r--r--docs/platform/installation/user-guide/ns-instantiate-guide.rst300
5 files changed, 731 insertions, 0 deletions
diff --git a/docs/platform/installation/index.rst b/docs/platform/installation/index.rst
new file mode 100644
index 00000000..0750831c
--- /dev/null
+++ b/docs/platform/installation/index.rst
@@ -0,0 +1,28 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+VF-C Installation and User Guide
+================================
+
+.. contents::
+ :depth: 2
+
+
+VFC Insta1llation over OOM
+--------------------------
+
+.. toctree::
+ :maxdepth: 1
+
+ installation/index
+
+
+
+NS LCM Guide Using VF-C
+-----------------------
+
+.. toctree::
+ :maxdepth: 1
+
+ user-guide/index
+
diff --git a/docs/platform/installation/installation/index.rst b/docs/platform/installation/installation/index.rst
new file mode 100644
index 00000000..2fd14246
--- /dev/null
+++ b/docs/platform/installation/installation/index.rst
@@ -0,0 +1,7 @@
+VFC Insta1llation over OOM
+-----------------------
+
+.. toctree::
+ :titlesonly:
+
+ vfc-over-oom
diff --git a/docs/platform/installation/installation/vfc-over-oom.rst b/docs/platform/installation/installation/vfc-over-oom.rst
new file mode 100644
index 00000000..29a01a21
--- /dev/null
+++ b/docs/platform/installation/installation/vfc-over-oom.rst
@@ -0,0 +1,389 @@
+.. contents::
+ :depth: 3
+..
+
+ **VFC Insta1llation over OOM**
+ **V0.1**
+
+**1 Scope**
+=============
+
+This is a guide to help developer or tester to try to install VF-C over OOM
+
+**1 Component & function**
+==========================
+
+Now VF-C have the following repos in https://gerrit.onap.org/r/#/admin/projects/?filter=vfc
+
++--------------------------+-----------------------------------------------------+
+| **Repo Name** | Description |
++==========================+=====================================================+
+| vfc/nfvo/lcm | NS life cycle management |
++--------------------------+-----------------------------------------------------+
+| vfc/nfvo/resmanagement | NS Resource Management |
++--------------------------+-----------------------------------------------------+
+|vfc/nfvo/driver/vnfm/svnfm| Specific VNFM drivers |
++--------------------------+-----------------------------------------------------+
+|vfc/nfvo/driver/vnfm/gvnfm| Generic VNFM drivers |
++--------------------------+-----------------------------------------------------+
+|vfc/nfvo/driver/sfc | SFC Driver |
++--------------------------+-----------------------------------------------------+
+|org.onap.vfc.nfvo.wfengine| Work flow engine |
++--------------------------+-----------------------------------------------------+
+|vfc/nfvo/catalog | NS and VNF catalog |
++--------------------------+-----------------------------------------------------+
+|EMS-driver | VNF fcaps collect |
++--------------------------+-----------------------------------------------------+
+|vfc/gvnfm/vnflcm | Generic VNFM VNF LCM |
++--------------------------+-----------------------------------------------------+
+|vfc/gvnfm/vnfmgr | Generic VNFM VNF Mgr |
++--------------------------+-----------------------------------------------------+
+|vfc/gvnfm/vnfres | Generic VNFM VNF Resource Management |
++--------------------------+-----------------------------------------------------+
+|vfc/nfvo/multivimproxy | Multi-vim proxy, provide the multivim indirect mode |
+| | proxy which can forward virtual resource requests to|
+| | multivim and do some resource checking |
++--------------------------+-----------------------------------------------------+
+|vfc/nfvo/db | Stand-alone database microservice, provides the |
+| | database services for each VF-C component |
++--------------------------+-----------------------------------------------------+
+
+Note:
+ a. vfc/nfvo/driver/sfc it migrate from Open-O seed code and now haven't been used in any usecase in ONAP.
+ b. vfc/nfvo/resmanagement is used to do the resource granting, but now VF-C has been integrated with OOF, this component will be deprecated in the future release.
+ c. vfc/nfvo/db provide the stand-alone database microservice in casablanca release, but now VF-C leverages OOM shared MariaDB-Gelera cluster. This repo still has redis to be used by VF-C component.
+
+
+VF-C Docker Images
+
+::
+
+ 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.
+ nexus3.onap.org:10001/onap/vfc/catalog:1.3.0
+ nexus3.onap.org:10001/onap/vfc/db:1.3.0
+ nexus3.onap.org:10001/onap/vfc/emsdriver:1.3.0
+ nexus3.onap.org:10001/onap/vfc/gvnfmdriver:1.3.0
+ nexus3.onap.org:10001/onap/vfc/jujudriver:1.3.0
+ nexus3.onap.org:10001/onap/vfc/multivimproxy:1.3.0
+ nexus3.onap.org:10001/onap/vfc/nfvo/svnfm/huawei:1.3.0
+ nexus3.onap.org:10001/onap/vfc/nfvo/svnfm/nokia:1.3.0
+ nexus3.onap.org:10001/onap/vfc/nfvo/svnfm/nokiav2:1.3.0
+ nexus3.onap.org:10001/onap/vfc/nslcm:1.3.0
+ nexus3.onap.org:10001/onap/vfc/resmanagement:1.3.0
+ nexus3.onap.org:10001/onap/vfc/vnflcm:1.3.0
+ nexus3.onap.org:10001/onap/vfc/vnfmgr:1.3.0
+ nexus3.onap.org:10001/onap/vfc/vnfres:1.3.0
+ nexus3.onap.org:10001/onap/vfc/wfengine-activiti:1.3.0
+ nexus3.onap.org:10001/onap/vfc/wfengine-mgrservice:1.3.0
+ nexus3.onap.org:10001/onap/vfc/ztesdncdriver:1.3.0
+ nexus3.onap.org:10001/onap/vfc/ztevnfmdriver:1.3.0
+
+
+**2 VF-C Deployment**
+=====================
+
+For initialization of docker there are 2 deployment options currently adpoted in ONAP:
+- using heat template
+- using OOM
+
+From Casablanca release, OOM is the recommended way, so here mainly give the steps for OOM based deployment
+
+For OOM deployment you can refer to the below links:
+
+https://onap.readthedocs.io/en/latest/submodules/oom.git/docs/oom_setup_kubernetes_rancher.html
+https://onap.readthedocs.io/en/latest/submodules/oom.git/docs/oom_quickstart_guide.html#quick-start-label
+
+1. First ensure VF-C is marked true against field enabled in the oom/kubernetes/onap/values.yaml for successful deployment.
+
+::
+
+ vfc:
+ enabled: true
+ vid:
+ enabled: true
+ vnfsdk:
+ enabled: true
+ vvp:
+ enabled: false
+
+
+
+2. Upgrade Images in OOM charts
+
+Ensure the component version is right, you should check the respective component image version in VF-C charts.
+If you need update the version, please modify values.yaml
+
+eg.
+
+::
+
+ oom/kubernetes/vfc/charts/vfc-catalog/values.yaml
+
+ #################################################################
+ # Global configuration defaults.
+ #################################################################
+ global:
+ nodePortPrefix: 302
+ readinessRepository: oomk8s
+ readinessImage: readiness-check:2.0.0
+ loggingRepository: docker.elastic.co
+ loggingImage: beats/filebeat:5.5.0
+
+ #################################################################
+ # Application configuration defaults.
+ #################################################################
+ # application image
+ flavor: small
+
+ repository: nexus3.onap.org:10001
+ image: onap/vfc/catalog:1.2.1
+ pullPolicy: Always
+
+
+3. Rebuild all repos in helm
+
+Every time you change the charts, you need to rebuild all repos to ensure the change can take effect.
+
+Step1: Build vfc repo
+
+::
+
+ cd oom/kubernetes
+ make vfc
+
+Step2: Build ONAP repo
+
+::
+
+ cd oom/kubernetes
+ make onap(here can also execute make all)
+
+Step3: Delete teh existing pods already deployed
+
+::
+
+ cd oom/kubernetes
+ helm del dev-vfc --purge
+
+Step4: Deploy the new pods
+
+::
+
+ cd oom/kubernetes
+ helm instal local/vfc --namespace onap --name dev-vfc
+
+
+Now VF-C will be upgraded with the new image version
+
+You will see all the pod is runing
+
+::
+
+ cd oom/kubernetes
+ dev-vfc-vfc-catalog-64774ccbc6-vw7wn 2/2 Running 53 79d
+ dev-vfc-vfc-db-6c57b4fd47-7kbnj 1/1 Running 2 79d
+ dev-vfc-vfc-ems-driver-65bd9bf5b-65gtg 1/1 Running 48 79d
+ dev-vfc-vfc-generic-vnfm-driver-698c8d6698-2ctlg 2/2 Running 4 79d
+ dev-vfc-vfc-huawei-vnfm-driver-6d5db69469-277vb 2/2 Running 7 79d
+ dev-vfc-vfc-juju-vnfm-driver-68d4556dfd-hncrm 2/2 Running 4 79d
+ dev-vfc-vfc-multivim-proxy-74d8fc568d-gn8gp 1/1 Running 6 79d
+ dev-vfc-vfc-nokia-v2vnfm-driver-759687787f-fdfsg 1/1 Running 2 79d
+ dev-vfc-vfc-nokia-vnfm-driver-9cbcb9697-z7hp4 2/2 Running 6 79d
+ dev-vfc-vfc-nslcm-97c97759f-x9r9h 2/2 Running 9 79d
+ dev-vfc-vfc-resmgr-84b9b579c9-b7cbj 2/2 Running 7 79d
+ dev-vfc-vfc-vnflcm-7cbdfcfd9b-bqwz8 2/2 Running 13 79d
+ dev-vfc-vfc-vnfmgr-54bdfb84c4-kwbds 2/2 Running 6 79d
+ dev-vfc-vfc-vnfres-7fdbc88945-t9nhd 2/2 Running 5 79d
+ dev-vfc-vfc-workflow-5b745cf488-7z7nd 1/1 Running 2 79d
+ dev-vfc-vfc-workflow-engine-6d5d8ffc7c-pjpmc 1/1 Running 2 79d
+ dev-vfc-vfc-zte-sdnc-driver-6554df5856-ctjxh 1/1 Running 7 79d
+ dev-vfc-vfc-zte-vnfm-driver-7dbd4f887-thvvg 2/2 Running 8 79d
+
+
+**3 Debug and Testing in running Pod**
+======================================
+When you are doing the testing and would like to replace some new file like binary or some script and want to check the new resut.
+Before you replace the file to the running pod,you need to close the pod livenessProbe and readinessProbe first to avoid the pod restart.
+
+Take vfc-catalog pod as an example:
+
+::
+ kubectl -n onap edit deployment dev-vfc-vfc-catalog
+
+ spec:
+ containers:
+ - env:
+ - name: MSB_ADDR
+ value: msb-iag:80
+ - name: MYSQL_ADDR
+ value: vfc-db:3306
+ image: 172.30.1.66:10001/onap/vfc/catalog:1.2.1
+ imagePullPolicy: Always
+ #livenessProbe:
+ #failureThreshold: 3
+ #initialDelaySeconds: 120
+ #periodSeconds: 10
+ #successThreshold: 1
+ #tcpSocket:
+ #port: 8806
+ #timeoutSeconds: 1
+ name: vfc-catalog
+ ports:
+ - containerPort: 8806
+ protocol: TCP
+ #readinessProbe:
+ #failureThreshold: 3
+ #initialDelaySeconds: 10
+ #periodSeconds: 10
+ #successThreshold: 1
+ #tcpSocket:
+ #port: 8806
+ #timeoutSeconds: 1
+
+
+Then you can replace the file into the pod.
+
+
+**4 Kubectl basic command**
+======================================
+
+Basic operation of kubernests cluster(Take the namespace of onap in linux client as an example)
+
+* Check the cluster node
+
+::
+
+ kubectl get node
+
+* Check cluster namespace
+
+::
+
+ kubectl get ns
+
+* View the pod information and the pod on which the node is located, under the namespace specified (for example, namespace on onap)
+
+::
+
+ kubectl get pod -o wide
+
+ kubectl get pod -n onap
+
+* Connected to the docker in pod
+
+::
+
+ Check the docker's name , return two dockers' name after execution, -c specifie the docker that needed ti go in.
+
+ kubectl -n onap get pod dev-vfc-catalog-68cb7c9878-v4kt2 -o jsonpath={.spec.containers[*].name}
+
+ kubectl -n onap exec -it dev-vfc-catalog-68cb7c9878-v4kt2 -c vfc-catalog /bin/bash
+
+* Copy files (take the catlog example). When the data copy is lost after the pod is restarted or migrated, the multi-copy pod copy operation only exists for the current pod
+
+::
+
+ Copy from local to dockers in pod
+
+ kubectl -n onap cp copy_test.sh dev-vfc-catalog-68cb7c9878-v4kt2: -c vfc-catalog
+
+ Copy pod's content to local£º
+
+ kubectl -n onap cp dev-vfc-catalog-68cb7c9878-v4kt2:copy_test.sh -c vfc-catalog /tmp/copy_test.sh
+
+* Remote command (to see the current path of the container as an example)
+
+::
+
+ kubectl -n onap exec -it dev-vfc-catalog-68cb7c9878-v4kt2 -c vfc-catalog pwd
+
+* View pod basic information and logs (no -c parameter added for single container pod)
+
+::
+
+ kubectl -n onap describe pod dev-vfc-catalog-68cb7c9878-v4kt2
+
+ kubectl -n onap logs dev-vfc-catalog-68cb7c9878-v4kt2 -c vfc-catalog
+
+* Check the service listener port and manually expose the port, which is commonly used for testing, such as nginx under test namespace
+
+::
+
+ 1>Build namespace
+ kubectl create namespace test
+
+ 2>create pod with 3 replication
+ kubectl run nginx --image=nginx --replicas=3 -n test
+
+ 3>Pod exposed ports for nginx (target port, source port target-port)
+
+ kubectl expose deployment nginx --port=88 --target-port=80 --type=LoadBalancer -n test
+
+ or
+
+ kubectl expose deployment nginx --port=88 --target-port=80 --type=NodePort -n test
+
+ 4> Check svc(ports that pod exposed , The cluster internally accesses this pod via port 88., external access to the cluster using floatingip+30531)
+
+ kubectl get svc -n test
+
+ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
+ nginx LoadBalancer 10.43.45.186 10.0.0.3 88:30531/TCP 3m
+
+ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
+ nginx NodePort 10.43.45.186 88:30531/TCP 3m
+
+
+ Nodes within the CLUSTER can be accessed via cluster-ip +88 port
+ Outside the cluster, it is accessible via either EXTERNAL IP or the Floating IP+30531, which is the node name of the pod
+ The floatingip corresponding to the node name can be viewed in the /etc/hosts of the rancher machine or in the documentation
+
+
+* Modify the container image and pod strategy (deployment, statefulset), the completion of modification will trigger the rolling update
+
+::
+
+ 1>To determine whether the pod is a stateful application (efullset) or a stateful application (deployment)
+
+ kubectl -n onap describe pod dev-vfc-catalog-68cb7c9878-v4kt2 |grep Controlled
+
+ 2>Stateless application deployment
+
+ kubectl -n onap get deploy |grep catalog
+
+ kubectl -n onap edit deploy dev-vfc-catalog-68cb7c9878-v4kt2
+
+ 3>Stateful application statefulset
+
+ kubectl -n onap get statefulset |grep cassandra
+
+ kubectl -n onap edit statefulset dev-aai-cassandra
+
+
+* Restart pod(After removing the pod, deployment will recreate a same pod and randomly assign it to any node.)
+
+::
+
+ kubectl -n onap delete pod dev-vfc-catalog-68cb7c9878-v4kt2 -c vfc-catalog
+
+
+* View the virtual machine where the portal-app resides in order to add host resolution
+
+::
+
+ 10.0.0.13 corresponding Floating IP is 172.30.3.36
+
+ kubectl -n onap get svc |grep portal-app
+
+ portal-app LoadBalancer 10.43.181.163 10.0.0.13 8989:30215/TCP,8006:30213/TCP,8010:30214/TCP,8443:30225/TCP
+
+* pod expansion and shrinkage
+
+::
+
+ pod expansion£ºkubectl scale deployment nginx --replicas 3
+
+ pod shrinkage£º kubectl scale deployment nginx --replicas 1
+
+ \ No newline at end of file
diff --git a/docs/platform/installation/user-guide/index.rst b/docs/platform/installation/user-guide/index.rst
new file mode 100644
index 00000000..77ce6f2c
--- /dev/null
+++ b/docs/platform/installation/user-guide/index.rst
@@ -0,0 +1,7 @@
+NS LCM Guide Using VF-C
+-----------------------
+
+.. toctree::
+ :titlesonly:
+
+ ns-instantiate-guide
diff --git a/docs/platform/installation/user-guide/ns-instantiate-guide.rst b/docs/platform/installation/user-guide/ns-instantiate-guide.rst
new file mode 100644
index 00000000..c8bd1fe8
--- /dev/null
+++ b/docs/platform/installation/user-guide/ns-instantiate-guide.rst
@@ -0,0 +1,300 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+NS LCM Guide Using VF-C
+-----------------------
+
+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
+
+Before you try, please prepare two csar file:
+* VNF csar
+* NS csar
+
+If you don't have any csar, you can download the simple csar from https://wiki.onap.org/display/DW/VF-C+User+Guide
+
+
+Environment
++++++++++++
+VF-C components can run as docker, docker service should be installed before install VF-C components.
+
+The following scripts show the docker service install commands in centos7.
+
+::
+
+ yum install docker
+ systemctl enable docker.service
+ systemctl start docker.service
+
+Steps
++++++
+
+
+
+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.
+
+1. 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.
+
+2. 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
+
+3. 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
+
+4. 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
+
+5. 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
+
+
+ESR Registration
+++++++++++++++++
+
+
+Before we instantiate a service, we need to register vim and vnfm which is used to deploy vnfs.
+ 1.VIM Registration
+
+ |image1|
+
+ .. |image1| image:: vim.png
+ :width: 1000px
+ :height: 600px
+
+
+ 2. GVNFM Registration
+
+ For VF-C, because we use GVNFM to deploy vnfs , so you can register GVNFM in esr gui as follows:
+
+ |image2|
+
+ .. |image2| image:: gvnfm.png
+ :width: 1000px
+ :height: 600px
+
+
+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.
+
+
+1. Create VNF package record in catalog DB
+
+::
+
+ 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 -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
+
+3. Create NS package record in catalog DB
+
+::
+
+ 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 -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
+
+
+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
+
+::
+
+ 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 -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 .
+
+
+ |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
+
+::
+
+ 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 -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