ce2b1e4397b65c18bffe5c4bda43398d8a28ec29
[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 $ helm install [--values <override-file> ] --namespace <namespace> nanobot
27
28 ... in the ric_robot_suite/helm directory, where <override-file>
29 is the recipe override file used when deploying the RIC, if any.  The
30 output from the test will be in the job's log:
31
32 kubectl logs --namespace <namespace> job/nanobot-r0-ric-robot-run
33
34 (the job name may be different if you have altered the values.yaml
35 file; use 'kubectl --namespace <namespace> get jobs' to find it).
36
37 The namespace selected will be where the job's service account is
38 created and the job runs.  It may but need not be the same as the RIC
39 platform or xapp namespace —- the chart may be deployed in any
40 namespace.
41
42 CUSTOMIZING AND EXTENDING THE CHART
43 The job mounts its testsuites directory as a configmap, built from
44 files in nanobot/configmap-src/testsuites.  Template expansion is
45 performed on files in that directory.
46
47 Configuration of the chart is split between the "recipe" used to
48 deploy the RIC (and consumed by the ric-common chart, which is
49 required for this chart) and the chart's own values.yaml file.
50 Generally, RIC platform configuration is specified by the recipe, and
51 robot and xapp configuration from the chart's values.yaml, although
52 there is some overlap.
53
54 Support files (testsuites, keyword definition libraries, scripts, and
55 variable definition files) for the robot framework itself are supplied
56 by k8s configmaps generated from the contents of subdirectories of the
57 configmap-src directory; those subdirectories may contain one or more of
58 the following directories:
59
60 bin/:        scripts/binaries, mounted at /robot/bin
61 testsuites/: test suites, mounted at /robot/testsuites
62 properties/: variable definition (properties) files;
63              contents mounted at /robot/resources
64 resources/:  robot keyword definition libraries, contents
65              mounted at /robot/resources
66
67 Helm template expansion is performed on the contents of all
68 directories.
69 Because both resources/ and properties/ are mounted at
70 robot/resources, care should be taken to ensure that names do not
71 collide across those directories, particularly between trees.
72
73 The job uses the nanobot docker image built by
74 ric_robot_suite/docker/nanobot/Dockerfile; see
75 ric_robot_suite/docker/nanobot/README for information about the
76 image.