94f57feeca4b57b205d812d9310210923a833d8e
[it/test.git] / ric_robot_suite / helm / nanobot / README
1 #   Copyright (c) 2019 AT&T Intellectual Property.
2 #
3 #   Licensed under the Apache License, Version 2.0 (the "License");
4 #   you may not use this file except in compliance with the License.
5 #   You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #   Unless required by applicable law or agreed to in writing, software
10 #   distributed under the License is distributed on an "AS IS" BASIS,
11 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #   See the License for the specific language governing permissions and
13 #   limitations under the License.
14
15 This directory contains a Helm chart for the minimal robot container
16 and Kubernetes job.
17
18 USING THE CHART
19 To install the chart (which creates and runs a single Kubernetes job),
20 first copy the packaged Common-Template chart (from
21 https://gerrit.o-ran-sc.org/r/it/dep.git) into
22 ric_robot_suite/helm/nanobot/charts.  Then, edit
23 ric_robot_suite/helm/nanobot/values.yaml to reflect your
24 environment and desired tests and run
25
26 Deploy E2sim using helm install by entering inside the path
27 /test/ric_benchmarking/E2-interface/e2sim/e2sm_examples/kpm_e2sm/helm/
28
29 $ helm install --name <name of deployment> --namespace <namespace>
30
31 Update E2sim PLMID, GNBID to values.yaml(.Values.ric.robot.environment.gNodeB)
32
33 Deploy bouncer xapp using xapp onboarder steps(as mentioned below 2 steps)
34
35 Copy the config-file.json schema file in to the vm where you are deploying and make URL
36 $ echo '{"config-file.json_url": "http://<RIC Server IP>/config-file.json" }' > onboard.<xappname>.url
37
38 Onboard the xapp using below command
39 $ curl --location --request POST "http://<RIC Server IP>:32080/onboard/api/v1/onboard/download"  --header 'Content-Type: application/json' --data-binary "@./onboard.<xappname>.url"
40
41 Provide the xapp name which will be available in config-file.json in to values.yaml (.Values.ric.robot.environment.xapp)
42
43 Deploy nanobot using below helm install
44 $ helm install [--values <override-file> ] --namespace <namespace> nanobot
45
46 ... in the ric_robot_suite/helm directory, where <override-file>
47 is the recipe override file used when deploying the RIC, if any.  The
48 output from the test will be in the job's log:
49
50 kubectl logs --namespace <namespace> job/nanobot-r0-ric-robot-run
51
52 (the job name may be different if you have altered the values.yaml
53 file; use 'kubectl --namespace <namespace> get jobs' to find it).
54
55 The namespace selected will be where the job's service account is
56 created and the job runs.  It may but need not be the same as the RIC
57 platform or xapp namespace —- the chart may be deployed in any
58 namespace.
59
60 CUSTOMIZING AND EXTENDING THE CHART
61 The job mounts its testsuites directory as a configmap, built from
62 files in nanobot/configmap-src/testsuites.  Template expansion is
63 performed on files in that directory.
64
65 Configuration of the chart is split between the "recipe" used to
66 deploy the RIC (and consumed by the ric-common chart, which is
67 required for this chart) and the chart's own values.yaml file.
68 Generally, RIC platform configuration is specified by the recipe, and
69 robot and xapp configuration from the chart's values.yaml, although
70 there is some overlap.
71
72 Support files (testsuites, keyword definition libraries, scripts, and
73 variable definition files) for the robot framework itself are supplied
74 by k8s configmaps generated from the contents of subdirectories of the
75 configmap-src directory; those subdirectories may contain one or more of
76 the following directories:
77
78 bin/:        scripts/binaries, mounted at /robot/bin
79 testsuites/: test suites, mounted at /robot/testsuites
80 properties/: variable definition (properties) files;
81              contents mounted at /robot/resources
82 resources/:  robot keyword definition libraries, contents
83              mounted at /robot/resources
84
85 Helm template expansion is performed on the contents of all
86 directories.
87 Because both resources/ and properties/ are mounted at
88 robot/resources, care should be taken to ensure that names do not
89 collide across those directories, particularly between trees.
90
91 The job uses the nanobot docker image built by
92 ric_robot_suite/docker/nanobot/Dockerfile; see
93 ric_robot_suite/docker/nanobot/README for information about the
94 image.