build image
[ric-app/rc.git] / README.md
1
2 ==================================================================================
3        Copyright (c) 2020 AT&T Intellectual Property.
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16 ==================================================================================
17
18 RC Xapp
19 ================
20
21 This repository contains the source for sending RIC control Msg to RAN/E2 Node  based on the GRPC control request received from other xapps
22
23 This xApp can be onboarded through the xApp Onboarder.  The xapp descriptor 
24 is under the xapp-descriptor/ directory.
25
26 Then the xapp can be deployed through the App Manager. 
27 Procedure to Onboard the xapp is given in installation guide, in docs folder
28
29 GRPC communication can be tested using the grpccurl command
30
31
32 In the current implementation, timer is started after initiating Control Request to E2Node,and also
33 supports RIC Control ACK response from E2Node.
34
35 Steps to onboard the xapp (Pre Dawn Release)
36
37  1)echo '{ "config-file.json_url": "https://gerrit.o-ran-sc.org/r/gitweb?p=ric-app/rc.git;a=blob_plain;f=xapp-descriptor/config.json;hb=HEAD","controls-schema.json_url": "https://gerrit.o-ran-sc.org/r/gitweb?p=ric-app/rc.git;a=blob_plain;f=xapp-descriptor/schema.json;hb=HEAD" }' > onboard.rc.url
38
39 2)Onboard the rc xapp using the below command :
40        $curl --location --request POST "http://$(hostname):32080/onboard/api/v1/onboard/download"      --header 'Content-Type: application/json' --data-binary "@./onboard.rc.url"  
41
42        After this command: xapp should be created
43        Eg:
44        $curl --location --request POST "http://$(hostname):32080/onboard/api/v1/onboard/download"      --header 'Content-Type: application/json' --data-binary "@./onboard.rc.url"
45        {
46        "status": "Created"
47        }
48  3)Deploying the xapp:
49        Eg:
50        $curl --location --request POST "http://$(hostname):32080/appmgr/ric/v1/xapps"      --header 'Content-Type: application/json' --data-raw '{"xappName": "rc"}'
51        {
52        "instances":null,"name":"rc","status":"deployed","version":"1.0"
53        }
54
55          after this step the xapp should be in running state
56
57          ricxapp       ricxapp-rc-5ccdcc9f6f-ktq7w                                  1/1     Running     0          88m
58
59  4) restart rtMgr so rmr is ready
60
61 Steps to deploy the xapp using dms_cli tool
62
63 1)Create a local helm repository with a port other than 8080 on host
64         $docker run --rm -u 0 -it -d -p 8090:8080 -e DEBUG=1 -e STORAGE=local -e STORAGE_LOCAL_ROOTDIR=/charts -v $(pwd)/charts:/charts chartmuseum/chartmuseum:latest
65
66 2)Set CHART_REPO_URL env variable
67         $export CHART_REPO_URL=http://0.0.0.0:8090
68
69 3)Check dms_cli health is active(true) or not
70         $dms_cli health
71            True
72
73 4)Onboard the rc xapp using the below command :
74 Make sure that you have the xapp descriptor config file and the schema file at your local file system
75         $dms_cli onboard --config_file_path=config-file.json --shcema_file_path=schema.json
76         After this command: xapp should be created
77         Eg:
78         $dms_cli onboard --config_file_path=config-file.json --shcema_file_path=schema.json
79         {
80         "status": "Created"
81         }
82
83 5)List the helm charts from helm repository (Optional)
84         $curl -X GET http://localhost:8090/api/charts | jq .
85         Eg:
86         $curl -X GET http://$(hostname):8090/api/charts | jq .
87 {
88  "rc": [
89     {
90       "name": "rc",
91       "version": "1.0.0",
92       "description": "Standard xApp Helm Chart",
93       "apiVersion": "v1",
94       "appVersion": "1.0",
95       "urls": [
96         "charts/rc-1.0.0.tgz"
97       ],
98       "created": "2022-04-20T05:26:37.891030646Z",
99       "digest": "3636f4fba220aab5739d737eb3cd3d74b5012b029bde95f114b05f9eaa786b1f"
100     }
101   ]
102 }
103
104 6) Install the xApp
105         $dms_cli install --xapp_chart_name=XAPP_CHART_NAME --version=VERSION --namespace=NAMESPACE
106         Eg:
107         $dms_cli install --xapp_chart_name=rc --version=1.0.0 --namespace=ricxapp
108         status: OK
109           after this step the xapp should be in running state
110
111           ricxapp       ricxapp-rc-5d8b97d58d-hhznh                                 1/1     Running     1          60m
112
113 7) restart rtMgr so rmr is ready