X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=README.md;h=13bc197bbdc6aa04657909ae51edded1f7d9e54b;hb=0513b66b4c229d22ebe50dafaf7abad9512c3a76;hp=f1347f45d647fdbc1ab3ab040fbbc1befb07db20;hpb=b761cd45cad95d2454d83649858061aabce090d0;p=ric-plt%2Fricdms.git diff --git a/README.md b/README.md index f1347f4..13bc197 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,13 @@ # RICDMS +- [RICDMS](#ricdms) + - [Building](#building) + - [Local build and Run](#local-build-and-run) + - [Kubernetes](#kubernetes) + - [Developer Environment](#developer-environment) + - [Mocking all the dependent services (chartmuseum, appmgr...)](#mocking-all-the-dependent-services-chartmuseum-appmgr) + - [Running the RICDMS](#running-the-ricdms) + ## Building @@ -25,4 +33,74 @@ $./ricdms It will start the RICDMS on port `:8000` -### \ No newline at end of file +### Kubernetes + +Build the image +``` +$ make image +``` + +Add the changes to `deployment/dms-config.yaml` as per your environment (refer your `.kubeconfig` file). +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: kube-env +data: + config: | + apiVersion: v1 + clusters: + - cluster: + certificate-authority-data: + server: https://: + name: + contexts: + - context: + cluster: + user: + name: + current-context: + kind: Config + preferences: {} + users: + - name: + user: + client-certificate-data: + client-key-data: +``` + +Apply the deployment yaml : +``` +$ kubectl apply -f deployment +``` + +Make sure that following pod, svc and configmap is created : +```sh +$ kubectl get po,svc,config +NAME READY STATUS RESTARTS AGE +pod/dms-server-r2k64 1/1 Running 0 15s + +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +service/ric-dms-service NodePort 8000:32625/TCP 15s + +NAME DATA AGE +configmap/kube-env 1 90s +``` + +## Developer Environment + +### Mocking all the dependent services (chartmuseum, appmgr...) +One can bring [`moco`](https://github.com/dreamhead/moco) server to mock environment for development purpose. Mocks are captured in `mock` folder. + +Use below command to bring up the mock server : +```sh +$ docker run --rm -d -v /home/ubuntu/osc/ric-plt/ricdms/mock:/var/moco -p 9191:8000 rezzza/docker-moco:latest +``` + +### Running the RICDMS +Export the `` enviroment variable to use the URLs from `` so that mock server could be used. +```bash +$ export RIC_DMS_CONFIG_FILE=$(pwd)/config/config-test.yaml +``` + +Now, developer environment is ready :computer: \ No newline at end of file