1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. SPDX-License-Identifier: CC-BY-4.0
3 .. Copyright (c) 2021 Samsung Electronics Co., Ltd. All Rights Reserved.Copyright (C) 2021
7 ### Onboarding of hw-python using dms_cli tool
9 `dms_cli` offers rich set of command line utility to onboard `hw-python` xapp
12 First checkout the [hw-python](https://gerrit.o-ran-sc.org/r/ric-app/hw-python) repository from gerrit.
15 git clone "https://gerrit.o-ran-sc.org/r/ric-app/hw-python"
17 `hw-python` has following folder structure
21 +---hw_python.egg-info
24 | config-file.json # descriptor for xapp deployment.
27 | schema.json #schema for validating the config-file.json
35 For onboarding `hw-python` make sure that `dms_cli` and helm3 is installed. One can follow [documentation](https://docs.o-ran-sc.org/projects/o-ran-sc-it-dep/en/latest/installation-guides.html#ric-applications) to
38 Once `dms_cli` is availabe we can proceed to onboarding proceure.
40 configure the `export CHART_REPO_URL` to point `chartmuseme`.
42 $export CHART_REPO_URL=http://<service-ricplt-xapp-onboarder-http.ricplt>:8080
45 check if `dms_cli` working fine.
51 Now move to `init` folder to initiate onboarding.
56 $ dms_cli onboard --config_file_path=config-file.json --shcema_file_path=schema.json
58 path: '{{ index .Values "readinessProbe" "httpGet" "path" | toJson }}'
59 port: '{{ index .Values "readinessProbe" "httpGet" "port" | toJson }}'
60 initialDelaySeconds: '{{ index .Values "readinessProbe" "initialDelaySeconds" | toJson }}'
61 periodSeconds: '{{ index .Values "readinessProbe" "periodSeconds" | toJson }}'
64 path: '{{ index .Values "livenessProbe" "httpGet" "path" | toJson }}'
65 port: '{{ index .Values "livenessProbe" "httpGet" "port" | toJson }}'
66 initialDelaySeconds: '{{ index .Values "livenessProbe" "initialDelaySeconds" | toJson }}'
67 periodSeconds: '{{ index .Values "livenessProbe" "periodSeconds" | toJson }}'
74 Check if `hw-python` is onborded
76 $ curl --location --request GET "http://<appmgr>:32080/onboard/api/v1/charts" --header 'Content-Type: application/json'
82 "description": "Standard xApp Helm Chart",
86 "charts/hw-python-1.0.0.tgz"
88 "created": "2021-07-05T15:07:34.518377486Z",
89 "digest": "e9db874d35154643a2c6f26dd52929c9dcf143f165683c03d07518bb0c2d768d"
96 "description": "Standard xApp Helm Chart",
100 "charts/hw-python-1.0.0.tgz"
102 "created": "2021-07-05T15:20:13.965653743Z",
103 "digest": "975b1da1f8669e8ed1b1e5be809e7cf4841ef33abcb88207bc3a735e9b543a9a"
109 If we would wish to download the charts then we can perform following curl operation :
112 curl --location --request GET "http://<appmgr>:32080/onboard/api/v1/charts/xapp/hw-python/ver/1.0.0" --header 'Content-Type: application/json' --output hw-python.tgz
114 The downloaded folder has the deployment files for hw-python
116 tar -xvzf hw-python.tgz
118 hw-python/values.yaml
119 hw-python/templates/_helpers.tpl
120 hw-python/templates/appconfig.yaml
121 hw-python/templates/appenv.yaml
122 hw-python/templates/deployment.yaml
123 hw-python/templates/service-http.yaml
124 hw-python/templates/service-rmr.yaml
125 hw-python/config/config-file.json
126 hw-python/descriptors/schema.json
130 Now the onboarding is done.
132 ### Deployment of hw-python
134 Once charts are available we can deploy the the `hw-python` using following curl command :
137 $ curl --location --request POST "http://<appmgr>:32080/appmgr/ric/v1/xapps" --header 'Content-Type: application/json' --data-raw '{"xappName": "hw-python", "helmVersion": "1.0.0"}'
138 {"instances":null,"name":"hw-python","status":"deployed","version":"1.0"}
141 Deployment will be done in `ricxapp` ns :
144 # kubectl get pods -n ricxapp
145 NAME READY STATUS RESTARTS AGE
146 ricxapp-hw-python-64b5447dcc-mbt5w 1/1 Running 0 5m45s
148 CLUSTER-IP EXTERNAL-IP PORT(S) AGE
149 aux-entry ClusterIP 10.111.35.76 <none> 80/TCP,443/TCP 9d
150 service-ricxapp-hw-python-http ClusterIP 10.104.223.245 <none> 8080/TCP 6m23s
151 service-ricxapp-hw-python-rmr ClusterIP 10.103.243.21 <none> 4560/TCP,4561/TCP 6m23s
155 Now we can query to appmgr to get list of all the deployed xapps :
158 # curl http://service-ricplt-appmgr-http.ricplt:8080/ric/v1/xapps | jq .
159 % Total % Received % Xferd Average Speed Time Time Time Current
160 Dload Upload Total Spent Left Speed
161 100 347 100 347 0 0 578 0 --:--:-- --:--:-- --:--:-- 579
166 "ip": "service-ricxapp-hw-python-rmr.ricxapp",
167 "name": "hw-python-55ff7549df-kpj6k",
175 "RIC_HEALTH_CHECK_REQ"
182 "RIC_HEALTH_CHECK_RESP"
187 "status": "deployed",
193 Logs from `hw-python` :
196 # kubectl logs ricxapp-hw-python-55ff7549df-kpj6k -n ricxapp
197 {"ts":1624562552123,"crit":"INFO","id":"hw-app","mdc":{"time":"2021-06-24T19:22:32"},"msg":"Using config file: config/config-file.json"}
198 {"ts":1624562552124,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:32"},"msg":"Serving metrics on: url=/ric/v1/metrics namespace=ricxapp"}
199 {"ts":1624562552133,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:32"},"msg":"Register new counter with opts: {ricxapp SDL Stored The total number of stored SDL transactions map[]}"}
200 {"ts":1624562552133,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:32"},"msg":"Register new counter with opts: {ricxapp SDL StoreError The total number of SDL store errors map[]}"}
201 1624562552 6/RMR [INFO] ric message routing library on SI95 p=0 mv=3 flg=00 (fd4477a 4.5.2 built: Jan 21 2021)
202 {"ts":1624562552140,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","HWApp":"0.0.1","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:32"},"msg":"new rmrClient with parameters: ProtPort=0 MaxSize=0 ThreadType=0 StatDesc=RMR LowLatency=false FastAck=false Policies=[]"}
203 {"ts":1624562552140,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","HWApp":"0.0.1","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:32"},"msg":"Register new counter with opts: {ricxapp RMR Transmitted The total number of transmited RMR messages map[]}"}
204 {"ts":1624562552140,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","HWApp":"0.0.1","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:32"},"msg":"Register new counter with opts: {ricxapp RMR Received The total number of received RMR messages map[]}"}
205 {"ts":1624562552140,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","HWApp":"0.0.1","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:32"},"msg":"Register new counter with opts: {ricxapp RMR TransmitError The total number of RMR transmission errors map[]}"}
206 {"ts":1624562552140,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","HWApp":"0.0.1","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:32"},"msg":"Register new counter with opts: {ricxapp RMR ReceiveError The total number of RMR receive errors map[]}"}
207 {"ts":1624562552140,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","HWApp":"0.0.1","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:32"},"msg":"Xapp started, listening on: :8080"}
208 {"ts":1624562552140,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","HWApp":"0.0.1","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:32"},"msg":"rmrClient: Waiting for RMR to be ready ..."}
209 {"ts":1624562553140,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","HWApp":"0.0.1","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:33"},"msg":"rmrClient: RMR is ready after 1 seconds waiting..."}
210 {"ts":1624562553141,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","HWApp":"0.0.1","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:33"},"msg":"xApp ready call back received"}
211 1624562553 6/RMR [INFO] sends: ts=1624562553 src=service-ricxapp-hw-python-rmr.ricxapp:0 target=localhost:4591 open=0 succ=0 fail=0 (hard=0 soft=0)
212 1624562553 6/RMR [INFO] sends: ts=1624562553 src=service-ricxapp-hw-python-rmr.ricxapp:0 target=localhost:4560 open=0 succ=0 fail=0 (hard=0 soft=0)
213 1624562553 6/RMR [INFO] sends: ts=1624562553 src=service-ricxapp-hw-python-rmr.ricxapp:0 target=service-ricplt-a1mediator-rmr.ricplt:4562 open=0 succ=0 fail=0 (hard=0 soft=0)
215 {"ts":1624562557140,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","HWApp":"0.0.1","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:37"},"msg":"Application='hw-python' is not ready yet, waiting ..."}
216 {"ts":1624562562141,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","HWApp":"0.0.1","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:42"},"msg":"Application='hw-python' is not ready yet, waiting ..."}
217 {"ts":1624562567141,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","HWApp":"0.0.1","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:47"},"msg":"Application='hw-python' is not ready yet, waiting ..."}
218 {"ts":1624562567370,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","HWApp":"0.0.1","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:47"},"msg":"restapi: method=GET url=/ric/v1/health/ready"}
219 {"ts":1624562569766,"crit":"INFO","id":"hw-app","mdc":{"CONTAINER_NAME":"","HOST_NAME":"","HWApp":"0.0.1","PID":"6","POD_NAME":"","SERVICE_NAME":"","SYSTEM_NAME":"","time":"2021-06-24T19:22:49"},"msg":"restapi: method=GET url=/ric/v1/health/alive"}
222 Here we are done with the onboaring and deployment of `hw-python`.