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 =======================================
11 Onboarding of hw-go using dms_cli tool
12 --------------------------------------
14 `dms_cli` offers rich set of command line utility to onboard *hw-go* xapp
17 First checkout the [hw-go] (https://gerrit.o-ran-sc.org/r/admin/repos/ric-app/hw-go) repository from gerrit.
21 $ git clone "https://gerrit.o-ran-sc.org/r/ric-app/hw-go"
24 `hw-go` has following folder structure
33 │ ├── config-file.json // descriptor for hw-go
34 │ ├── schema.json // schema for controls section of descriptor
35 │ └── uta_rtg.rt // local route file
42 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
45 Once `dms_cli` is availabe we can proceed to onboarding procedure.
47 configure the `export CHART_REPO_URL` to point `chartmuseme`.
51 $export CHART_REPO_URL=http://<service-ricplt-xapp-onboarder-http.ricplt>:8080
53 check if `dms_cli` working fine.
60 Now move to `config` folder to initiate onboarding.
65 $ dms_cli onboard --config_file_path=config-file.json --shcema_file_path=schema.json
67 path: '{{ index .Values "readinessProbe" "httpGet" "path" | toJson }}'
68 port: '{{ index .Values "readinessProbe" "httpGet" "port" | toJson }}'
69 initialDelaySeconds: '{{ index .Values "readinessProbe" "initialDelaySeconds" | toJson }}'
70 periodSeconds: '{{ index .Values "readinessProbe" "periodSeconds" | toJson }}'
73 path: '{{ index .Values "livenessProbe" "httpGet" "path" | toJson }}'
74 port: '{{ index .Values "livenessProbe" "httpGet" "port" | toJson }}'
75 initialDelaySeconds: '{{ index .Values "livenessProbe" "initialDelaySeconds" | toJson }}'
76 periodSeconds: '{{ index .Values "livenessProbe" "periodSeconds" | toJson }}'
82 Check if `hw-go` is onborded
86 $ curl --location --request GET "http://<appmgr>:32080/onboard/api/v1/charts" --header 'Content-Type: application/json'
93 "description": "Standard xApp Helm Chart",
97 "charts/hw-go-1.0.0.tgz"
99 "created": "2021-06-24T18:57:41.98056196Z",
100 "digest": "14a484d9a394ed34eab66e5241ec33e73be8fa70a2107579d19d037f2adf57a0"
105 If we would wish to download the charts then we can perform following curl operation :
109 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
111 Now the onboarding is done.
116 Once charts are available we can deploy the the `hw-go` using following curl command :
120 $ 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"}'
121 {"instances":null,"name":"hw-go","status":"deployed","version":"1.0"}
123 Deployment will be done in `ricxapp` ns :
127 # kubectl get po -n ricxapp
128 NAME READY STATUS RESTARTS AGE
129 ricxapp-hw-go-55ff7549df-kpj6k 1/1 Running 0 2m
131 # kubectl get svc -n ricxapp
132 NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
133 aux-entry ClusterIP IP1 <none> 80/TCP,443/TCP 73d
134 service-ricxapp-hw-go-http ClusterIP IP2 <none> 8080/TCP 103m
135 service-ricxapp-hw-go-rmr ClusterIP IP3 <none> 4560/TCP,4561/TCP 103m
137 Now we can query to appmgr to get list of all the deployed xapps :
141 # curl http://service-ricplt-appmgr-http.ricplt:8080/ric/v1/xapps | jq .
142 % Total % Received % Xferd Average Speed Time Time Time Current
143 Dload Upload Total Spent Left Speed
144 100 347 100 347 0 0 578 0 --:--:-- --:--:-- --:--:-- 579
149 "ip": "service-ricxapp-hw-go-rmr.ricxapp",
150 "name": "hw-go-55ff7549df-kpj6k",
158 "RIC_HEALTH_CHECK_REQ"
165 "RIC_HEALTH_CHECK_RESP"
170 "status": "deployed",
179 # kubectl logs ricxapp-hw-go-55ff7549df-kpj6k -n ricxapp
180 {"ts":1624562552123,"crit":"INFO","id":"hw-app","mdc":{"time":"2021-06-24T19:22:32"},"msg":"Using config file: config/config-file.json"}
181 {"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"}
182 {"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[]}"}
183 {"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[]}"}
184 1624562552 6/RMR [INFO] ric message routing library on SI95 p=0 mv=3 flg=00 (fd4477a 4.5.2 built: Jan 21 2021)
185 {"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=[]"}
186 {"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[]}"}
187 {"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[]}"}
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":"Register new counter with opts: {ricxapp RMR TransmitError The total number of RMR transmission errors map[]}"}
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 ReceiveError The total number of RMR receive errors 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":"Xapp started, listening on: :8080"}
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":"rmrClient: Waiting for RMR to be ready ..."}
192 {"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..."}
193 {"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"}
194 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)
195 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)
196 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)
198 {"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 ..."}
199 {"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 ..."}
201 Here we are done with the onboaring and deployment of `hw-go`.