blob: 20e9b496d4f4c2d39589b5e5902ba0f16ebec49b [file] [log] [blame]
Gary Wucd47a012018-11-30 07:18:36 -08001.. This work is licensed under a Creative Commons Attribution 4.0
2 International License. http://creativecommons.org/licenses/by/4.0
3 Copyright 2018 Huawei Technologies Co., Ltd. All rights reserved.
4
5.. _docs_vcpe:
6
Gary Wue4a2df82018-11-29 12:49:09 -08007vCPE Use Case
8----------------------------
9
10Description
11~~~~~~~~~~~
12vCPE 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
14More details on the vCPE Use Case can be found on wiki page https://wiki.onap.org/pages/viewpage.action?pageId=3246168
15
16Source Code
17~~~~~~~~~~~
Yang Xucbf3f2d2019-06-24 08:31:16 -040018vcpe test scripts: https://git.onap.org/integration/tree/test/vcpe?h=dublin
Gary Wue4a2df82018-11-29 12:49:09 -080019
20How to Use
21~~~~~~~~~~
22Most part of the use case has been automated by vcpe scripts. For the details on how to run the scripts, please refer to the use case tutorial on https://wiki.onap.org/display/DW/vCPE+Use+Case+Tutorial%3A+Design+and+Deploy+based+on+ONAP.
23
Yang Xuaa085032019-06-17 09:44:34 -040024Here are the main steps to run the use case in Integration lab environment, where vCPE script is pre-installed on Rancher node under /root/integration/test/vcpe:
25
261. Run Robot script from Rancher node to onboard VNFs, create and distribute models for vCPE four infrastructure services, i.e. infrastructure, brg, bng and gmux
27
28::
29
30 demo-k8s.sh onap init
31
Yang Xu587704d2019-06-26 08:44:10 -0400322. Add customer SDN-ETHERNET-INTERNET (see the use case tutorial wiki page for detail)
Yang Xuaa085032019-06-17 09:44:34 -040033
Yang Xu587704d2019-06-26 08:44:10 -0400343. Add identity-url to RegionOne data in A&AI. First use POSTMAN to GET cloud-region RegionOne data, then add identity-url and PUT back to A&AI
Yang Xuaa085032019-06-17 09:44:34 -040035
36::
37
38 GET https://{{aai}}:{{port}}/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne
39
40::
41
42 PUT https://{{aai}}:{{port}}/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne
43 {
44 "cloud-owner": "CloudOwner",
45 "cloud-region-id": "RegionOne",
46 "cloud-type": "SharedNode",
47 "owner-defined-type": "OwnerType",
48 "cloud-region-version": "v1",
49 "identity-url": "http://10.12.25.2:5000/v2.0",
50 "cloud-zone": "CloudZone",
51 "resource-version": "1559336510793",
52 "relationship-list": {
53 ... ...
54
Yang Xu587704d2019-06-26 08:44:10 -0400554. Add route on sdnc cluster VM node, which is the cluster VM node where pod sdnc-sdnc-0 is running on. This will allow ONAP SDNC to configure BRG later on.
Yang Xuaa085032019-06-17 09:44:34 -040056
57::
58
59 ip route add 10.3.0.0/24 via 10.0.101.10 dev ens3
60
Yang Xu587704d2019-06-26 08:44:10 -0400615. Initialize SDNC ip pool by running command from Rancher node
Yang Xuaa085032019-06-17 09:44:34 -040062
63::
64
Yang Xu4c9c4712019-06-19 01:56:35 -040065 kubectl -n onap exec -it dev-sdnc-sdnc-0 -- /opt/sdnc/bin/addIpAddresses.sh VGW 10.5.0 22 250
Yang Xuaa085032019-06-17 09:44:34 -040066
Yang Xu587704d2019-06-26 08:44:10 -0400676. Install Python and other Python libraries
Yang Xuaa085032019-06-17 09:44:34 -040068
69::
70
71 integration/test/vcpe/bin/setup.sh
72
73
Yang Xu587704d2019-06-26 08:44:10 -0400747. Change the Openstack env parameters and one customer service related parameter in vcpecommon.py
Yang Xuaa085032019-06-17 09:44:34 -040075
76::
77
78 cloud = {
79 '--os-auth-url': 'http://10.12.25.2:5000',
80 '--os-username': 'xxxxxxxxxx',
81 '--os-user-domain-id': 'default',
82 '--os-project-domain-id': 'default',
83 '--os-tenant-id': 'xxxxxxxxxxxxxxxx' if oom_mode else '1e097c6713e74fd7ac8e4295e605ee1e',
84 '--os-region-name': 'RegionOne',
85 '--os-password': 'xxxxxxxxxxx',
86 '--os-project-domain-name': 'xxxxxxxxx' if oom_mode else 'Integration-SB-07',
87 '--os-identity-api-version': '3'
88 }
89
90 common_preload_config = {
91 'oam_onap_net': 'xxxxxxxx' if oom_mode else 'oam_onap_lAky',
92 'oam_onap_subnet': 'xxxxxxxxxx' if oom_mode else 'oam_onap_lAky',
93 'public_net': 'xxxxxxxxx',
94 'public_net_id': 'xxxxxxxxxxxxx'
95 }
96
97::
98
99 # CHANGEME: vgw_VfModuleModelInvariantUuid is in rescust service csar, open service template with filename like service-VcpesvcRescust1118-template.yml and look for vfModuleModelInvariantUUID under groups vgw module metadata.
100 self.vgw_VfModuleModelInvariantUuid = 'xxxxxxxxxxxxxxx'
101
Yang Xu587704d2019-06-26 08:44:10 -04001028. Initialize vcpe
Yang Xuaa085032019-06-17 09:44:34 -0400103
104::
105
106 vcpe.py init
107
Yang Xu587704d2019-06-26 08:44:10 -04001089. Run a command from Rancher node to insert vcpe customer service workflow entry in SO catalogdb. You should be able to see a sql command printed out from the above step output at the end, and use that sql command to replace the sample sql command below (inside the double quote) and run it from Rancher node:
Yang Xuaa085032019-06-17 09:44:34 -0400109
110::
111
Yang Xu587704d2019-06-26 08:44:10 -0400112 kubectl exec dev-mariadb-galera-mariadb-galera-0 -- mysql -uroot -psecretpassword catalogdb -e "INSERT INTO service_recipe (ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, SERVICE_PARAM_XSD, RECIPE_TIMEOUT, SERVICE_TIMEOUT_INTERIM, CREATION_TIMESTAMP, SERVICE_MODEL_UUID) VALUES ('createInstance','1','vCPEResCust 2019-06-03 _04ba','/mso/async/services/CreateVcpeResCustService',NULL,181,NULL, NOW(),'6c4a469d-ca2c-4b02-8cf1-bd02e9c5a7ce')"
Yang Xuaa085032019-06-17 09:44:34 -0400113
Yang Xu587704d2019-06-26 08:44:10 -040011410. Run Robot to create and distribute for vCPE customer service. This step assumes step 1 has successfully distributed all vcpe models except customer service model
115
116::
117
118 ete-k8s.sh onap distributevCPEResCust
119
12011. Manually copy vCPE customer service csar (starting with service-Vcperescust) under Robot container /tmp/csar directory to Rancher vcpe/csar directory, now you should have these files:
121
122::
123
124 root@sb00-nfs:~/integration/test/vcpe/csar# ls -l
125 total 528
126 -rw-r--r-- 1 root root 126545 Jun 26 11:28 service-Demovcpeinfra-csar.csar
127 -rw-r--r-- 1 root root 82053 Jun 26 11:28 service-Demovcpevbng-csar.csar
128 -rw-r--r-- 1 root root 74179 Jun 26 11:28 service-Demovcpevbrgemu-csar.csar
129 -rw-r--r-- 1 root root 79626 Jun 26 11:28 service-Demovcpevgmux-csar.csar
130 -rw-r--r-- 1 root root 78156 Jun 26 11:28 service-Demovcpevgw-csar.csar
131 -rw-r--r-- 1 root root 83892 Jun 26 11:28 service-Vcperescust20190625D996-csar.csar
132
13312. Instantiate vCPE infra services
Yang Xuaa085032019-06-17 09:44:34 -0400134
135::
136
137 vcpe.py infra
138
Yang Xu587704d2019-06-26 08:44:10 -040013913. Install curl command on sdnc container inside sdnc-sdnc-0 pod
Yang Xuaa085032019-06-17 09:44:34 -0400140
Yang Xu587704d2019-06-26 08:44:10 -0400141::
142
143 sudo apk add curl
144
14514. From Rancher node run vcpe healthcheck command to check connectivity from sdnc to brg and gmux, and vpp configuration of brg and gmux. Write down BRG MAC address printed out at the last line
Yang Xuaa085032019-06-17 09:44:34 -0400146
147::
148
Bartek Grzybowski4baa51c2019-09-10 13:50:15 +0200149 healthcheck-k8s.py --namespace <namespace name> --environment <env name>
Yang Xuaa085032019-06-17 09:44:34 -0400150
Yang Xu587704d2019-06-26 08:44:10 -040015115. Instantiate vCPE customer service. Input the BRG MAC when prompt
Yang Xuaa085032019-06-17 09:44:34 -0400152
Yang Xu587704d2019-06-26 08:44:10 -0400153::
154
155 vcpe.py customer
156
15716. Update libevel.so in vGMUX VM and restart the VM. This allows vGMUX to send events to VES collector in close loop test. See tutorial wiki for details
158
15917. Run heatbridge. The heatbridge command usage: demo-k8s.sh <namespace> heatbridge <stack_name> <service_instance_id> <service> <oam-ip-address>, please refer to vCPE tutorial page on how to fill in those paraemters. See an example as following:
Yang Xuaa085032019-06-17 09:44:34 -0400160
161::
162
163 ~/integration/test/vcpe# ~/oom/kubernetes/robot/demo-k8s.sh onap heatbridge vcpe_vfmodule_e2744f48729e4072b20b_201811262136 d8914ef3-3fdb-4401-adfe-823ee75dc604 vCPEvGMUX 10.0.101.21
164
Yang Xu587704d2019-06-26 08:44:10 -040016518. Push vCPE closed loop Policy. Copy the two operational policy from vcpe/preload_templates to Robot container and then run the following two commands inside Robot container. You can find more details in JIRA INT-1089 - Create vCPE closed loop policy and push to policy engine
Yang Xuaa085032019-06-17 09:44:34 -0400166
167::
168
169 curl -k --silent --user 'healthcheck:zb!XztG34' -X POST "https://policy-api:6969/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies" -H "Accept: application/json" -H "Content-Type: application/json" -d @operational.vcpe.json.txt
170 curl --silent -k --user 'healthcheck:zb!XztG34' -X POST "https://policy-pap:6969/policy/pap/v1/pdps/policies" -H "Accept: application/json" -H "Content-Type: application/json" -d @operational.vcpe.pap.json.txt
171
Yang Xu587704d2019-06-26 08:44:10 -040017219. Start closed loop test by triggering packet drop VES event, and monitor if vGMUX is restarting. You may need to run the command twice if the first run fails
Yang Xuaa085032019-06-17 09:44:34 -0400173
174::
175
176 vcpe.py loop
177
178
Gary Wue4a2df82018-11-29 12:49:09 -0800179Test Status
180~~~~~~~~~~~~~~~~~~~~~
Yang Xuaa085032019-06-17 09:44:34 -0400181The use case has been tested for Dublin release, the test report can be found on https://wiki.onap.org/display/DW/vCPE+%28Heat%29+-+Dublin+Test+Status
Gary Wue4a2df82018-11-29 12:49:09 -0800182
183Known Issues and Workaround
184~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Yang Xu4c9c4712019-06-19 01:56:35 -04001851) NATs are installed on BRG and vBNG. In order to allow SDNC to send BRG configuration message through vBNG, SDNC host VM IP address is preloaded on BRG and vBNG during VM instantiation, and provisioned into the NATs. If SDNC changes its host VM, SDNC host VM IP changes and we need to manually update the IP in /opt/config/sdnc_ip.txt. Then run:
Gary Wue4a2df82018-11-29 12:49:09 -0800186
187::
188
189 root>vppctl tap delete tap-0
190 root>vppctl tap delete tap-1
191 root>/opt/nat_service.sh
192 root>vppctl restart
193
Yang Xu5ee1c382019-06-26 22:46:31 -04001942) During vCPE customer service instantiation, though vGW should come up successfully BRG vxlan tunnel configuration is likely to fail in SDNC cluster environment due to SDNC unreachable to BRG. See more detail in JIRA INT-1127. One workaround is to run vCPE use case with SDNC cluster disabled.