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 and Deployment of Hw-go xApp
8 =======================================
14 Onboarding of hw-go using dms_cli tool
15 --------------------------------------
17 `dms_cli` offers rich set of command line utility to onboard *hw-go* xapp
20 First checkout the `hw-go <https://gerrit.o-ran-sc.org/r/admin/repos/ric-app/hw-go>`_ repository from gerrit.
24 $ git clone "https://gerrit.o-ran-sc.org/r/ric-app/hw-go"
27 `hw-go` has following folder structure
36 │ ├── config-file.json // descriptor for hw-go
37 │ ├── schema.json // schema for controls section of descriptor
38 │ └── uta_rtg.rt // local route file
45 For onboarding `hw-go` 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
48 Once `dms_cli` is availabe we can proceed to onboarding procedure.
50 configure the `export CHART_REPO_URL` to point `chartmuseme`.
54 $export CHART_REPO_URL=http://<service-ricplt-xapp-onboarder-http.ricplt>:8080
56 check if `dms_cli` working fine.
63 Now move to `config` folder to initiate onboarding.
68 $ dms_cli onboard --config_file_path=config-file.json --shcema_file_path=schema.json
70 path: '{{ index .Values "readinessProbe" "httpGet" "path" | toJson }}'
71 port: '{{ index .Values "readinessProbe" "httpGet" "port" | toJson }}'
72 initialDelaySeconds: '{{ index .Values "readinessProbe" "initialDelaySeconds" | toJson }}'
73 periodSeconds: '{{ index .Values "readinessProbe" "periodSeconds" | toJson }}'
76 path: '{{ index .Values "livenessProbe" "httpGet" "path" | toJson }}'
77 port: '{{ index .Values "livenessProbe" "httpGet" "port" | toJson }}'
78 initialDelaySeconds: '{{ index .Values "livenessProbe" "initialDelaySeconds" | toJson }}'
79 periodSeconds: '{{ index .Values "livenessProbe" "periodSeconds" | toJson }}'
85 Check if `hw-go` is onborded
89 $ curl --location --request GET "http://<appmgr>:32080/onboard/api/v1/charts" --header 'Content-Type: application/json'
96 "description": "Standard xApp Helm Chart",
100 "charts/hw-go-1.0.0.tgz"
102 "created": "2021-06-24T18:57:41.98056196Z",
103 "digest": "14a484d9a394ed34eab66e5241ec33e73be8fa70a2107579d19d037f2adf57a0"
108 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-go/ver/1.0.0" --header 'Content-Type: application/json' --output hw-go.tgz
114 Now the onboarding is done.
119 Once charts are available we can deploy the the `hw-go` using following curl command :
123 $ curl --location --request POST "http://<appmgr>:32080/appmgr/ric/v1/xapps" --header 'Content-Type: application/json' --data-raw '{"xappName": "hw-go", "helmVersion": "1.0.0"}'
124 {"instances":null,"name":"hw-go","status":"deployed","version":"1.0"}
126 Deployment will be done in `ricxapp` ns :
130 # kubectl get po -n ricxapp
131 NAME READY STATUS RESTARTS AGE
132 ricxapp-hw-go-55ff7549df-kpj6k 1/1 Running 0 2m
134 # kubectl get svc -n ricxapp
135 NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
136 aux-entry ClusterIP IP1 <none> 80/TCP,443/TCP 73d
137 service-ricxapp-hw-go-http ClusterIP IP2 <none> 8080/TCP 103m
138 service-ricxapp-hw-go-rmr ClusterIP IP3 <none> 4560/TCP,4561/TCP 103m
140 Now we can query to appmgr to get list of all the deployed xapps :
144 # curl http://service-ricplt-appmgr-http.ricplt:8080/ric/v1/xapps | jq .
145 % Total % Received % Xferd Average Speed Time Time Time Current
146 Dload Upload Total Spent Left Speed
147 100 347 100 347 0 0 578 0 --:--:-- --:--:-- --:--:-- 579
152 "ip": "service-ricxapp-hw-go-rmr.ricxapp",
153 "name": "hw-go-55ff7549df-kpj6k",
161 "RIC_HEALTH_CHECK_REQ"
168 "RIC_HEALTH_CHECK_RESP"
173 "status": "deployed",
182 # kubectl logs ricxapp-hw-go-55ff7549df-kpj6k -n ricxapp
183 {"ts":1624562552123,"crit":"INFO","id":"hw-app","mdc":{"time":"2021-06-24T19:22:32"},"msg":"Using config file: config/config-file.json"}
184 {"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"}
185 {"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[]}"}
186 {"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[]}"}
187 1624562552 6/RMR [INFO] ric message routing library on SI95 p=0 mv=3 flg=00 (fd4477a 4.5.2 built: Jan 21 2021)
188 {"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=[]"}
189 {"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[]}"}
190 {"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[]}"}
191 {"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[]}"}
192 {"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[]}"}
193 {"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"}
194 {"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 ..."}
195 {"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..."}
196 {"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"}
197 1624562553 6/RMR [INFO] sends: ts=1624562553 src=service-ricxapp-hw-go-rmr.ricxapp:0 target=localhost:4591 open=0 succ=0 fail=0 (hard=0 soft=0)
198 1624562553 6/RMR [INFO] sends: ts=1624562553 src=service-ricxapp-hw-go-rmr.ricxapp:0 target=localhost:4560 open=0 succ=0 fail=0 (hard=0 soft=0)
199 1624562553 6/RMR [INFO] sends: ts=1624562553 src=service-ricxapp-hw-go-rmr.ricxapp:0 target=service-ricplt-a1mediator-rmr.ricplt:4562 open=0 succ=0 fail=0 (hard=0 soft=0)
201 {"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-go' is not ready yet, waiting ..."}
202 {"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-go' is not ready yet, waiting ..."}
204 Here we are done with the onboaring and deployment of `hw-go`.