zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 |
| 2 | International License. http://creativecommons.org/licenses/by/4.0 |
| 3 | Copyright 2020 CMCC Technologies Co., Ltd. All rights reserved. |
| 4 | |
| 5 | .. _docs_vcpe_tosca_local: |
| 6 | |
| 7 | vCPE Tosca Local Mode Use Case |
| 8 | ------------------------------ |
| 9 | |
| 10 | Description |
| 11 | ~~~~~~~~~~~ |
| 12 | vCPE tosca use case is based on Network Enhanced Residential Gateway architecture specified in Technical Report 317 (TR-317), which defines how service providers deploy residential broadband services like High Speed Internet Access. The use case implementation has infrastructure services and customer service. The common infrastructure services are deployed first and shared by all customers. The use case demonstrates ONAP capabilities to design, deploy, configure and control sophisticated services. |
| 13 | |
| 14 | More details on the vCPE Use Case can be found on wiki page https://wiki.onap.org/pages/viewpage.action?pageId=3246168 |
| 15 | |
| 16 | Local is the way how to distribute the network elements. Here we use local means we want upload the csar file to distribute the vnf and ns configurations. |
| 17 | |
| 18 | Source Code |
| 19 | ~~~~~~~~~~~ |
zhaoliping123 | 9386b0b | 2020-04-24 18:11:45 +0800 | [diff] [blame] | 20 | vcpe tosca local test scripts: https://git.onap.org/integration/tree/test/vcpe_tosca/local/vcpe_tosca_test.py |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 21 | |
| 22 | How to Use |
| 23 | ~~~~~~~~~~ |
| 24 | The use case has been automated by vcpe_tosca_test scripts. The followings are the main steps to run the use case in Integration lab environment: |
| 25 | |
zhaoliping123 | c981fa0 | 2020-05-08 18:33:20 +0800 | [diff] [blame] | 26 | 1) Install ONAP CLI environment, open_cli_product is onap-dublin. |
zhaoliping123 | 0d9647b | 2020-08-14 16:43:04 +0800 | [diff] [blame^] | 27 | Use https://git.onap.org/integration/tree/test/vcpe_tosca/local/scripts/install-alpine.sh to install ONAP CLI. |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 28 | |
| 29 | 2) Prepare openstack test environment. |
| 30 | |
| 31 | * Create project(tenant) and user on openstack |
| 32 | |
| 33 | Openstack Horizon--Identity--Projects page |
| 34 | |
| 35 | .. image:: files/vcpe_tosca/create_project.png |
| 36 | |
| 37 | Openstack Horizon--Identity--Users page |
| 38 | |
| 39 | .. image:: files/vcpe_tosca/create_user.png |
| 40 | |
| 41 | Manage Project Members |
| 42 | |
| 43 | .. image:: files/vcpe_tosca/manage_project_user.png |
| 44 | |
| 45 | * Create and upload image for VNF |
| 46 | |
| 47 | Identify the version of the lab server, my lab server is Ubuntu 16.04.3 LTS. |
| 48 | |
| 49 | :: |
| 50 | |
| 51 | root@onap-dengyuanhong-master:~# cat /etc/lsb-release |
| 52 | DISTRIB_ID=Ubuntu |
| 53 | DISTRIB_RELEASE=16.04 |
| 54 | DISTRIB_CODENAME=xenial |
| 55 | DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS" |
| 56 | |
| 57 | |
zhaoliping123 | 9386b0b | 2020-04-24 18:11:45 +0800 | [diff] [blame] | 58 | Download the related ubuntu image from https://cloud-images.ubuntu.com/ |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 59 | |
zhaoliping123 | 9386b0b | 2020-04-24 18:11:45 +0800 | [diff] [blame] | 60 | .. image:: files/vcpe_tosca/image.png |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 61 | |
zhaoliping123 | 9386b0b | 2020-04-24 18:11:45 +0800 | [diff] [blame] | 62 | Openstack Horizon--Project--Compute--Images page, create an image named image, the name must be the same with image which is defined in vnf csar file. |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 63 | |
zhaoliping123 | 9386b0b | 2020-04-24 18:11:45 +0800 | [diff] [blame] | 64 | .. image:: files/vcpe_tosca/create_image.png |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 65 | |
zhaoliping123 | 9386b0b | 2020-04-24 18:11:45 +0800 | [diff] [blame] | 66 | 3) Update the configuration file vcpe_config.json under https://git.onap.org/integration/tree/test/vcpe_tosca/local/config |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 67 | |
| 68 | You should update the values if you want to run in your environment. |
| 69 | |
| 70 | Firstly, identify the Region name you used on your openstack environment, our Region name is RegionOne, it will be used by the configuration file. |
| 71 | |
| 72 | :: |
| 73 | |
| 74 | [wrsroot@controller-0 ~(keystone_admin)]$ openstack region list |
| 75 | +-----------+---------------+-------------+ |
| 76 | | Region | Parent Region | Description | |
| 77 | +-----------+---------------+-------------+ |
| 78 | | RegionOne | None | | |
| 79 | +-----------+---------------+-------------+ |
| 80 | |
| 81 | |
| 82 | Secondly, update the values according to your environment. |
| 83 | |
| 84 | :: |
zhaoliping123 | 0d9647b | 2020-08-14 16:43:04 +0800 | [diff] [blame^] | 85 | "open_cli_product": set to CLI product you installed, onap-dublin is OK for this test. |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 86 | "open_cli_home": set to the oclip home path, |
| 87 | "aai_url": set to msb ip and port you used, |
| 88 | "msb_url": set to msb ip and port you used, |
| 89 | "multicloud_url": set to msb ip and port you used, |
| 90 | |
zhaoliping123 | 0d9647b | 2020-08-14 16:43:04 +0800 | [diff] [blame^] | 91 | "complex_name": set to any complex name you want to use, the name must be unique |
| 92 | |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 93 | "cloud_region_data": { |
| 94 | "RegionOne":(update to your Region name) { |
zhaoliping123 | 0d9647b | 2020-08-14 16:43:04 +0800 | [diff] [blame^] | 95 | "cloud-region-version": the cloud region version of your Cloud region, you can keep "titanium_cloud" |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 96 | "esr-system-info-id": "1111ce1f-aa78-4ebf-8d6f-4b62773e9b01", |
| 97 | "service-url": the ip change to your openstack ip address, |
| 98 | "user-name": the user name you created on openstack, |
| 99 | "password": the user password you created on openstack, |
| 100 | "system-type": "VIM", |
| 101 | "ssl-insecure": true, |
| 102 | "cloud-domain": "Default", |
| 103 | "default-tenant": the project name you created on openstack, |
| 104 | "tenant-id": the project id you created on openstack, |
| 105 | "cloud-type": "openstack", |
| 106 | "identity-url": the ip change to your openstack ip address, |
| 107 | "system-status": "active" |
| 108 | } |
| 109 | } |
zhaoliping123 | 0d9647b | 2020-08-14 16:43:04 +0800 | [diff] [blame^] | 110 | |
| 111 | "cloud-owner": set to any cloud name you want to use, , the name must be unique |
| 112 | "service_name": set to any service name you want to use, the name must be unique |
| 113 | "customer_name": set to any customer name you want to use, the name must be unique |
| 114 | "subscriber_name": set to any subscriber name you want to use, the name must be unique |
| 115 | |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 116 | "vfc-url": set to msb ip and port you used, |
| 117 | "vnfs": { |
zhaoliping123 | 0d9647b | 2020-08-14 16:43:04 +0800 | [diff] [blame^] | 118 | "vgw": { |
| 119 | "path": "/csar/vgw.csar", set to you vgw csar file path |
| 120 | "key": "key2", |
| 121 | "value": "value2" |
| 122 | }, |
| 123 | "infra": { |
| 124 | "path": "/csar/infra.csar", set to you infra csar file path |
| 125 | "key": "key2", |
| 126 | "value": "value2" |
| 127 | }, |
| 128 | "vbng": { |
| 129 | "path": "/csar/vbng.csar", set to you vbng csar file path |
| 130 | "key": "key2", |
| 131 | "value": "value2" |
| 132 | }, |
| 133 | "vbrgemu": { |
| 134 | "path": "/csar/vbrgemu.csar", set to you vbrgemu csar file path |
| 135 | "key": "key2", |
| 136 | "value": "value2" |
| 137 | }, |
| 138 | "vgmux": { |
| 139 | "path": "/csar/vgmux.csar", set to you vgmux csar file path |
| 140 | "key": "key2", |
| 141 | "value": "value2" |
| 142 | } |
| 143 | }, |
| 144 | "ns": { |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 145 | "key": "key1", |
| 146 | "value": "value1", |
| 147 | "path": "ns_vgw.csar", set to you ns csar file path |
| 148 | "name": "vcpe11" |
zhaoliping123 | 0d9647b | 2020-08-14 16:43:04 +0800 | [diff] [blame^] | 149 | }, |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 150 | "location": "VCPE22_RegionOne", set to CloudOwner_CloudRegion |
zhaoliping123 | 0d9647b | 2020-08-14 16:43:04 +0800 | [diff] [blame^] | 151 | "vnfm_params": { |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 152 | "GVNFMDRIVER": { |
| 153 | "type": "gvnfmdriver", |
| 154 | "vendor": "vfc", |
| 155 | "version": "v1.0", |
| 156 | "url": set to msb ip and port you used, |
| 157 | "vim-id": "VCPE22_RegionOne", set to CloudOwner_CloudRegion |
| 158 | "user-name": "admin", |
| 159 | "user-password": "admin", |
| 160 | "vnfm-version": "v1.0" |
zhaoliping123 | 0d9647b | 2020-08-14 16:43:04 +0800 | [diff] [blame^] | 161 | } |
| 162 | } |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 163 | |
| 164 | |
zhaoliping123 | 9386b0b | 2020-04-24 18:11:45 +0800 | [diff] [blame] | 165 | 4) The vnf csar file include Infra, vGW, vBNG, vBRGEMU and vGMUX, and the ns csar file is ns. https://git.onap.org/integration/tree/test/vcpe_tosca/local/csar |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 166 | |
| 167 | |
zhaoliping123 | 9386b0b | 2020-04-24 18:11:45 +0800 | [diff] [blame] | 168 | 5) The key test script is vcpe_tosca_test.py which is under https://git.onap.org/integration/tree/test/vcpe_tosca/local |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 169 | |
| 170 | Run command is |
| 171 | |
| 172 | :: |
| 173 | |
| 174 | python3 -m unittest vcpe_tosca_test.py |
| 175 | |
| 176 | Before run the command, you should install requests: pip install requests, and update the path of configuration file vcpe_config.json. |
| 177 | |
| 178 | 5) Release of our environment |
| 179 | |
| 180 | :: |
| 181 | |
| 182 | vfc-nslcm: 1.3.8 |
| 183 | vfc-vnflcm: 1.3.8 |
| 184 | vfc-gvnfm: 1.3.8 |
| 185 | modeling-etsicatalog: 1.0.5 |
| 186 | multicloud-framework: 1.5.1 |
| 187 | multicloud-windriver: 1.5.5 |
zhaoliping123 | c981fa0 | 2020-05-08 18:33:20 +0800 | [diff] [blame] | 188 | cli: onap-dublin |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 189 | |
| 190 | |
| 191 | Note |
| 192 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
zhaoliping123 | 0d9647b | 2020-08-14 16:43:04 +0800 | [diff] [blame^] | 193 | 1) You must authorize admin to vcpe_case when managing project members in openstack. |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 194 | |
zhaoliping123 | 0d9647b | 2020-08-14 16:43:04 +0800 | [diff] [blame^] | 195 | 2) You should create an image named image before running the test script, the name must be the same with image which is defined in vnf csar file. |
| 196 | |
| 197 | 3) You should install ONAP CLI before running the script. |
zhaoliping123 | 906480b | 2020-04-22 11:52:56 +0800 | [diff] [blame] | 198 | |
| 199 | |
| 200 | Known Issues and Workaround |
| 201 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 202 | 1) There is time out issue when terminating vnf, the solution is refer to |
| 203 | |
| 204 | https://gerrit.onap.org/r/c/vfc/nfvo/driver/vnfm/gvnfm/+/105192 |
| 205 | |
| 206 | 2) The process of terminating job is chaotic, the solution is refer to |
| 207 | |
| 208 | https://gerrit.onap.org/r/c/vfc/nfvo/lcm/+/105449 |