Documentation for RICDMS deployment manifest
[ric-plt/ricdms.git] / README.md
1 # RICDMS
2
3
4 ## Building
5
6 ### Local build and Run
7
8 Chekout code for [RICDMS](https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/ricdms) repository from gerrit.
9 ```sh
10 $ git clone ssh://subhash_singh@gerrit.o-ran-sc.org:29418/ric-plt/ricdms
11 ```
12
13 build locally
14 ```sh
15 $ make build
16 ```
17
18 Run the executable
19 ```sh
20 $./ricdms
21 {"ts":1684321663015,"crit":"INFO","id":"ricdms","mdc":{},"msg":"Logger is initialized without config file()."}
22 {"ts":1684321663023,"crit":"INFO","id":"ricdms","mdc":{},"msg":"Starting server at : 0.0.0.0:8000"}
23 2023/05/17 11:07:43 Serving r i c d m s at http://[::]:8000
24 ```
25
26 It will start the RICDMS on port `:8000`
27
28 ### Kubernetes
29
30 Build the image
31 ```
32 $ make image
33 ```
34
35 Add the changes to `deployment/dms-config.yaml` as per your environment (refer your `.kubeconfig` file).
36 ```yaml
37 apiVersion: v1
38 kind: ConfigMap
39 metadata:
40   name: kube-env
41 data:
42   config: |
43     apiVersion: v1
44     clusters:
45     - cluster:
46         certificate-authority-data: <certificate>
47         server: https://<kube-ip>:<kube-port>
48       name: <name>
49     contexts:
50     - context:
51         cluster:<cluster-name>
52         user: <user>
53       name: <name>
54     current-context: <context>
55     kind: Config
56     preferences: {}
57     users:
58     - name: <name>
59       user:
60         client-certificate-data: <cliet-cert> 
61         client-key-data: <client-key-data>
62 ```
63
64 Apply the deployment yaml :
65 ```
66 $ kubectl apply -f deployment
67 ```
68
69 Make sure that following pod, svc and configmap is created :
70 ```sh
71 $ kubectl get po,svc,config
72 NAME                                          READY   STATUS    RESTARTS   AGE
73 pod/dms-server-r2k64                          1/1     Running   0          15s
74
75 NAME                             TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
76 service/ric-dms-service          NodePort    <cluster-IP>    <none>        8000:32625/TCP   15s
77
78 NAME                         DATA   AGE
79 configmap/kube-env           1      90s
80 ```
81