X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric_robot_suite%2Fhelm%2Fnanobot%2FREADME;h=64ff5a608f64cb12a4c22044855149fd1a4b30df;hb=refs%2Fchanges%2F92%2F11892%2F1;hp=693fced34f44a04f3e7838242d319c97c2285e03;hpb=c5fa07bcd8cbd614bcd813cac698385b789bcfcb;p=it%2Ftest.git diff --git a/ric_robot_suite/helm/nanobot/README b/ric_robot_suite/helm/nanobot/README index 693fced..64ff5a6 100644 --- a/ric_robot_suite/helm/nanobot/README +++ b/ric_robot_suite/helm/nanobot/README @@ -1,5 +1,4 @@ # Copyright (c) 2019 AT&T Intellectual Property. -# Copyright (c) 2019 Nokia. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,17 +15,222 @@ This directory contains a Helm chart for the minimal robot container and Kubernetes job. +Before executing the nanobot test please do the following procedures +Deploy E2sim: +============ + +1. Deploy RIC platform + +2. kubectl rollout restart deployment --namespace ricplt deployment-ricplt-e2mgr deployment-ricplt-e2term-alpha (The e2mgr and e2term need to be restarted; this is due to some issues with health check; I don’t know whether it has been resolved by that team) + +3. clone sim/e2-interface + +4. In the root directory of e2sim: Follow directions in README to produce the deb files + +5. Since the deb files are not yet pushed to package cloud, we need to copy them + +6. cp e2sim*deb ../e2sm_examples/kpm_e2sm + +7. cd ../e2sm_examples/kpm_e2sm + +8. Edit the Dockerfile at the bottom to have IP address of service-ricplt-e2term-sctp-alpha service + +9. docker build . + +10. docker tag e2simul:0.0.2 + +11. Once deployed, kubectl logs will show: + +An E2 Setup Request from E2 Simulator to E2 Term +An E2 Setup Response from E2 Term to E2 Simulator + +Deploy Bouncer Xapp in common way: +================================== + +Follow the link to deploy xapps +https://wiki.o-ran-sc.org/display/IAT/AD+xApp+Flows + +1.Preparing an xApp for onboarding: + +echo '{"config-file.json_url": "https://gerrit.o-ran-sc.org/r/gitweb?p=ric-app/ts.git;a=blob_plain;f=xapp-descriptor/config.json;hb=HEAD" }' > onboard.ts.url + + +2. Onboarding xApps: +Invoke the API calls into the xApp On-boarder, providing it the locations of the xApp descripters. +curl --location --request POST "http://$(hostname):32080/onboard/api/v1/onboard/download" --header 'Content-Type: application/json' --data-binary "@./onboard.ts.url" + +3. Checking the on-boarded charts: +curl --location --request GET "http://$(hostname):32080/onboard/api/v1/charts" + +4. Deploying Xapp: +curl --location --request POST "http://$(hostname):32080/appmgr/ric/v1/xapps" --header 'Content-Type: application/json' --data-raw '{"xappName": "trafficxapp"}' + +Deploy KPIMONXapp: +================== +currently KPIMON deployment must be done in the following way: + +https://wiki.o-ran-sc.org/display/IAT/Traffic+Steering+Flows + + +1. clone scp/ric-app/kpimon (note it is different than the ric-app/kpimon repo) +2. docker build . +3. docker tag nexus3.o-ran-sc.org:10002/ric-app-kpimon:1.0.0 +4 .curl -X POST --data-binary @xappkpimon-0.2.0.tgz http://:32080/helmrepo/api/charts (Push hand-crafted helm chart to appmgr chart museum) + +Once Xapp deployed + +1.Checkout the it/test repo +2.Modify Values.yaml based on your Xapp deployment name, Xapp name and E2sim deployment with PLMID, GNBID update. +ric_robot_suite/helm/nanobot/values.yaml. +3.Add testsuites name based on our testing. +Note: Only one xapp to E2sim test is possible. + +================================================================================================================================================================================== +Subscription Duplication Deployment +==================================== +The above E2sim deployment procedures are same. For Bouncer xApp deployment please follow up below steps. + +Scenario-1: +========== +Deploy 2 bouncer xapps with intermission delay of 2 to 5secs. +1. Use 2 different paths for 2 xapps configfile and modify xappname based on your requirement in configfile. + +2.Use local config file shared path for preparing an xApp onboarding: + +examples: +echo '{"config-file.json_url": "https://${hostname}:8090/config.json" }' > onboard.bouncer.url +echo '{"config-file.json_url": "https://${hostname}:8090/anotherxapp/config.json" }' > onboard.bouncer_another.url + +3. Onboarding xApps: +Invoke the API calls into the xApp On-boarder, providing it the locations of the xApp descripters. +curl --location --request POST "http://$(hostname):32080/onboard/api/v1/onboard/download" --header 'Content-Type: application/json' --data-binary "@./onboard.bouncer.url" +curl --location --request POST "http://$(hostname):32080/onboard/api/v1/onboard/download" --header 'Content-Type: application/json' --data-binary "@./onboard.bouncer_another.url" + +4. Checking the on-boarded charts: +curl --location --request GET "http://$(hostname):32080/onboard/api/v1/charts" + +5. Deploying Xapp: +curl --location --request POST "http://$(hostname):32080/appmgr/ric/v1/xapps" --header 'Content-Type: application/json' --data-raw '{"xappName": "bouncerxapp"}' +delay 2 to 5secs +curl --location --request POST "http://$(hostname):32080/appmgr/ric/v1/xapps" --header 'Content-Type: application/json' --data-raw '{"xappName": "bouncerxapp_1"}' + +Once Xapp deployed + +1.Checkout the it/test repo +2.Modify Values.yaml based on your Xapp deployment- 2 Xapp names and E2sim deployment with PLMID, GNBID update. +ric_robot_suite/helm/nanobot/values.yaml. +3.Add testsuites name "subscription_duplication_scenario1". +Note: Only bouncer xapps to E2sim test possible. + + +Scenario-2: +=========== +Deploy 1 bouncer xapp by following the below procedure + +1.Use local config file shared path for preparing an xApp onboarding: + +examples: +echo '{"config-file.json_url": "https://${hostname}:8090/config.json" }' > onboard.bouncer.url + +2. Onboarding xApps: +Invoke the API calls into the xApp On-boarder, providing it the locations of the xApp descripters. +curl --location --request POST "http://$(hostname):32080/onboard/api/v1/onboard/download" --header 'Content-Type: application/json' --data-binary "@./onboard.bouncer.url" + +3. Checking the on-boarded charts: +curl --location --request GET "http://$(hostname):32080/onboard/api/v1/charts" + +4. Deploying Xapp: +curl --location --request POST "http://$(hostname):32080/appmgr/ric/v1/xapps" --header 'Content-Type: application/json' --data-raw '{"xappName": "bouncerxapp"}' + +Ensure on bouncer xapp logs to check upto indication packets received from E2sim. + +Deploy 2 bouncer xapp + +1.Use local config file shared path for preparing an xApp onboarding: + +examples: +echo '{"config-file.json_url": "https://${hostname}:8090/anotherxapp/config.json" }' > onboard.bouncer_another.url + +2. Onboarding xApps: +Invoke the API calls into the xApp On-boarder, providing it the locations of the xApp descripters. +curl --location --request POST "http://$(hostname):32080/onboard/api/v1/onboard/download" --header 'Content-Type: application/json' --data-binary "@./onboard.bouncer_another.url" + +4. Checking the on-boarded charts: +curl --location --request GET "http://$(hostname):32080/onboard/api/v1/charts" + +5. Deploying Xapp: +curl --location --request POST "http://$(hostname):32080/appmgr/ric/v1/xapps" --header 'Content-Type: application/json' --data-raw '{"xappName": "bouncerxapp_1"}' + + +Once Xapp deployed + +1.Checkout the it/test repo +2.Modify Values.yaml based on your Xapp deployment- 2 Xapp names and E2sim deployment with PLMID, GNBID update. +ric_robot_suite/helm/nanobot/values.yaml. +3.Add testsuites name "subscription_duplication_scenario2" . +Note: Only bouncer xapps to E2sim tests possible. + + +=============================================================================================================================================== + +Follow the below steps for nanobot testing. +USING THE CHART +To install the chart (which creates and runs a single Kubernetes job), +first copy the packaged Common-Template chart (from +https://gerrit.o-ran-sc.org/r/it/dep.git) into +ric_robot_suite/helm/nanobot/charts. Then, edit +ric_robot_suite/helm/nanobot/values.yaml to reflect your +environment and desired tests and run + +$ helm install [--values ] --namespace nanobot + +... in the ric_robot_suite/helm directory, where +is the recipe override file used when deploying the RIC, if any. The +output from the test will be in the job's log: + +kubectl logs --namespace job/nanobot-r0-ric-robot-run + +(the job name may be different if you have altered the values.yaml +file; use 'kubectl --namespace get jobs' to find it). + +The namespace selected will be where the job's service account is +created and the job runs. It may but need not be the same as the RIC +platform or xapp namespace —- the chart may be deployed in any +namespace. + +CUSTOMIZING AND EXTENDING THE CHART The job mounts its testsuites directory as a configmap, built from files in nanobot/configmap-src/testsuites. Template expansion is performed on files in that directory. -To install the chart, edit values.yaml to reflect your environment -and desired tests and run +Configuration of the chart is split between the "recipe" used to +deploy the RIC (and consumed by the ric-common chart, which is +required for this chart) and the chart's own values.yaml file. +Generally, RIC platform configuration is specified by the recipe, and +robot and xapp configuration from the chart's values.yaml, although +there is some overlap. -$ helm install --namespace nanobot +Support files (testsuites, keyword definition libraries, scripts, and +variable definition files) for the robot framework itself are supplied +by k8s configmaps generated from the contents of subdirectories of the +configmap-src directory; those subdirectories may contain one or more of +the following directories: -The namespace selected will be where the job's service account is -created and the job runs. It may but need not be the same as the RIC -platform or xapp namespace. +bin/: scripts/binaries, mounted at /robot/bin +testsuites/: test suites, mounted at /robot/testsuites +properties/: variable definition (properties) files; + contents mounted at /robot/resources +resources/: robot keyword definition libraries, contents + mounted at /robot/resources + +Helm template expansion is performed on the contents of all +directories. +Because both resources/ and properties/ are mounted at +robot/resources, care should be taken to ensure that names do not +collide across those directories, particularly between trees. +The job uses the nanobot docker image built by +ric_robot_suite/docker/nanobot/Dockerfile; see +ric_robot_suite/docker/nanobot/README for information about the +image.