Near RT RIC Platform new-installer initial release 43/11743/5
authorAbhijit Gadgil <gabhijit@iitbombay.org>
Thu, 5 Oct 2023 06:13:12 +0000 (11:43 +0530)
committerAbhijit Gadgil <gabhijit@iitbombay.org>
Fri, 24 Nov 2023 16:07:02 +0000 (21:37 +0530)
Initial Release for Near RT RIC Platform single helm chart installer.

patchset-4: Updated REAME.md and updated `Makefile` to run
`helm repo update` after all charts are pushed to local repo.

patchset-5: Added documentation about HTTP proxy and helm override
file.

Issue-Id: RIC-1018
Signed-off-by: Abhijit Gadgil <gabhijit@iitbombay.org>
Change-Id: I6ff41be10c044c9d68bc710cf39ab815b0b1fea1

150 files changed:
new-installer/README.md [new file with mode: 0644]
new-installer/helm-overrides/nearrtric/minimal-nearrt-ric.yaml [new file with mode: 0644]
new-installer/helm/charts/.gitignore [new file with mode: 0644]
new-installer/helm/charts/Makefile [new file with mode: 0644]
new-installer/helm/charts/nearrtric/Chart.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/Makefile [new file with mode: 0644]
new-installer/helm/charts/nearrtric/README.md [new file with mode: 0644]
new-installer/helm/charts/nearrtric/a1mediator/.gitignore [new file with mode: 0644]
new-installer/helm/charts/nearrtric/a1mediator/.helmignore [new file with mode: 0644]
new-installer/helm/charts/nearrtric/a1mediator/Chart.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/a1mediator/templates/config.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/a1mediator/templates/deployment.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/a1mediator/templates/env.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/a1mediator/templates/ingress-a1mediator.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/a1mediator/templates/service-http.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/a1mediator/templates/service-rmr.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/a1mediator/values.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/alarmmanager/.helmignore [new file with mode: 0644]
new-installer/helm/charts/nearrtric/alarmmanager/Chart.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/alarmmanager/templates/appconfig.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/alarmmanager/templates/configmap.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/alarmmanager/templates/deployment.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/alarmmanager/templates/env.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/alarmmanager/templates/pv.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/alarmmanager/templates/pvc.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/alarmmanager/templates/service-http.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/alarmmanager/templates/service-rmr.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/alarmmanager/templates/serviceaccount.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/alarmmanager/values.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/.helmignore [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/Chart.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/bin/_appmgr-tiller-secret-copier.sh.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/bin/_svcacct-to-kubeconfig.sh.tpl [new file with mode: 0755]
new-installer/helm/charts/nearrtric/appmgr/resources/appmgr.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/templates/appconfig.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/templates/bin/_appmgr-tiller-secret-copier.sh.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/templates/bin/_svcacct-to-kubeconfig.sh.tpl [new file with mode: 0755]
new-installer/helm/charts/nearrtric/appmgr/templates/configmap-bin.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/templates/deployment.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/templates/env-appmgr.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/templates/ingress-appmgr.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/templates/secret.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/templates/service-http.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/templates/service-rmr.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/templates/serviceaccount.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/appmgr/values.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/dbaas/Chart.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/dbaas/templates/appconfig.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/dbaas/templates/configmap.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/dbaas/templates/service.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/dbaas/templates/statefulset.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/dbaas/values.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2mgr/Chart.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2mgr/templates/configmap.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2mgr/templates/deployment.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2mgr/templates/env.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2mgr/templates/ingress-e2mgr.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2mgr/templates/service-http.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2mgr/templates/service-rmr.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2mgr/values.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/.helmignore [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/Chart.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/resources/cleaner.sh [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/resources/configfile.properties [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/resources/pizpub.crontab [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/templates/configmap-loglevel.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/templates/configmap-pizpub.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/templates/configmap.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/templates/deployment.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/templates/env.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/templates/pv.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/templates/pvc.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/templates/service-prometheus.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/templates/service-rmr.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/templates/service-sctp.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/e2term/values.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/jaegeradapter/.helmignore [new file with mode: 0644]
new-installer/helm/charts/nearrtric/jaegeradapter/Chart.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/jaegeradapter/templates/agent-service.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/jaegeradapter/templates/collector-service.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/jaegeradapter/templates/deployment.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/jaegeradapter/templates/env.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/jaegeradapter/templates/query-service.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/jaegeradapter/values.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/Chart.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_a1mediator.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_alarmmanager.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_appmgr.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_chart.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_context_locator.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_dbaas.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_docker.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_e2mgr.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_e2term.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_influxdb.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_ingress_controller.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_jaegeradapter.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_namespace.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_o1mediator.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_rtmgr.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_submgr.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_tiller.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_vespamgr.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_xapp_onboarder.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/nearrt-ric-common/values.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/o1mediator/.gitignore [new file with mode: 0644]
new-installer/helm/charts/nearrtric/o1mediator/.helmignore [new file with mode: 0644]
new-installer/helm/charts/nearrtric/o1mediator/Chart.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/o1mediator/resources/config-file.json [new file with mode: 0644]
new-installer/helm/charts/nearrtric/o1mediator/resources/uta_rtg.rt [new file with mode: 0644]
new-installer/helm/charts/nearrtric/o1mediator/templates/appconfig.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/o1mediator/templates/deployment.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/o1mediator/templates/env.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/o1mediator/templates/service-http.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/o1mediator/templates/service-tcp.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/o1mediator/templates/serviceaccount.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/o1mediator/values.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/rtmgr/.helmignore [new file with mode: 0644]
new-installer/helm/charts/nearrtric/rtmgr/Chart.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/rtmgr/templates/config.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/rtmgr/templates/deployment.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/rtmgr/templates/env.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/rtmgr/templates/service-http.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/rtmgr/templates/service-rmr.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/rtmgr/values.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/submgr/Chart.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/submgr/templates/configmap.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/submgr/templates/deployment.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/submgr/templates/env.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/submgr/templates/service-http.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/submgr/templates/service-rmr.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/submgr/values.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/values.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/vespamgr/.helmignore [new file with mode: 0644]
new-installer/helm/charts/nearrtric/vespamgr/Chart.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/vespamgr/templates/_base.tpl [new file with mode: 0644]
new-installer/helm/charts/nearrtric/vespamgr/templates/deployment.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/vespamgr/templates/secret.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/vespamgr/templates/service.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/vespamgr/templates/vespa-config.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/vespamgr/values.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/xapp-onboarder/.helmignore [new file with mode: 0644]
new-installer/helm/charts/nearrtric/xapp-onboarder/Chart.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/xapp-onboarder/templates/deployment.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/xapp-onboarder/templates/env-chartmuseum.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/xapp-onboarder/templates/env-xapp-onboarder.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/xapp-onboarder/templates/ingress-chartmuseum.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/xapp-onboarder/templates/ingress-xapp-onboarder.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/xapp-onboarder/templates/service-http.yaml [new file with mode: 0644]
new-installer/helm/charts/nearrtric/xapp-onboarder/values.yaml [new file with mode: 0644]

diff --git a/new-installer/README.md b/new-installer/README.md
new file mode 100644 (file)
index 0000000..a4cb085
--- /dev/null
@@ -0,0 +1,312 @@
+# Overview
+
+**Note: This is WIP so your mileage may vary, but you are welcome to create an issue if there are problems you are facing using this documentation.**
+
+This directory contains the source code for the new installer for the NearRT RIC Platform. The new installer leverages a single helm chart for installation. The components deployed during installations are determined by various flags present in the `values.yaml` file of the chart, which can be overridden using an override file.
+
+The code is organized as follows
+
+  |
+  + helm
+  | |
+  | + charts
+  |   |
+  |   + Makefile
+  |   + nearrtric/
+  |     |
+  |     + Makefile
+  |     + a1mediator/
+  |     + appmgr/
+  |     + dbaas/
+  |     + e2mgr/
+  |     + e2term/
+  |     + nearrt-ric-common/
+       |               ...
+  |
+  + helm-overrides/
+    |
+    + nearrtric/
+      |
+      + example-override-file.yaml
+
+# Supported Versions
+
+Following software versions are currently supported.
+
+  - `minikube` with supported `k8s` version.
+  - kubernetes 1.22 and above. A number of API versions were deprecated starting from this version. This should thus serve as a good
+  - Helm Charts version 3
+
+This setup is tested on Ubuntu 22.04 with following `minikube`, `k8s`, `kubectl` and `helm` versions.
+
+```bash
+$ uname -mvp
+#26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64
+
+$ kubectl version
+WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
+Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.1", GitCommit:"3ddd0f45aa91e2f30c70734b175631bec5b5825a", GitTreeState:"clean", BuildDate:"2022-05-24T12:26:19Z", GoVersion:"go1.18.2", Compiler:"gc", Platform:"linux/amd64"}
+Kustomize Version: v4.5.4
+Server Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.1", GitCommit:"8f94681cd294aa8cfd3407b8191f6c70214973a4", GitTreeState:"clean", BuildDate:"2023-01-18T15:51:25Z", GoVersion:"go1.19.5", Compiler:"gc", Platform:"linux/amd64"}
+WARNING: version difference between client (1.24) and server (1.26) exceeds the supported minor version skew of +/-1
+
+$ minikube version
+minikube version: v1.29.0
+commit: ddac20b4b34a9c8c857fc602203b6ba2679794d3
+
+$ helm version
+version.BuildInfo{Version:"v3.11.2", GitCommit:"912ebc1cd10d38d340f048efaf0abda047c3468e", GitTreeState:"clean", GoVersion:"go1.18.10"}
+
+```
+
+# Getting Started
+
+## Setup and Pre-requisites
+
+These instructions assume that you have `minikube` and `kubectl` installed.
+
+## Starting `minikube`
+
+First start `minikube` using the following command.
+
+```bash
+$ minikube start --driver=docker
+
+```
+We are using the 'docker' driver because this allows us to set up tunnels and expose services to the host using the Kubernetes Ingress Controller. The other drivers may also work but are not tested so far. This will start the 'minikube kubernetes cluster'. You can interact with this cluster using `kubectl`.
+
+Also, note that you may have to set the environment variables like `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` if you are behind an HTTP Proxy. Otherwise Kubernetes won't be able to pull the images.
+
+```bash
+$ kubectl get pods -A
+```
+
+## Creating Platform and Xapp Namespaces
+
+After this step we need to create the namespaces for our deployment. Note: The namespaces need to be created every time we create a new cluster (not upon restarting the cluster).
+
+```bash
+$ kubectl create ns ricplt
+$ kubectl create ns ricxapp
+```
+
+This sets up the cluster for subsequent installation of the NearRT RIC platform components.
+
+## Installing and Running Chart Museum
+
+One current limitation of this installation is - the XApp on-boarding functionality is not fully integrated into the `k8s` deployment as a result following steps need to be run manually for on-boarding and  creating installation packages of XApps. This will be eventually part of the `k8s` deployment (likely as a separate `helm` chart deployed in a separate namespace `k8s`).
+
+Please follow the steps mentioned below to install `helm`, `chartmuseum` and `cm-push` plugin for `helm`.
+
+```bash
+# Following commands are run as non root user. The idea is to keep the privileges to minimum.
+
+# Create a `temp/` directory in the home folder that will be used to download all the artifacts required during the bring up.
+$ mkdir temp
+$ cd temp
+$ wget https://get.helm.sh/helm-v3.11.2-linux-amd64.tar.gz
+$ wget https://get.helm.sh/chartmuseum-v0.13.1-linux-amd64.tar.gz
+$ tar xvzpf helm-v3.11.2-linux-amd64.tar.gz
+$ tar xvzpf chartmuseum-v0.13.1-linux-amd64.tar.gz
+
+# It is assumed that ~/bin/ is in your $PATH
+$ cp linux-amd64/chartmuseum linux-amd64/helm ~/bin
+$ helm version
+$ chartmuseum -version
+
+# To Push to chart museum, we will need to install a Chart Museum push plugin.
+$ helm plugin install https://github.com/chartmuseum/helm-push
+
+# This should have the `cm-push` command available.
+$ helm plugin list
+NAME    VERSION DESCRIPTION
+cm-push 0.10.3  Push chart package to ChartMuseum
+```
+
+Run the following command to run Chart museum.
+
+```bash
+# This step is fairly simple, simply run the chartmusem command with appropriate options
+# We are using local storage backend and port 6873 (MUSE) and a directory called `helm/chartmuseum/`
+# The setup is kept simple.
+$ chartmuseum --debug --port 6873 --storage local --storage-local-rootdir $HOME/helm/chartsmuseum/
+```
+
+## Setting up Helm Repositories
+
+### Setting up `local` Helm Repo
+
+We will be building the `helm` charts locally and those charts will be 'push'ed to the local repository. Later during installations charts will be downloaded from this `local` repository. The `chartmuseum` server described above will serve this 'local' repository.
+
+```bash
+$ helm repo add local http://localhost:6873/
+$ helm repo list
+```
+### Setting up Third Party repositories
+
+This installation leverages the chart available from the third-party repositories, instead of maintaining those charts ourselves. This allows us to update third party dependencies easily and we don't need to maintain our own 'charts' just for this alone.
+
+For the installation of the Near RT RIC, we are making use of `influxdb2` (for storing KPI data by `kpimon-go` application). The charts for `influxdb2` are available from the Influxdata repository. Hence this repository needs to be added inside `helm`.
+
+```bash
+$ helm repo add influxdata https://helm.influxdata.com
+$ helm repo list
+```
+
+
+## Running Near RT RIC
+
+### Preparing the Charts
+
+We will first build the charts based on the data from this repository. We use `make` for building the charts. To build the charts, following instructions can be followed.
+
+```bash
+# Make sure that chart museum is running already as discussed above
+#
+# First we will prepare chart(s) for the installation. This is done using Makefile
+# `make` tool needs to be installed for this.
+$ cd helm/charts
+$ make nearrtric
+
+##### Output ignored
+
+$ helm search repo local/nearrtric
+NAME                   CHART VERSION   APP VERSION     DESCRIPTION
+local/nearrtric        0.1.0                           Umbrella Helm Chart for NearRT RAN Intelligent ...
+```
+This means the `local/nearrtric` chart is available and can be installed using `helm install`.
+
+
+### Installing the Charts
+
+Currently, the Near RT RIC contains mandatory components and some optional components. Following are mandatory components -
+
+1. `appmgr`
+2. `dbaas`
+3. `e2mgr`
+4. `e2term`
+5. `submgr`
+6. `rtmgr`
+
+and following are optional components -
+
+1. `a1mediator`
+2. `alarmmanager`
+3. `jaegeradapter`
+4. `o1mediator`
+5. `vespamgr`
+6. `xapp-onboarder`
+
+and following are third party (optional) components -
+
+1. `influxdb2`
+
+The default `values.yaml` file disables all optional components. The optional components can be enabled using the override file inside `helm-overrides/nearrtric/` directory. The provided file enables `influxdb2` and `a1mediator` optional components. In addition, additional configurations like using docker image etc can be changed for all the components. Please refer to the provided example file for the supported configurations.
+
+Run the following command to install the chart.
+
+```bash
+$ helm install nearrtric -n ricplt local/nearrtric -f example_recipe_latest_stable.yaml
+```
+Note: You can refer to `helm-overrides/nearrtric/minimal-nearrt-ric.yaml` file and follow the conventions used in this override file.
+
+This should install the main `nearrtric` chart and it's dependencies. The installation can be verified using the following `kubectl` commands.
+
+```bash
+$ kubectl get pods -n ricplt
+NAME                                              READY   STATUS    RESTARTS        AGE
+deployment-ricplt-a1mediator-84fc865778-x846h     1/1     Running   1 (4m13s ago)   5m16s
+deployment-ricplt-appmgr-57cc4d665b-lb8dg         1/1     Running   0               5m16s
+deployment-ricplt-e2mgr-9748f9585-mg2zl           1/1     Running   3 (4m47s ago)   5m16s
+deployment-ricplt-e2term-alpha-5ffb57bf9f-slmrz   1/1     Running   0               5m16s
+deployment-ricplt-rtmgr-57f7c7797f-mpkg9          1/1     Running   0               5m16s
+deployment-ricplt-submgr-74f67bf444-qh5rn         1/1     Running   0               5m16s
+ricplt-influxdb-0                                 1/1     Running   0               5m16s
+statefulset-ricplt-dbaas-server-0                 1/1     Running   0               5m16s
+
+$ kubectl get svc -n ricplt
+NAME                                     TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)              AGE
+ricplt-influxdb                          ClusterIP   10.105.150.100   <none>        8086/TCP             6m
+service-ricplt-a1mediator-http           ClusterIP   10.101.218.159   <none>        10000/TCP            6m1s
+service-ricplt-a1mediator-rmr            ClusterIP   10.103.242.185   <none>        4561/TCP,4562/TCP    6m1s
+service-ricplt-appmgr-http               ClusterIP   10.111.10.61     <none>        8080/TCP             6m1s
+service-ricplt-appmgr-rmr                ClusterIP   10.105.106.102   <none>        4561/TCP,4560/TCP    6m1s
+service-ricplt-dbaas-tcp                 ClusterIP   None             <none>        6379/TCP             6m1s
+service-ricplt-e2mgr-http                ClusterIP   10.97.133.251    <none>        3800/TCP             6m1s
+service-ricplt-e2mgr-rmr                 ClusterIP   10.108.221.142   <none>        4561/TCP,3801/TCP    6m1s
+service-ricplt-e2term-prometheus-alpha   ClusterIP   10.109.194.105   <none>        8088/TCP             6m1s
+service-ricplt-e2term-rmr-alpha          ClusterIP   10.109.22.225    <none>        4561/TCP,38000/TCP   6m
+service-ricplt-e2term-sctp-alpha         NodePort    10.96.249.236    <none>        36422:32222/SCTP     6m
+service-ricplt-rtmgr-http                ClusterIP   10.96.22.95      <none>        3800/TCP             6m
+service-ricplt-rtmgr-rmr                 ClusterIP   10.99.242.83     <none>        4561/TCP,4560/TCP    6m
+service-ricplt-submgr-http               ClusterIP   10.105.226.85    <none>        8088/TCP             6m
+service-ricplt-submgr-rmr                ClusterIP   10.96.246.248    <none>        4560/TCP,4561/TCP    6m
+```
+
+### Deploying the Simulator
+
+You can test the installed Near RT RIC by installing the simulator from the [sim-e2-interface](https://gerrit.o-ran-sc.org/r/admin/repos/sim/e2-interface,general) repository. If you are installing on Ubuntu 22.04, The image needs to be built using the Ubuntu 22.04 Builder Image. Change the appropriate lines in the `Dockerfile` in the directory `e2sim/e2sm_examples/kpm_e2sm`. The Ubuntu 22.04 Builder image can be used as follows
+
+```bash
+
+ # the builder has: git, wget, cmake, gcc/g++, make, python2/3. v7 dropped nng support
+ #
+-ARG CONTAINER_PULL_REGISTRY=nexus3.o-ran-sc.org:10001
+-FROM ${CONTAINER_PULL_REGISTRY}/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 as buildenv
++ARG CONTAINER_PULL_REGISTRY=nexus3.o-ran-sc.org:10004
++# FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-ubunut22-c-go:0.1.0 as buildenv
++FROM ${CONTAINER_PULL_REGISTRY}/o-ran-sc/bldr-ubuntu22-c-go:0.1.0 as buildenv
+
+```
+
+It is also required to update the IP Address of the `service-ricplt-e2term-sctp-alpha` service above in the `Dockerfile`. (Agreed this is a bit ugly and will be fixed soon!).
+
+```bash
+-CMD kpm_sim 10.110.102.29 36422
++CMD kpm_sim 10.96.249.236 36422
+```
+The Docker Image that needs to be built should be using the 'docker environment' of the `minikube`. This environment can be set by running the following command.
+
+```bash
+```
+
+The simulator then can be started as follows
+
+```bash
+
+# Setup the 'docker env'
+$ eval $(minikube -p minikube docker-env)
+
+# Build docker image
+$ docker build -t e2sim:latest .
+
+# Make sure the `helm/deployments/deployment.yaml` file points to `e2sim:latest` images
+
+$ helm install e2sim -n ricplt helm/
+
+```
+
+### Deploying XApps
+
+You can deploy the XApps. The approach we follow is preparing the chart images for the XApps first and then simply using `helm install`. The Chart images can be prepared by using the Xapp Onboarder. (Note: A future version of deployment would make this available as a single `helm` chart installation, currently this manual step needs to be followed.)
+
+```bash
+$ git clone https://gerrit.o-ran-sc.org/r/ric-plt/appmgr
+$ cd appmgr/xapp_orchestrater/dev/xapp_onboarder
+
+# Create a Virtual Environment to install the `xapp_onboarder`
+$ python3 -m venv venv3
+$ . venv/bin/activate
+$ pip install -r requirements.txt
+
+# Note: The Chart Repo URL points to the `chartmusem` server running started.
+# Also note the `shcema` typo :-)
+$ CHART_REPO_URL=http://localhost:6873 dms_cli onboard --config-file-path <path-to-app-config> --shcema_file_path <path-to-schema-json>
+$ CHART_REPO_URL=http://localhost:6873 dms_cli download_helm_chart <chart-name> <version>
+# This step downloads the file `chart-name-chart-version.tgz`
+
+# Finally install the Chart in `ricxapp` namespace
+$ helm install <release-name> -n ricxapp <chart-name-chart-version.tgz>
+```
+
+You can then check the logs of individual pods using `kubectl logs ...` command to check if the pods, Xapps are running as expected.
diff --git a/new-installer/helm-overrides/nearrtric/minimal-nearrt-ric.yaml b/new-installer/helm-overrides/nearrtric/minimal-nearrt-ric.yaml
new file mode 100644 (file)
index 0000000..04c6085
--- /dev/null
@@ -0,0 +1,214 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2021 HCL Technologies Limited.                               #
+#   Copyright (c) 2022 Samsung Electronics Co., Ltd.                           #
+#   Copyright (c) 2023 Abhijit Gadgil                                          #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+###############################################################################
+
+# Override file for E2 Termination and running "hw-*" Apps
+
+#--------------------------------------------------------------------------
+# Near RT RIC Controls
+#--------------------------------------------------------------------------
+nearrtric:
+  installA1Mediator: true
+  installAlarmManager: false
+  installInfluxDB: true
+  installJaegerAdapter: false
+  installO1Mediator: false
+  installVespamgr: false
+  installXappOnboarder: false
+#-------------------------------------------------------------------------
+# Global common setting
+#-------------------------------------------------------------------------
+global:
+  # If you want to use a local registry for testing, please uncomment the following
+  # This would set `common.dockerregistry.url` values  through common `_docker.tpl`
+  # localregistry: "localhost:8000"
+  releasePrefix: r4
+  serviceport:
+    submgr:
+      http: 8088
+
+# Change the overall image pull policy using the following option
+#  pullpolicy: IfNotPresent
+
+# Change the namespaces using the following options
+#  namespace:
+#    aux: ricaux
+#    platform: ricplt
+#    xapp: ricxapp
+#    infra: ricinfra
+
+# ricip should be the ingress controller listening IP for the platform cluster
+# auxip should be the ingress controller listening IP for the AUX cluster
+extsvcplt:
+  ricip: "10.0.0.1"
+  auxip: "10.0.0.1"
+
+
+# Specify the docker registry credential using the following
+# The release and staging LF repos' credentials have already been included.
+# Please do not create duplicated entries
+#docker-credential:
+#  enabled: true
+#  credential:
+#    SOME_KEY_NAME:
+#      registry: ""
+#      credential:
+#        user: ""
+#        password: ""
+#        email: ""
+
+prometheus:
+  enabled: true
+
+a1mediator:
+  a1mediator:
+    # Enable following registry if you want to override just this one
+    # while using local registry for the other registries
+    #registry: "nexus3.o-ran-sc.org:10004/o-ran-sc"
+    image:
+      registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+      name: ric-plt-a1
+      tag: 3.1.1
+    rmr_timeout_config:
+      a1_rcv_retry_times: 20
+      ins_del_no_resp_ttl: 5
+      ins_del_resp_ttl: 10
+
+appmgr:
+  appmgr:
+    image:
+      appmgr:
+        registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+        name: ric-plt-appmgr
+        tag: 0.5.7
+      chartmuseum:
+        registry: "docker.io"
+        name: chartmuseum/chartmuseum
+        tag: v0.8.2
+
+
+dbaas:
+  dbaas:
+    image:
+      registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+      name: ric-plt-dbaas
+      tag: 0.6.2
+    enableHighAvailability: false
+    # Enable pod anti affinity only if you have more than 3 k8s nodes
+    enablePodAntiAffinity: false
+
+
+e2mgr:
+  e2mgr:
+    image:
+      registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+      name: ric-plt-e2mgr
+      tag: 6.0.1
+    privilegedmode: false
+    globalRicId:
+      ricId: "AACCE"
+      mcc: "310"
+      mnc: "411"
+    rnibWriter:
+      stateChangeMessageChannel: RAN_CONNECTION_STATUS_CHANGE
+      ranManipulationMessageChannel: RAN_MANIPULATION
+
+e2term:
+  loglevel: 4
+  e2term:
+    alpha:
+      image:
+        registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+        name: ric-plt-e2
+        tag: 6.0.3
+      privilegedmode: false
+      hostnetworkmode: false
+      env:
+        print: "1"
+        messagecollectorfile: "/data/outgoing/"
+      dataVolSize: 100Mi
+      storageClassName: local-storage
+      pizpub:
+        enabled: false
+
+
+jaegeradapter:
+  image:
+    registry: "docker.io"
+    name: jaegertracing/all-in-one
+    tag: 1.12
+
+
+rtmgr:
+  rtmgr:
+    image:
+      registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+      name: ric-plt-rtmgr
+      tag: 0.9.4
+
+submgr:
+  submgr:
+    image:
+      registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+      name: ric-plt-submgr
+      tag: 0.9.5
+
+vespamgr:
+  image:
+    registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+    name: ric-plt-vespamgr
+    tag: 0.7.5
+  prometheusurl: "http://r4-infrastructure-prometheus-server.ricplt"
+
+o1mediator:
+  image:
+    registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+    name: ric-plt-o1
+    tag: 0.6.1
+
+
+alarmmanager:
+  image:
+    registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+    name: ric-plt-alarmmanager
+    tag: 0.5.14
+
+influxdb2:
+  image:
+    registry: "influxdb"
+    name: influxdb
+    tag: "2.2.0-alpine"
+  fullnameOverride: "ricplt-influxdb"
+  service:
+    port: 8086
+
+xapp-onboarder:
+  xapponboarder:
+    image:
+      xapponboarder:
+        registry: "nexus3.o-ran-sc.org:10004/o-ran-sc"
+        name: xapp-onboarder
+        tag: 1.0.8
+
+o1mediator:
+  o1mediator:
+    image:
+      name: ric-plt-o1
+      tag: 0.6.2
+      registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+
diff --git a/new-installer/helm/charts/.gitignore b/new-installer/helm/charts/.gitignore
new file mode 100644 (file)
index 0000000..581edad
--- /dev/null
@@ -0,0 +1 @@
+**/dist
diff --git a/new-installer/helm/charts/Makefile b/new-installer/helm/charts/Makefile
new file mode 100644 (file)
index 0000000..105b79c
--- /dev/null
@@ -0,0 +1,120 @@
+# Copyright Â© 2017 Amdocs, Bell Canada
+#
+# Copyright (c) 2023 hypheOs Software Labs
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+COMMON_CHARTS_DIR := nonrtric nearrtric
+# FIXME OOM-765
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+HELM_BIN := helm
+
+# Helm v2 and helm v3 uses different version format so we first try in helm v3 format
+# and if it fails then we fallback to helm v2 one
+HELM_VER := $(shell $(HELM_BIN) version --template "{{.Version}}" 2>/dev/null)
+ifneq "$(findstring v3,$(HELM_VER))" "v3"
+       HELM_VER := $(shell $(HELM_BIN) version -c --template "{{.Client.SemVer}}")
+endif
+
+# use this if you would like to cm-push onap charts to repo with other name
+# WARNING: Helm v3+ only
+# WARNING: Make sure to edit also requirements files
+HELM_REPO := local
+
+ifneq ($(SKIP_LINT),TRUE)
+       HELM_LINT_CMD := $(HELM_BIN) lint
+else
+       HELM_LINT_CMD := echo "Skipping linting of"
+endif
+
+#SUBMODS := robot
+#EXCLUDES := config oneclick readiness test dist helm $(PARENT_CHART) dcae $(SUBMODS)
+EXCLUDES := config oneclick readiness test dist helm $(PARENT_CHART)
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.)))) $(PARENT_CHART)
+HELM_CHARTS_CLEAN := $(sort $(patsubst %,clean-%, $(HELM_CHARTS)))
+
+.PHONY: $(EXCLUDES)  $(HELM_CHARTS) check-for-staging-images helm-repo-update
+
+all: print_helm_bin $(HELM_CHARTS) helm-repo-update
+
+$(HELM_CHARTS): | $(OUTPUT_DIR)
+       @echo "\n[$@]"
+       @make package-$@
+
+$(HELM_CHARTS_CLEAN):
+       @echo "\n[clean $(patsubst clean-%,%,$@)]"
+       @rm -f $(patsubst clean-%,%,$@)/Chart.lock;
+       @rm -rf $(patsubst clean-%,%,$@)/charts;
+
+print_helm_bin:
+       $(info Using Helm binary ${HELM_BIN} which is helm version ${HELM_VER})
+
+make-%:
+       @if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+       @echo $(HELM_DIR) dep up $*
+       @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) dep up $*; fi
+
+lint-%: dep-%
+       @if [ -f $*/Chart.yaml ]; then $(HELM_LINT_CMD) $*; fi
+
+package-%: lint-%
+       @mkdir -p $(PACKAGE_DIR)
+ifeq "$(findstring v3,$(HELM_VER))" "v3"
+       @if [ -f $*/Chart.yaml ]; then PACKAGE_NAME=$$($(HELM_BIN) package -d $(PACKAGE_DIR) $* | cut -d":" -f2) && $(HELM_BIN) cm-push -f $$PACKAGE_NAME $(HELM_REPO); fi
+else
+       @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi
+       @$(HELM_BIN) repo index $(PACKAGE_DIR)
+endif
+
+clean: $(HELM_CHARTS_CLEAN)
+       @rm -f */Chart.lock
+       @find . -type f -name '*.tgz' -delete
+       @rm -rf $(PACKAGE_DIR)/*
+
+distclean: clean
+       @rm -rf $(OUTPUT_DIR)
+
+# publish helm plugins via distrubtion directory
+plugins:
+       @cp -R helm $(PACKAGE_DIR)/
+
+# start up a local helm repo to serve up helm chart packages
+# WARNING: Only helm < v3 supported
+repo:
+       @mkdir -p $(PACKAGE_DIR)
+       @$(HELM_BIN) serve --repo-path $(PACKAGE_DIR) &
+       @sleep 3
+       @$(HELM_BIN) repo index $(PACKAGE_DIR)
+       @$(HELM_BIN) repo add local http://127.0.0.1:8879
+
+# stop local helm repo
+# WARNING: Only helm < v3 supported
+repo-stop:
+       @pkill $(HELM_BIN)
+       @$(HELM_BIN) repo remove local
+
+check-for-staging-images:
+       $(ROOT_DIR)/contrib/tools/check-for-staging-images.sh
+
+helm-repo-update:
+ifeq "$(findstring v3,$(HELM_VER))" "v3"
+       @$(HELM_BIN) repo update
+endif
+
+%:
+       @:
diff --git a/new-installer/helm/charts/nearrtric/Chart.yaml b/new-installer/helm/charts/nearrtric/Chart.yaml
new file mode 100644 (file)
index 0000000..2974bf9
--- /dev/null
@@ -0,0 +1,88 @@
+################################################################################
+#   Copyright (c) 2023 Abhijit Gadgil.
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v2
+name: nearrtric
+version: 0.1.0
+description: Umbrella Helm Chart for NearRT RAN Intelligent Controller from O-RAN SC.
+home: https://wiki.o-ran-sc.org/pages/viewpage.action?pageId=1179659
+sources:
+  - https://gerrit.o-ran-sc.org/r/#/admin/projects/
+kubeVersion: " >= 1.22"
+
+dependencies:
+  # Required components
+  - name: appmgr
+    version: ~0.x
+    repository: "@local"
+
+  - name: dbaas
+    version: ~0.x
+    repository: "@local"
+
+  - name: e2mgr
+    version: ~0.x
+    repository: "@local"
+
+  - name: e2term
+    version: ~0.x
+    repository: "@local"
+
+  - name: submgr
+    version: ~0.x
+    repository: "@local"
+
+  - name: rtmgr
+    version: ~0.x
+    repository: "@local"
+
+  # Optional Components.
+  - name: a1mediator
+    version: ~0.x
+    repository: "@local"
+    condition: nearrtric.installA1Mediator
+
+  - name: alarmmanager
+    version: ~0.x
+    repository: "@local"
+    condition: nearrtric.installAlarmManager
+
+  # TODO: Maybe a third party component?
+  - name: jaegeradapter
+    version: ~0.x
+    repository: "@local"
+    condition: nearrtric.installJaegerAdapter
+
+  - name: o1mediator
+    version: ~0.x
+    repository: "@local"
+    condition: nearrtric.installO1Mediator
+
+  - name: vespamgr
+    version: ~0.x
+    repository: "@local"
+    condition: nearrtric.installVespamgr
+
+  - name: xapp-onboarder
+    version: ~0.x
+    repository: "@local"
+    condition: nearrtric.installXappOnboarder
+
+  # Third Party Components
+  - name: influxdb2
+    version: ~2.1.0
+    repository: "@influxdata"
+    condition: nearrtric.installInfluxDB
diff --git a/new-installer/helm/charts/nearrtric/Makefile b/new-installer/helm/charts/nearrtric/Makefile
new file mode 100644 (file)
index 0000000..a4e02a1
--- /dev/null
@@ -0,0 +1,101 @@
+# Copyright Â© 2017 Amdocs, Bell Canada
+#
+# Copyright (c) 2023 Abhijit Gadgil
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+PARENT_CHART := nearrtric
+COMMON_CHARTS = nearrt-ric-common
+# FIXME OOM-765
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+HELM_BIN := helm
+
+# Helm v2 and helm v3 uses different version format so we first try in helm v3 format
+# and if it fails then we fallback to helm v2 one
+HELM_VER := $(shell $(HELM_BIN) version --template "{{.Version}}" 2>/dev/null)
+ifneq "$(findstring v3,$(HELM_VER))" "v3"
+       HELM_VER := $(shell $(HELM_BIN) version -c --template "{{.Client.SemVer}}")
+endif
+
+# use this if you would like to cm-push onap charts to repo with other name
+# WARNING: Helm v3+ only
+# WARNING: Make sure to edit also requirements files
+HELM_REPO := local
+
+ifneq ($(SKIP_LINT),TRUE)
+       HELM_LINT_CMD := $(HELM_BIN) lint
+else
+       HELM_LINT_CMD := echo "Skipping linting of"
+endif
+
+#SUBMODS := robot
+#EXCLUDES := config oneclick readiness test dist helm $(PARENT_CHART) dcae $(SUBMODS)
+EXCLUDES := config test dist helm $(COMMON_CHARTS) $(PARENT_CHART)
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.)))) $(PARENT_CHART)
+HELM_CHARTS_CLEAN := $(sort $(patsubst %,clean-%, $(HELM_CHARTS)))
+
+.PHONY: $(COMMON_CHARTS) $(HELM_CHARTS) helm-repo-update
+
+all: print_helm_bin $(COMMON_CHARTS) helm-repo-update $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+       @echo "\n[$@]"
+       @make package-$@
+
+$(COMMON_CHARTS):
+       @echo "\n[$@]"
+       @make package-$@
+
+$(HELM_CHARTS_CLEAN):
+       @echo "\n[clean $(patsubst clean-%,%,$@)]"
+       @rm -f $(patsubst clean-%,%,$@)/Chart.lock;
+       @rm -rf $(patsubst clean-%,%,$@)/charts;
+
+print_helm_bin:
+       $(info Using Helm binary ${HELM_BIN} which is helm version ${HELM_VER})
+
+make-%:
+       @if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+       @echo $(HELM_BIN) dep up --skip-refresh $*
+       @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) dep up --skip-refresh $*; fi
+
+lint-%: dep-%
+       @if [ -f $*/Chart.yaml ]; then $(HELM_LINT_CMD) $*; fi
+
+package-%: lint-%
+       @mkdir -p $(PACKAGE_DIR)
+ifeq "$(findstring v3,$(HELM_VER))" "v3"
+       @if [ -f $*/Chart.yaml ]; then PACKAGE_NAME=$$($(HELM_BIN) package -d $(PACKAGE_DIR) $* | cut -d":" -f2) && $(HELM_BIN) cm-push -f $$PACKAGE_NAME $(HELM_REPO); fi
+else
+       @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi
+       @$(HELM_BIN) repo index $(PACKAGE_DIR)
+endif
+
+clean: $(HELM_CHARTS_CLEAN)
+       @rm -f */Chart.lock
+       @find . -type f -name '*.tgz' -delete
+       @rm -rf $(PACKAGE_DIR)/*
+
+distclean: clean
+       @rm -rf $(OUTPUT_DIR)
+
+helm-repo-update:
+       @$(HELM_BIN) repo update
+
+%:
+       @:
diff --git a/new-installer/helm/charts/nearrtric/README.md b/new-installer/helm/charts/nearrtric/README.md
new file mode 100644 (file)
index 0000000..8c051e4
--- /dev/null
@@ -0,0 +1,28 @@
+# Introduction
+
+This directory contains the charts required to deploy the Near RT RIC platform. Near RT RIC platform can be deployed using a single chart called `nearrtric`. All the platform components are dependencies of this chart. The goal of this project is it should be possible to easily deploy the platform during development and/or testing as the current procedure is a bit involved. The goal is to avoid manual steps as much as possible and keep things simple to a few commands and/or charts.
+
+Also, the goal of this is to make sure that the platform can be deployed with latest `k8s` and it's many desktop flavors like `minikube`, `microk8s` etc. Initial focus is on making sure that things work on `minikube`. The Goal is also to make sure that the charts can be deployed on latest version of Ubuntu, but in general it should be possible to work with any of the latest distribution.
+
+It is planned that this will be actively maintained.
+
+# Getting Started
+
+Each of the individual component is a helm chart. Individual components can be enabled during deployment through the values like following. This allows us to select a subset of components that are of interest. For example, to simply test an App SDK and an App that consumes messages from E2 node(s). We might want to skip the entire Policy/VES set of components.
+
+
+## Chart Museum
+
+In the current deployment we are also deploying chart museum along with the platform. While this may be useful for preparing charts for the XApps etc. the way it is deployed is quite confusing and it's role is not quite clear during deployment. This approach keeps the chart museum totally separate. This has been found very useful.
+
+## Third Party components
+
+Often we are using third party components for certain functionality. For example we are using `influxdb2` for saving KPI-Mon data in the time series database. We will be using the official charts of the third party dependencies. Also, the latest versions of those charts will be used (as appropriate).
+
+## Minikube
+
+This section describes steps for getting started with `minikube`. While the steps below should work with different `minikube` drivers, for exposing a set of services from the platform through ingress controllers, the current discussion only discusses the `minikube` with `docker` driver. It should be possible to work with other drivers, but at the moment is not actively supported, so your mileage may vary.
+
+## Local Development
+
+Often the developers would want to test their code in the environment in which it would be deployed. It is possible to build all the docker images required to use in the platform locally, following instructions can be followed. This takes example of the `e2` repository, similar approach can be followed for other platform components and/or Xapp development.
diff --git a/new-installer/helm/charts/nearrtric/a1mediator/.gitignore b/new-installer/helm/charts/nearrtric/a1mediator/.gitignore
new file mode 100644 (file)
index 0000000..d8651e0
--- /dev/null
@@ -0,0 +1 @@
+NOTES.txt
diff --git a/new-installer/helm/charts/nearrtric/a1mediator/.helmignore b/new-installer/helm/charts/nearrtric/a1mediator/.helmignore
new file mode 100644 (file)
index 0000000..50af031
--- /dev/null
@@ -0,0 +1,22 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/new-installer/helm/charts/nearrtric/a1mediator/Chart.yaml b/new-installer/helm/charts/nearrtric/a1mediator/Chart.yaml
new file mode 100644 (file)
index 0000000..c15e627
--- /dev/null
@@ -0,0 +1,30 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#   Copyright (c) 2023 Abhijit Gadgil.
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v2
+description: Helm Chart for the A1 mediator in the NearRT RIC.
+name: a1mediator
+sources:
+  - https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/a1,general
+version: 0.1.0
+kubeVersion: ">= 1.22 "
+
+dependencies:
+  - name: nearrt-ric-common
+    version: ~0.x
+    repository: "@local"
diff --git a/new-installer/helm/charts/nearrtric/a1mediator/templates/config.yaml b/new-installer/helm/charts/nearrtric/a1mediator/templates/config.yaml
new file mode 100644 (file)
index 0000000..3dc51af
--- /dev/null
@@ -0,0 +1,36 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.a1mediator" . }}-a1conf
+data:
+  local.rt: |
+    newrt|start
+    # Warning! this is not a functioning table because the subscription manager and route manager are now involved in a1 flows
+    # the real routing table requires subscription ids as routing is now done over sub ids, but this isn't known until xapp deploy time, it's a dynamic process triggered by the xapp manager
+    # there is a single message type for all messages a1 sends out now, subid is the other necessary piece of info
+    # there are two message types a1 listens for; 20011 (instance response) and 20012 (query)
+    # xapps likely use rts to reply with 20012 so the routing entry isn't needed for that in most cases
+    mse|20010|SUBID|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563
+    rte|20011|{{ include "common.servicename.a1mediator.rmr" . }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.a1mediator.rmr.data" . }}
+    rte|20012|{{ include "common.servicename.a1mediator.rmr" . }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.a1mediator.rmr.data" . }}
+    newrt|end
+  loglevel.txt: |
+    log-level: {{ .Values.loglevel }}
diff --git a/new-installer/helm/charts/nearrtric/a1mediator/templates/deployment.yaml b/new-installer/helm/charts/nearrtric/a1mediator/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..a4023e7
--- /dev/null
@@ -0,0 +1,83 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- $imagectx := dict "ctx" . "defaultregistry" .Values.a1mediator.image.registry }}
+{{- $pullpolicyctx := dict "ctx" . "defaultpullpolicy" .Values.a1mediator.imagePullPolicy }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "common.deploymentname.a1mediator" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.a1mediator.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      {{- if .Values.a1mediator.annotations }}
+      annotations:
+        {{- .Values.a1mediator.annotations | nindent 8 -}}
+      {{ end }}
+      labels:
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.a1mediator" . }}
+      imagePullSecrets:
+        - name: {{ include "common.dockerregistry.credential" $imagectx }}
+      containers:
+        - name: {{ include "common.containername.a1mediator" . }}
+          volumeMounts:
+          - name: a1conf
+            mountPath: /opt/route
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.a1mediator" . }}-env
+            - configMapRef:
+                name: {{ include "common.configmapname.dbaas" . }}-appconfig
+          image: {{ include "common.dockerregistry.url" $imagectx }}/{{ .Values.a1mediator.image.name }}:{{ .Values.a1mediator.image.tag }}
+          imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
+          ports:
+            - name: http
+              containerPort: {{ include "common.serviceport.a1mediator.http" . }}
+              protocol: TCP
+            - name: rmrroute
+              containerPort: {{ include "common.serviceport.a1mediator.rmr.route" . }}
+              protocol: TCP
+            - name: rmrdata
+              containerPort: {{ include "common.serviceport.a1mediator.rmr.data" . }}
+              protocol: TCP
+          livenessProbe:
+            httpGet:
+              path: /a1-p/healthcheck
+              port: http
+          readinessProbe:
+            httpGet:
+              path: /a1-p/healthcheck
+              port: http
+      volumes:
+        - name: "a1conf"
+          configMap:
+            name:  {{ include "common.configmapname.a1mediator" . }}-a1conf
diff --git a/new-installer/helm/charts/nearrtric/a1mediator/templates/env.yaml b/new-installer/helm/charts/nearrtric/a1mediator/templates/env.yaml
new file mode 100644 (file)
index 0000000..b2e3216
--- /dev/null
@@ -0,0 +1,30 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.a1mediator" . }}-env
+data:
+  RMR_RTG_SVC: {{ include "common.serviceport.a1mediator.rmr.route" . | quote }}
+  PYTHONUNBUFFERED: "1"
+  A1_RMR_RETRY_TIMES: "{{ .Values.a1mediator.rmr_timeout_config.a1_rcv_retry_times }}"
+  # this sets the source field in messages from a1 to point back to a1s service name, rather than it's random pod name
+  # In my private testing, this is needed! however it wasn't here in it/dep. If routing doesn't work, possibly add this back.
+  RMR_SRC_ID: {{ include "common.servicename.a1mediator.rmr" . }}.{{ include "common.namespace.platform" . }}
+  INSTANCE_DELETE_NO_RESP_TTL: "{{ .Values.a1mediator.rmr_timeout_config.ins_del_no_resp_ttl }}"
+  INSTANCE_DELETE_RESP_TTL: "{{ .Values.a1mediator.rmr_timeout_config.ins_del_resp_ttl }}"
+  CONFIG_MAP_NAME: "/opt/route/loglevel.txt"
diff --git a/new-installer/helm/charts/nearrtric/a1mediator/templates/ingress-a1mediator.yaml b/new-installer/helm/charts/nearrtric/a1mediator/templates/ingress-a1mediator.yaml
new file mode 100644 (file)
index 0000000..9ea794d
--- /dev/null
@@ -0,0 +1,15 @@
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: {{ include "common.ingressname.a1mediator" . }}
+spec:
+  rules:
+  - http:
+      paths:
+      - path: {{ include "common.kongpath.ric.a1mediator" . }}
+        pathType: Prefix
+        backend:
+          service:
+            name: {{ include "common.servicename.a1mediator.http" . }}
+            port:
+              number: {{ include "common.serviceport.a1mediator.http" . }}
diff --git a/new-installer/helm/charts/nearrtric/a1mediator/templates/service-http.yaml b/new-installer/helm/charts/nearrtric/a1mediator/templates/service-http.yaml
new file mode 100644 (file)
index 0000000..1aeab75
--- /dev/null
@@ -0,0 +1,38 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.a1mediator.http" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.a1mediator.http" . }}
+      protocol: "TCP"
+      name: "http"
+      targetPort: "http"
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
+    release: {{ .Release.Name }}
+
diff --git a/new-installer/helm/charts/nearrtric/a1mediator/templates/service-rmr.yaml b/new-installer/helm/charts/nearrtric/a1mediator/templates/service-rmr.yaml
new file mode 100644 (file)
index 0000000..c8f19f0
--- /dev/null
@@ -0,0 +1,41 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.a1mediator.rmr" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.a1mediator.rmr.route" . }}
+      protocol: "TCP"
+      name: "rmrroute"
+      targetPort: "rmrroute"
+    - port: {{ include "common.serviceport.a1mediator.rmr.data" . }}
+      protocol: "TCP"
+      name: "rmrdata"
+      targetPort: "rmrdata"
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
+    release: {{ .Release.Name }}
diff --git a/new-installer/helm/charts/nearrtric/a1mediator/values.yaml b/new-installer/helm/charts/nearrtric/a1mediator/values.yaml
new file mode 100644 (file)
index 0000000..841bfb2
--- /dev/null
@@ -0,0 +1,41 @@
+################################################################################
+#   Copyright (c) 2019-2020 AT&T Intellectual Property.                        #
+#   Copyright (c) 2019-2020 Nokia.                                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+
+a1mediator:
+  replicaCount: 1
+  imagePullPolicy: IfNotPresent
+  image:
+    name: ric-plt-a1
+    tag: 2.5.0
+    registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+
+  # Service ports are now defined in
+  # ric-common/Common-Template/helm/ric-common/templates/_ports.tpl file.
+  # If need to change a service port, make the code change necessary, then
+  # update the _ports.tpl file with the new port number.
+
+# these are ENV variables that A1 takes; see docs
+  rmr_timeout_config:
+    a1_rcv_retry_times: 20
+    ins_del_no_resp_ttl: 5
+    ins_del_resp_ttl: 10
+  loglevel: "INFO"
diff --git a/new-installer/helm/charts/nearrtric/alarmmanager/.helmignore b/new-installer/helm/charts/nearrtric/alarmmanager/.helmignore
new file mode 100644 (file)
index 0000000..50af031
--- /dev/null
@@ -0,0 +1,22 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/new-installer/helm/charts/nearrtric/alarmmanager/Chart.yaml b/new-installer/helm/charts/nearrtric/alarmmanager/Chart.yaml
new file mode 100644 (file)
index 0000000..1ea883e
--- /dev/null
@@ -0,0 +1,30 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#   Copyright (c) Abhijit Gadgil.
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v2
+description: Helm chart for Alarm Manager for NearRT RIC.
+name: alarmmanager
+version: 0.1.0
+sources:
+  - https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/alarm-go,general
+kubeVersion: ">= 1.22"
+
+dependencies:
+  - name: nearrt-ric-common
+    version: ~0.x
+    repository: "@local"
diff --git a/new-installer/helm/charts/nearrtric/alarmmanager/templates/appconfig.yaml b/new-installer/helm/charts/nearrtric/alarmmanager/templates/appconfig.yaml
new file mode 100644 (file)
index 0000000..5f9af24
--- /dev/null
@@ -0,0 +1,36 @@
+################################################################################
+#   Copyright (c) 2020 AT&T Intellectual Property.                             #
+#   Copyright (c) 2020 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{ $platformNameSpace := include "common.namespace.platform" . }}
+{{ $xAppNameSpace := include "common.namespace.xapp" . }}
+{{ $nameSpaceList := list $platformNameSpace $xAppNameSpace }}
+{{- range $nameSpaceList }}
+{{- $namespace := . }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+{{- if eq $namespace $platformNameSpace }}
+  name: {{ include "common.configmapname.alarmmanager" $ }}-appconfig
+{{- else }}
+  name: alarm-appconfig
+{{- end }}
+  namespace: {{ $namespace }}
+data:
+  ALARM_MGR_SERVICE_NAME: {{ include "common.servicename.alarmmanager.rmr" $ }}.{{ $platformNameSpace }}
+  ALARM_MGR_SERVICE_PORT: {{ include "common.serviceport.alarmmanager.rmr.data" $ | quote }}
+
+{{- end }}
diff --git a/new-installer/helm/charts/nearrtric/alarmmanager/templates/configmap.yaml b/new-installer/helm/charts/nearrtric/alarmmanager/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..b01e24b
--- /dev/null
@@ -0,0 +1,50 @@
+#==================================================================================
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#==================================================================================
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.alarmmanager" . }}-alarmmanagercfg
+  namespace: {{ include "common.namespace.platform" . }}
+data:
+  alarmmanagercfg: |-
+    {  
+      "local": {
+        "host": ":8080"
+      },
+      "logger": {
+        "level": 4
+      },
+      "db": {
+        "namespaces": ["sdl", "rnib"]
+      },
+      "rmr": {
+        "protPort": "tcp:4560",
+        "maxSize": 1024,
+        "numWorkers": 1
+      },
+      "controls": {
+        "promAlertManager": {
+          "address": "cpro-alertmanager:80",
+          "baseUrl": "api/v2",
+          "schemes": "http",
+          "alertInterval": 30000
+        },
+        "maxActiveAlarms": 5000,
+        "maxAlarmHistory": 20000,
+        "alarmInfoPvFile": "/mnt/pv-ricplt-alarmmanager/alarminfo.json"
+      }
+    }
diff --git a/new-installer/helm/charts/nearrtric/alarmmanager/templates/deployment.yaml b/new-installer/helm/charts/nearrtric/alarmmanager/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..08b041e
--- /dev/null
@@ -0,0 +1,90 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $topCtx :=  . }}
+{{- $imagectx := dict "ctx" . "defaultregistry" .Values.alarmmanager.image.registry }}
+{{- $pullpolicyctx := dict "ctx" . "defaultpullpolicy" .Values.alarmmanager.imagePullPolicy }}
+{{- $imagetag := .Values.alarmmanager.image.tag }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "common.deploymentname.alarmmanager" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.alarmmanager" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.alarmmanager.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.alarmmanager" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      {{- if .Values.alarmmanager.annotations }}
+      annotations:
+        {{- .Values.alarmmanager.annotations | nindent 8 -}}
+      {{ end }}
+      labels:
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.alarmmanager" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.alarmmanager" . }}
+      imagePullSecrets:
+        - name: {{ include "common.dockerregistry.credential" $imagectx }}
+      serviceAccountName: {{ include "common.serviceaccountname.alarmmanager" . }}
+      containers:
+        - name: {{ include "common.containername.alarmmanager" . }}
+          image: {{ include "common.dockerregistry.url" $imagectx }}/{{ .Values.alarmmanager.image.name }}:{{ $imagetag }}
+          imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
+          env:
+            - name: PLT_NAMESPACE
+              value: {{ include "common.namespace.platform" . }}
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.dbaas" . }}-appconfig      
+            - configMapRef:
+                name: {{ include "common.configmapname.alarmmanager" . }}-env
+          ports:
+            - name: rmrroute
+              containerPort: {{ include "common.serviceport.alarmmanager.rmr.route" . }}
+              protocol: TCP
+            - name: rmrdata
+              containerPort: {{ include "common.serviceport.alarmmanager.rmr.data" . }}
+              protocol: TCP
+            - name: http
+              containerPort: {{ include "common.serviceport.alarmmanager.http" . }}
+              protocol: TCP
+          volumeMounts:
+            - name: config-volume
+              mountPath: /cfg
+            - name: am-persistent-storage
+              mountPath: /mnt/pv-ricplt-alarmmanager
+      volumes:
+        - name: config-volume
+          configMap:
+            name: {{ include "common.configmapname.alarmmanager" . }}-alarmmanagercfg
+            #name: alarmmanagercfg
+            items:
+              - key: alarmmanagercfg
+                path: config-file.json
+                mode: 0644
+        - name: am-persistent-storage
+          persistentVolumeClaim:
+            claimName: {{ include "common.pvcname.alarmmanager" $topCtx }}
diff --git a/new-installer/helm/charts/nearrtric/alarmmanager/templates/env.yaml b/new-installer/helm/charts/nearrtric/alarmmanager/templates/env.yaml
new file mode 100644 (file)
index 0000000..e7649cd
--- /dev/null
@@ -0,0 +1,25 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.alarmmanager" . }}-env
+  namespace: {{ include "common.namespace.platform" . }}
+data:
+  RMR_RTG_SVC: {{ include "common.servicename.rtmgr.rmr" . }}:{{ include "common.serviceport.rtmgr.rmr.route" . }}
+  RMR_SEED_RT: "/cfg/uta_rtg.rt"
+  RMR_SRC_ID: {{ include "common.servicename.alarmmanager.rmr" . }}.{{ include "common.namespace.platform" . }}
diff --git a/new-installer/helm/charts/nearrtric/alarmmanager/templates/pv.yaml b/new-installer/helm/charts/nearrtric/alarmmanager/templates/pv.yaml
new file mode 100644 (file)
index 0000000..bb780f1
--- /dev/null
@@ -0,0 +1,34 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################1
+{{- $topCtx :=  . }}
+{{if eq .Values.alarmmanager.storageClassName "local-storage" }}
+---
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+  name: {{ include "common.pvname.alarmmanager" $topCtx }}
+  namespace: {{ include "common.namespace.platform" $topCtx }}
+  labels:
+    type: local
+spec:
+  storageClassName: {{ .Values.alarmmanager.storageClassName }}
+  capacity:
+    storage: {{ .Values.alarmmanager.dataVolSize }}
+  accessModes:
+    - ReadWriteOnce
+  hostPath:
+    path: /mnt/{{ include "common.pvname.alarmmanager" $topCtx }}
+{{ end }}
diff --git a/new-installer/helm/charts/nearrtric/alarmmanager/templates/pvc.yaml b/new-installer/helm/charts/nearrtric/alarmmanager/templates/pvc.yaml
new file mode 100644 (file)
index 0000000..0efe288
--- /dev/null
@@ -0,0 +1,29 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $topCtx :=  . }}
+---
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+  name: {{ include "common.pvcname.alarmmanager" $topCtx }}
+  namespace: {{ include "common.namespace.platform" $topCtx }}
+spec:
+  accessModes:
+    - ReadWriteOnce
+  resources:
+    requests:
+      storage: {{ .Values.alarmmanager.dataVolSize }}
+  storageClassName: {{ .Values.alarmmanager.storageClassName }}
diff --git a/new-installer/helm/charts/nearrtric/alarmmanager/templates/service-http.yaml b/new-installer/helm/charts/nearrtric/alarmmanager/templates/service-http.yaml
new file mode 100644 (file)
index 0000000..e5abac6
--- /dev/null
@@ -0,0 +1,38 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.alarmmanager.http" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.alarmmanager" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:    
+    - port: {{ include "common.serviceport.alarmmanager.http" . }}
+      protocol: "TCP"
+      name: http
+      targetPort: {{ include "common.serviceport.alarmmanager.http" . }}
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.alarmmanager" . }}
+    release: {{ .Release.Name }}
+
diff --git a/new-installer/helm/charts/nearrtric/alarmmanager/templates/service-rmr.yaml b/new-installer/helm/charts/nearrtric/alarmmanager/templates/service-rmr.yaml
new file mode 100644 (file)
index 0000000..7fb3fd0
--- /dev/null
@@ -0,0 +1,49 @@
+#
+#==================================================================================
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#   Copyright (c) 2019 Nokia
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#==================================================================================
+#
+#
+#   Abstract: Subscription Manager service manifest 
+#   Date:              28 May 2019
+#
+kind: Service
+apiVersion: v1
+metadata:
+  name: {{ include "common.servicename.alarmmanager.rmr" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.alarmmanager" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.alarmmanager" . }}
+    release: {{ .Release.Name }}       
+  type: ClusterIP
+  ports:
+    - name: rmrdata
+      port: {{ include "common.serviceport.alarmmanager.rmr.data" . }}
+      protocol: TCP
+      targetPort: rmrdata
+    - name: rmrroute
+      port: {{ include "common.serviceport.alarmmanager.rmr.route" . }}
+      protocol: TCP
+      targetPort: rmrroute
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.alarmmanager" . }}
+    release: {{ .Release.Name }}
diff --git a/new-installer/helm/charts/nearrtric/alarmmanager/templates/serviceaccount.yaml b/new-installer/helm/charts/nearrtric/alarmmanager/templates/serviceaccount.yaml
new file mode 100644 (file)
index 0000000..58dbf85
--- /dev/null
@@ -0,0 +1,46 @@
+################################################################################
+#   Copyright (c) 2019-2020 AT&T Intellectual Property.                        #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ include "common.serviceaccountname.alarmmanager" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: Role
+metadata:
+  name: {{ include "common.serviceaccountname.alarmmanager" . }}-{{ include "common.namespace.xapp" . }}-podreader
+  namespace: {{ include "common.namespace.xapp" . }}
+rules:
+- apiGroups: [""]
+  resources: ["pods"]
+  verbs: ["get", "list", "watch"]
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+  name: {{ include "common.serviceaccountname.alarmmanager" . }}-{{ include "common.namespace.xapp" . }}-podreader
+  namespace: {{ include "common.namespace.xapp" . }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: Role
+  name: {{ include "common.serviceaccountname.alarmmanager" . }}-{{ include "common.namespace.xapp" . }}-podreader
+subjects:
+  - kind: ServiceAccount
+    name: {{ include "common.serviceaccountname.alarmmanager" . }}
+    namespace: {{ include "common.namespace.platform" . }}
+
diff --git a/new-installer/helm/charts/nearrtric/alarmmanager/values.yaml b/new-installer/helm/charts/nearrtric/alarmmanager/values.yaml
new file mode 100644 (file)
index 0000000..a3559eb
--- /dev/null
@@ -0,0 +1,30 @@
+################################################################################
+#   Copyright (c) 2019-2020 AT&T Intellectual Property.                        #
+#   Copyright (c) 2019-2020 Nokia.                                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+alarmmanager:
+  replicaCount: 1
+  imagePullPolicy: IfNotPresent
+  image:
+    name: ric-plt-alarmmanager
+    tag: 0.5.9
+    registry: "nexus3.o-ran-sc.org:10002/o-ran-sc" #"ranco-dev-tools.eastus.cloudapp.azure.com:10001"
+  dataVolSize: 100Mi
+  storageClassName: local-storage
+
+  # Service ports are now defined in
+  # ric-common/Common-Template/helm/ric-common/templates/_ports.tpl file.
+  # If need to change a service port, make the code change necessary, then
+  # update the _ports.tpl file with the new port number.
diff --git a/new-installer/helm/charts/nearrtric/appmgr/.helmignore b/new-installer/helm/charts/nearrtric/appmgr/.helmignore
new file mode 100644 (file)
index 0000000..50af031
--- /dev/null
@@ -0,0 +1,22 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/new-installer/helm/charts/nearrtric/appmgr/Chart.yaml b/new-installer/helm/charts/nearrtric/appmgr/Chart.yaml
new file mode 100644 (file)
index 0000000..f2f2cda
--- /dev/null
@@ -0,0 +1,30 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#   Copyright (c) 2023 Abhijit Gadgil.
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v2
+description: Helm Chart for xAppManager for the Near RT RIC Platform.
+name: appmgr
+sources:
+  - https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/appmgr,general
+version: 0.1.0
+kubeVersion: ">= 1.22"
+
+dependencies:
+  - name: nearrt-ric-common
+    version: ~0.x
+    repository: "@local"
diff --git a/new-installer/helm/charts/nearrtric/appmgr/bin/_appmgr-tiller-secret-copier.sh.tpl b/new-installer/helm/charts/nearrtric/appmgr/bin/_appmgr-tiller-secret-copier.sh.tpl
new file mode 100644 (file)
index 0000000..2da5af6
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+###########################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#   Copyright (c) 2019 Nokia.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+##########################################################################
+
+if [ -x /svcacct-to-kubeconfig.sh ] ; then
+ /svcacct-to-kubeconfig.sh
+fi
+
+if [ ! -z "${HELM_TLS_CA_CERT}" ]; then
+  kubectl -n ${SECRET_NAMESPACE} get secret -o yaml ${SECRET_NAME} | \
+   grep 'ca.crt:' | \
+   awk '{print $2}' | \
+   base64 -d > ${HELM_TLS_CA_CERT}
+fi
+
+if [ ! -z "${HELM_TLS_CERT}" ]; then
+  kubectl -n ${SECRET_NAMESPACE} get secret -o yaml ${SECRET_NAME} | \
+   grep 'tls.crt:' | \
+   awk '{print $2}' | \
+   base64 -d > ${HELM_TLS_CERT}
+fi
+
+if [ ! -z "${HELM_TLS_KEY}" ]; then
+  kubectl -n ${SECRET_NAMESPACE} get secret -o yaml ${SECRET_NAME} | \
+   grep 'tls.key:' | \
+   awk '{print $2}' | \
+   base64 -d > ${HELM_TLS_KEY}
+fi
diff --git a/new-installer/helm/charts/nearrtric/appmgr/bin/_svcacct-to-kubeconfig.sh.tpl b/new-installer/helm/charts/nearrtric/appmgr/bin/_svcacct-to-kubeconfig.sh.tpl
new file mode 100755 (executable)
index 0000000..07e670e
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh
+###########################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#   Copyright (c) 2019 Nokia.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+##########################################################################
+
+# generate a kubconfig (at ${KUBECONFIG} file from the automatically-mounted
+# service account token.
+# ENVIRONMENT:
+# SVCACCT_NAME: the name of the service account user.  default "default"
+# CLUSTER_NAME: the name of the kubernetes cluster.  default "kubernetes"
+# KUBECONFIG: where the generated file will be deposited.
+SVCACCT_TOKEN=`cat /var/run/secrets/kubernetes.io/serviceaccount/token`
+CLUSTER_CA=`base64 /var/run/secrets/kubernetes.io/serviceaccount/ca.crt|tr -d '\n'`
+
+cat >${KUBECONFIG} <<__EOF__
+ApiVersion: v1
+kind: Config
+users:
+- name: ${SVCACCT_NAME:-default}
+  user:
+    token: ${SVCACCT_TOKEN}
+clusters:
+- cluster:
+    certificate-authority-data: ${CLUSTER_CA}
+    server: ${K8S_API_HOST:-https://kubernetes.default.svc.cluster.local/}
+  name: ${CLUSTER_NAME:-kubernetes}
+contexts:
+- context:
+    cluster: ${CLUSTER_NAME:-kubernetes}
+    user: ${SVCACCT_NAME:-default}
+  name: svcs-acct-context
+current-context: svcs-acct-context
+__EOF__
diff --git a/new-installer/helm/charts/nearrtric/appmgr/resources/appmgr.yaml b/new-installer/helm/charts/nearrtric/appmgr/resources/appmgr.yaml
new file mode 100644 (file)
index 0000000..25aca90
--- /dev/null
@@ -0,0 +1,26 @@
+"local":
+  # Port on which the xapp-manager REST services are provided
+  "host": __REST_PORT__
+"helm":
+  # Remote helm repo URL. UPDATE this as required.
+  "repo": __HELM_REPO__
+
+  # Repo name referred within the xapp-manager
+  "repo-name": __REPO_NAME__
+
+  # Tiller service details in the cluster. UPDATE this as required.
+  "tiller-service": __TILLER_SERVICE__
+  "tiller-namespace": __TILLER_NAMESPACE__
+  "tiller-port": __TILLER_PORT__
+  # helm username and password files
+  "helm-username-file": "/opt/ric/secret/helm_repo_username"
+  "helm-password-file": "/opt/ric/secret/helm_repo_password"
+  "retry": 1
+"xapp":
+  #Namespace to install xAPPs
+  "namespace": __XAPP_NAMESPACE__
+  "tarDir": "/tmp"
+  "schema": "descriptors/schema.json"
+  "config": "config/config-file.json"
+  "tmpConfig": "/tmp/config-file.json"
+loglevel: 4
diff --git a/new-installer/helm/charts/nearrtric/appmgr/templates/appconfig.yaml b/new-installer/helm/charts/nearrtric/appmgr/templates/appconfig.yaml
new file mode 100644 (file)
index 0000000..2cbc0a1
--- /dev/null
@@ -0,0 +1,33 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $tillerKey := .Values.appmgr.tillerkey | default "ricxapp" }}
+{{- $topCtx :=  . }}
+{{- $ctx := dict "ctx" $topCtx "key" $tillerKey }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.appmgr" . }}-appconfig
+data:
+    {{- $restport := (printf ":%s" (include "common.serviceport.appmgr.http" .) ) | quote -}}
+    {{- $defaulthelmrepo := (printf "http://%s:%s" (include "common.servicename.xapp-onboarder.server" .) (include "common.serviceport.xapp-onboarder.chartmuseum" .) ) | quote -}}
+    {{- $helmrepo := default $defaulthelmrepo .Values.appmgr.repoUrl | quote -}}
+    {{- $reponame := default "helm-repo" .Values.appmgr.reponame | quote -}}
+    {{- $tillerdeploynamespace := include "common.tillerDeployNameSpace" $ctx -}}
+    {{- $tillerservice := include "common.servicename.tiller" $ctx -}}
+    {{- $tillerport := include "common.tillerPort" $ctx | quote -}}
+    {{- $xappnamespace := include "common.namespace.xapp" . | quote -}}
+    {{- (.Files.Glob "resources/appmgr.yaml").AsConfig | replace "__XAPP_NAMESPACE__" $xappnamespace | replace "__HELM_REPO__" $helmrepo | replace "__REST_PORT__" $restport | replace "__REPO_NAME__" $reponame | replace "__TILLER_SERVICE__" $tillerservice | replace "__TILLER_NAMESPACE__" $tillerdeploynamespace | replace "__TILLER_PORT__" $tillerport | nindent 2 }}
diff --git a/new-installer/helm/charts/nearrtric/appmgr/templates/bin/_appmgr-tiller-secret-copier.sh.tpl b/new-installer/helm/charts/nearrtric/appmgr/templates/bin/_appmgr-tiller-secret-copier.sh.tpl
new file mode 100644 (file)
index 0000000..4b17cfb
--- /dev/null
@@ -0,0 +1,41 @@
+{{/*
+   Copyright (c) 2019 AT&T Intellectual Property.
+   Copyright (c) 2019 Nokia.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+*/}}
+#!/bin/sh
+if [ -x /svcacct-to-kubeconfig.sh ] ; then
+ /svcacct-to-kubeconfig.sh
+fi
+
+if [ ! -z "${HELM_TLS_CA_CERT}" ]; then
+  kubectl -n ${SECRET_NAMESPACE} get secret -o yaml ${SECRET_NAME} | \
+   grep 'ca.crt:' | \
+   awk '{print $2}' | \
+   base64 -d > ${HELM_TLS_CA_CERT}
+fi
+
+if [ ! -z "${HELM_TLS_CERT}" ]; then
+  kubectl -n ${SECRET_NAMESPACE} get secret -o yaml ${SECRET_NAME} | \
+   grep 'tls.crt:' | \
+   awk '{print $2}' | \
+   base64 -d > ${HELM_TLS_CERT}
+fi
+
+if [ ! -z "${HELM_TLS_KEY}" ]; then
+  kubectl -n ${SECRET_NAMESPACE} get secret -o yaml ${SECRET_NAME} | \
+   grep 'tls.key:' | \
+   awk '{print $2}' | \
+   base64 -d > ${HELM_TLS_KEY}
+fi
diff --git a/new-installer/helm/charts/nearrtric/appmgr/templates/bin/_svcacct-to-kubeconfig.sh.tpl b/new-installer/helm/charts/nearrtric/appmgr/templates/bin/_svcacct-to-kubeconfig.sh.tpl
new file mode 100755 (executable)
index 0000000..1340317
--- /dev/null
@@ -0,0 +1,46 @@
+{{/*
+   Copyright (c) 2019 AT&T Intellectual Property.
+   Copyright (c) 2019 Nokia.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+*/}}
+#!/bin/sh
+
+# generate a kubconfig (at ${KUBECONFIG} file from the automatically-mounted
+# service account token.
+# ENVIRONMENT:
+# SVCACCT_NAME: the name of the service account user.  default "default"
+# CLUSTER_NAME: the name of the kubernetes cluster.  default "kubernetes"
+# KUBECONFIG: where the generated file will be deposited.
+SVCACCT_TOKEN=`cat /var/run/secrets/kubernetes.io/serviceaccount/token`
+CLUSTER_CA=`base64 /var/run/secrets/kubernetes.io/serviceaccount/ca.crt|tr -d '\n'`
+
+cat >${KUBECONFIG} <<__EOF__
+ApiVersion: v1
+kind: Config
+users:
+- name: ${SVCACCT_NAME:-default}
+  user:
+    token: ${SVCACCT_TOKEN}
+clusters:
+- cluster:
+    certificate-authority-data: ${CLUSTER_CA}
+    server: ${K8S_API_HOST:-https://kubernetes.default.svc.cluster.local/}
+  name: ${CLUSTER_NAME:-kubernetes}
+contexts:
+- context:
+    cluster: ${CLUSTER_NAME:-kubernetes}
+    user: ${SVCACCT_NAME:-default}
+  name: svcs-acct-context
+current-context: svcs-acct-context
+__EOF__
diff --git a/new-installer/helm/charts/nearrtric/appmgr/templates/configmap-bin.yaml b/new-installer/helm/charts/nearrtric/appmgr/templates/configmap-bin.yaml
new file mode 100644 (file)
index 0000000..93e24a8
--- /dev/null
@@ -0,0 +1,35 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.appmgr" . }}-bin
+data:
+  appmgr-tiller-secret-copier.sh: |-
+{{ .Files.Get "bin/_appmgr-tiller-secret-copier.sh.tpl" | indent 4 }}
+  svcacct-to-kubeconfig.sh: |
+{{ .Files.Get "bin/_svcacct-to-kubeconfig.sh.tpl" | indent 4 }}
+
+{{/*
+data:
+  appmgr-tiller-secret-copier.sh: |
+   {{-  include "appmgr/templates/bin/_appmgr-tiller-secret-copier.sh.tpl" . | indent 4 }}
+  svcacct-to-kubeconfig.sh: |
+   {{-  include "appmgr/templates/bin/_svcacct-to-kubeconfig.sh.tpl" . | indent 4 }}
+*/}}
+
diff --git a/new-installer/helm/charts/nearrtric/appmgr/templates/deployment.yaml b/new-installer/helm/charts/nearrtric/appmgr/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..09151de
--- /dev/null
@@ -0,0 +1,113 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $topCtx :=  . }}
+{{- $secretPath := .Values.appmgr.appsecretpath | default "/opt/ric/secret" }}
+{{- $imagectx := dict "ctx" . "defaultregistry" .Values.appmgr.image.appmgr.registry }}
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "common.deploymentname.appmgr" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.appmgr.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      {{- if .Values.appmgr.annotations }}
+      annotations:
+        {{- .Values.appmgr.annotations | nindent 8 -}}
+      {{ end }}
+      labels:
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.appmgr" . }}
+      serviceAccountName: {{ include "common.serviceaccountname.appmgr" . }}
+      imagePullSecrets:
+        - name: {{ include "common.dockerregistry.credential" $imagectx }}
+      containers:
+        - name: {{ include "common.containername.appmgr" . }}
+          {{- $newctx := dict "ctx" $topCtx "defaultregistry" .Values.appmgr.image.appmgr.registry }}
+          image: {{ include "common.dockerregistry.url" $newctx }}/{{ .Values.appmgr.image.appmgr.name }}:{{ .Values.appmgr.image.appmgr.tag }}
+          {{- $newctx := dict "ctx" $topCtx "defaultpullpolicy" .Values.appmgr.imagePullPolicy }}
+          imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $newctx }}
+          ports:
+            - name: http
+              containerPort: {{ include "common.serviceport.appmgr.http" . }}
+              protocol: TCP
+            - name: rmrroute
+              containerPort: {{ include "common.serviceport.appmgr.rmr.route" . }}
+              protocol: TCP
+            - name: rmrdata
+              containerPort: {{ include "common.serviceport.appmgr.rmr.data" . }}
+              protocol: TCP
+          volumeMounts:
+            - name: config-volume
+              mountPath: {{ .Values.appmgr.appconfigpath }}/appmgr.yaml
+              subPath: appmgr.yaml
+            - name: helm-secret-volume
+              mountPath: {{ $secretPath }}
+              readOnly: false
+            - name: secret-volume
+              mountPath: {{ $secretPath }}/helm_repo_username
+              subPath: helm_repo_username
+            - name: secret-volume
+              mountPath: {{ $secretPath }}/helm_repo_password
+              subPath: helm_repo_password
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.appmgr" . }}-env
+            - configMapRef:
+                name: {{ include "common.configmapname.dbaas" . }}-appconfig
+          livenessProbe:
+            #exec:
+            #  command:
+            #    - /bin/bash
+            #    - -c
+            #    - ps -ef | grep {{ .Values.livenessprocessname }}| grep -v "grep"
+            #initialDelaySeconds: 120
+            #periodSeconds: 30
+          readinessProbe:
+          #  httpGet:
+          #    path: /
+          #    port: http
+          securityContext:
+            # ubuntu
+            #runAsUser: 1000
+            #allowPrivilegeEscalation: false
+      restartPolicy: Always
+      volumes:
+        - name: config-volume
+          configMap:
+            name: {{ include "common.configmapname.appmgr" . }}-appconfig
+        - name: secret-volume
+          secret:
+            secretName: {{ include "common.secretname.appmgr" . }}
+        - name: helm-secret-volume
+          emptyDir: {}
+        - name: appmgr-bin-volume
+          configMap:
+            name: {{ include "common.configmapname.appmgr" . }}-bin
+            defaultMode: 0755
diff --git a/new-installer/helm/charts/nearrtric/appmgr/templates/env-appmgr.yaml b/new-installer/helm/charts/nearrtric/appmgr/templates/env-appmgr.yaml
new file mode 100644 (file)
index 0000000..5ab9580
--- /dev/null
@@ -0,0 +1,42 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $tillerKey := .Values.appmgr.tillerkey | default "ricxapp" }}
+{{- $topCtx :=  . }}
+{{- $ctx := dict "ctx" $topCtx "key" $tillerKey }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.appmgr" . }}-env
+data:
+  NAME: "xappmgr"
+  RMR_RTG_SVC: {{ include "common.serviceport.appmgr.rmr.route" . | quote }}
+{{- $certPath := .Values.appmgr.appcertpath | default "/opt/ric/certificates" }}
+{{- $secretPath := .Values.appmgr.appsecretpath | default "/opt/ric/secret" }}
+{{- $servicename := include "common.servicename.tiller" $ctx }}
+{{- $servicenamespace := include "common.tillerDeployNameSpace" $ctx }}
+{{- $serviceport := include "common.tillerPort" $ctx }}
+  HELM_HOST: {{ printf "%s.%s:%s" $servicename $servicenamespace $serviceport | quote }}
+{{- if eq (include "common.tillerTLSVerify" $ctx) "true" }}
+  HELM_TLS_VERIFY: "true"
+  HELM_TLS_CA_CERT: "{{ $secretPath }}/tiller-ca.cert"
+  HELM_TLS_HOSTNAME: {{ $servicename | quote }}
+{{- end }}
+{{- if eq (include "common.tillerTLSAuthenticate" $ctx) "true"  }}
+  HELM_TLS_ENABLED: "true"
+  HELM_TLS_CERT: "{{ $secretPath }}/helm-client.cert"
+  HELM_TLS_KEY: "{{ $secretPath }}/helm-client.key"
+{{- end }}  
diff --git a/new-installer/helm/charts/nearrtric/appmgr/templates/ingress-appmgr.yaml b/new-installer/helm/charts/nearrtric/appmgr/templates/ingress-appmgr.yaml
new file mode 100644 (file)
index 0000000..1ec98b2
--- /dev/null
@@ -0,0 +1,15 @@
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: {{ include "common.ingressname.appmgr" . }}
+spec:
+  rules:
+  - http:
+      paths:
+      - path: {{ include "common.kongpath.ric.appmgr" . }}
+        pathType: Prefix
+        backend:
+          service:
+            name: {{ include "common.servicename.appmgr.http" . }}
+            port:
+              number: {{ include "common.serviceport.appmgr.http" . }}
diff --git a/new-installer/helm/charts/nearrtric/appmgr/templates/secret.yaml b/new-installer/helm/charts/nearrtric/appmgr/templates/secret.yaml
new file mode 100644 (file)
index 0000000..6c8511c
--- /dev/null
@@ -0,0 +1,24 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ include "common.secretname.appmgr" . }}
+type: Opaque
+data:
+  helm_repo_username: {{ .Values.appmgr.repoUserName | default "helm" }}
+  helm_repo_password: {{ .Values.appmgr.repoPassword | default "helm" }}
diff --git a/new-installer/helm/charts/nearrtric/appmgr/templates/service-http.yaml b/new-installer/helm/charts/nearrtric/appmgr/templates/service-http.yaml
new file mode 100644 (file)
index 0000000..bda793c
--- /dev/null
@@ -0,0 +1,39 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.appmgr.http" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }} 
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.appmgr.http" . }}
+      protocol: "TCP"
+      name: "http"
+      targetPort: "http"
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
+    release: {{ .Release.Name }}
+
+
diff --git a/new-installer/helm/charts/nearrtric/appmgr/templates/service-rmr.yaml b/new-installer/helm/charts/nearrtric/appmgr/templates/service-rmr.yaml
new file mode 100644 (file)
index 0000000..a0608cb
--- /dev/null
@@ -0,0 +1,42 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.appmgr.rmr" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }} 
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.appmgr.rmr.route" . }}
+      protocol: "TCP"
+      name: "rmrroute"
+      targetPort: "rmrroute"
+    - port: {{ include "common.serviceport.appmgr.rmr.data" . }}
+      protocol: "TCP"
+      name: "rmrdata"
+      targetPort: "rmrdata"
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
+    release: {{ .Release.Name }}
+
diff --git a/new-installer/helm/charts/nearrtric/appmgr/templates/serviceaccount.yaml b/new-installer/helm/charts/nearrtric/appmgr/templates/serviceaccount.yaml
new file mode 100644 (file)
index 0000000..443e662
--- /dev/null
@@ -0,0 +1,84 @@
+################################################################################
+#   Copyright (c) 2019-2020 AT&T Intellectual Property.                        #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- $tillerKey := .Values.appmgr.tillerkey | default "ricxapp" }}
+{{- $topCtx :=  . }}
+{{- $ctx := dict "ctx" $topCtx "key" $tillerKey }}
+{{- $certName := include "common.tillerHelmClientTLSSecret" $ctx }}
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ include "common.serviceaccountname.appmgr" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+  name: {{ include "common.serviceaccountname.appmgr" . }}-{{ include "common.tillerNameSpace" $ctx }}-access
+rules:
+- apiGroups: [""]
+  resources: ["pods/portforward"]
+  verbs: ["create"]
+- apiGroups: [""]
+  resources: ["pods", "configmaps", "deployments", "services"]
+  verbs: ["get", "list", "create", "delete"]
+{{- if or (eq (include "common.tillerTLSVerify" $ctx) "true" )  (eq (include "common.tillerTLSAuthenticate" $ctx) "true") }}
+- apiGroups: [""]
+  resources: ["secrets"]
+  #resourceNames: [ {{ include "common.tillerHelmClientTLSSecret" $ctx | quote }} ]
+  verbs: ["get","list"]
+{{- end }}
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  name: {{ include "common.serviceaccountname.appmgr" . }}-{{ include "common.tillerNameSpace" $ctx }}-access
+  namespace: {{ include "common.namespace.platform" . }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: {{ include "common.serviceaccountname.appmgr" . }}-{{ include "common.tillerNameSpace" $ctx }}-access
+subjects:
+  - kind: ServiceAccount
+    name: {{ include "common.serviceaccountname.appmgr" . }}
+    namespace: {{ include "common.namespace.platform" . }}
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+  name: {{ include "common.serviceaccountname.appmgr" . }}-{{ include "common.tillerNameSpace" $ctx }}-getappconfig
+  #namespace: {{ include "common.tillerNameSpace" $ctx }}
+  #namespace: {{ include "common.namespace.platform" . }}
+rules:
+- apiGroups: [""]
+  resources: ["configmaps", "endpoints", "services"]
+  verbs: ["get", "list", "create", "update", "delete"]
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  name: {{ include "common.serviceaccountname.appmgr" . }}-{{ include "common.namespace.xapp" . }}-getappconfig
+  namespace: {{ include "common.tillerNameSpace" $ctx }}
+  #namespace: {{ include "common.namespace.platform" . }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: {{ include "common.serviceaccountname.appmgr" . }}-{{ include "common.tillerNameSpace" $ctx }}-getappconfig
+subjects:
+  - kind: ServiceAccount
+    name: {{ include "common.serviceaccountname.appmgr" . }}
+    namespace: {{ include "common.namespace.platform" . }}
diff --git a/new-installer/helm/charts/nearrtric/appmgr/values.yaml b/new-installer/helm/charts/nearrtric/appmgr/values.yaml
new file mode 100644 (file)
index 0000000..28eb301
--- /dev/null
@@ -0,0 +1,93 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+common:
+  k8sAPIHost: https://kubernetes.default.svc.cluster.local/
+  tillers:
+    ricxapp:
+      name: ricxapp
+      nameSpace: ricxapp
+      deployNameSpace: ricinfra
+      imagePullPolicy: IfNotPresent
+      image:
+        tillerTLSSecrets:
+          registry: nexus3.o-ran-sc.org:10002/o-ran-sc
+          name: it-dep-secret
+          tag:  0.0.2
+        tiller:
+          registry: ghcr.io
+          name: helm/tiller
+          tag: v2.16.12
+      secret:
+        create: true
+        tillerSecretName: ricxapp-tiller-secret
+        helmSecretName: ricxapp-helm-secret
+      tls:
+       authenticate: true
+       verify: true
+      serviceAccount:
+        name: tiller
+        role:
+        - apiGroups: [""]
+          resources: ["pods", "configmaps", "services"]
+          verbs: ["get", "list", "create", "delete"]
+        - apiGroups: ["extensions", "apps"]
+          resources: ["deployments"]
+          verbs: ["get", "list", "create", "delete"]
+
+
+
+
+appmgr:
+  imagePullPolicy: IfNotPresent
+  image:
+   appmgr:
+     registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+     name: ric-plt-appmgr
+     tag: 0.5.7
+
+
+
+  # This section describes xAppManager
+  replicaCount: 1
+
+  reponame: "helm-repo"
+  #repoUserName: ""
+  #repoPassword: ""
+  #repoUrl: ""
+
+
+  # Service ports are now defined in
+  # ric-common/Common-Template/helm/ric-common/templates/_ports.tpl file.
+  # If need to change a service port, make the code change necessary, then
+  # update the _ports.tpl file with the new port number.
+
+  # config
+  # Path referred in xapp-manager for retrieving configuration details
+  appconfigpath: /opt/ric/config
+
+
+  # secret
+  # Path referred in xapp-manager for retrieving helm repo secrets
+  appsecretpath: /opt/ric/secret
+
+
+  # certificates
+  # Path referred in xapp-manager for retrieving helm repo client certificates
+  appcertpath: /opt/ric/certificates
+
+  tillerkey: "ricxapp"
diff --git a/new-installer/helm/charts/nearrtric/dbaas/Chart.yaml b/new-installer/helm/charts/nearrtric/dbaas/Chart.yaml
new file mode 100644 (file)
index 0000000..7d65c77
--- /dev/null
@@ -0,0 +1,30 @@
+################################################################################
+#   Copyright (c) 2020 AT&T Intellectual Property.                             #
+#   Copyright (c) 2020 Nokia.                                                  #
+#   Copyright (c) 2023 Abhijit Gadgil.
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v2
+description: DBaaS Service based on Redis for the Near RT RIC Platform.
+name: dbaas
+sources:
+  - https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/dbaas,general
+version: 0.1.0
+kubeVersion: " >= 1.22"
+
+dependencies:
+  - name: nearrt-ric-common
+    version: ~0.x
+    repository: "@local"
diff --git a/new-installer/helm/charts/nearrtric/dbaas/templates/appconfig.yaml b/new-installer/helm/charts/nearrtric/dbaas/templates/appconfig.yaml
new file mode 100644 (file)
index 0000000..52508d4
--- /dev/null
@@ -0,0 +1,42 @@
+################################################################################
+#   Copyright (c) 2020 AT&T Intellectual Property.                             #
+#   Copyright (c) 2020 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{ $platformNameSpace := include "common.namespace.platform" . }}
+{{ $xAppNameSpace := include "common.namespace.xapp" . }}
+{{ $nameSpaceList := list $platformNameSpace $xAppNameSpace }}
+{{- range $nameSpaceList }}
+{{- $namespace := . }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+{{- if eq $namespace $platformNameSpace }}
+  name: {{ include "common.configmapname.dbaas" $ }}-appconfig
+{{- else }}
+  name: dbaas-appconfig
+{{- end }}
+  namespace: {{ $namespace }}
+data:
+{{- if $.Values.dbaas.enableHighAvailability }}
+  DBAAS_SERVICE_SENTINEL_PORT: {{ include "common.serviceport.dbaas.sentinel" . | quote }}
+  DBAAS_MASTER_NAME: {{ $.Values.dbaas.redis.masterGroupName }}
+  DBAAS_NODE_COUNT: {{ $.Values.dbaas.haReplicas | quote }}
+{{- else }}
+  DBAAS_NODE_COUNT: {{ $.Values.dbaas.saReplicas | quote }}
+{{- end }}
+  DBAAS_SERVICE_HOST: {{ include "common.servicename.dbaas.tcp" $ }}.{{ $platformNameSpace }}
+  DBAAS_SERVICE_PORT: {{ include "common.serviceport.dbaas.redis" $ | quote }}
+{{- end }}
diff --git a/new-installer/helm/charts/nearrtric/dbaas/templates/configmap.yaml b/new-installer/helm/charts/nearrtric/dbaas/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..27b36a7
--- /dev/null
@@ -0,0 +1,157 @@
+################################################################################
+#   Copyright (c) 2020 AT&T Intellectual Property.                             #
+#   Copyright (c) 2020 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ template "common.configmapname.dbaas" . }}-config
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}
+data:
+  redis.conf: |
+    dir "/data"
+{{- if $.Values.dbaas.enableHighAvailability }}
+    {{- range $key, $value := .Values.dbaas.redis.ha_config }}
+    {{ $key }} {{ $value }}
+    {{- end }}
+{{- else }}
+    {{- range $key, $value := .Values.dbaas.redis.sa_config }}
+    {{ $key }} {{ $value }}
+    {{- end }}
+{{- end }}
+
+{{- if $.Values.dbaas.enableHighAvailability }}
+  sentinel.conf: |
+    dir "/data"
+    {{- $root := . -}}
+    {{- range $key, $value := .Values.dbaas.sentinel.config }}
+    sentinel {{ $key }} {{ $root.Values.dbaas.redis.masterGroupName }} {{ $value }}
+    {{- end }}
+    protected-mode {{ index .Values.dbaas.sentinel "protected-mode" }}
+
+  init.sh: |
+    HOSTNAME="$(hostname)"
+    INDEX="${HOSTNAME##*-}"
+    MASTER="$(redis-cli -h {{ template "common.servicename.dbaas.tcp" . }}.{{ include "common.namespace.platform" . }} -p {{ include "common.serviceport.dbaas.sentinel" .  }} sentinel get-master-addr-by-name {{ .Values.dbaas.redis.masterGroupName }} | grep -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')"
+    MASTER_GROUP="{{ .Values.dbaas.redis.masterGroupName }}"
+    QUORUM="{{ .Values.dbaas.sentinel.quorum }}"
+    REDIS_CONF=/data/conf/redis.conf
+    REDIS_PORT={{ include "common.serviceport.dbaas.redis" . }}
+    SENTINEL_CONF=/data/conf/sentinel.conf
+    SENTINEL_PORT={{ include "common.serviceport.dbaas.sentinel" . }}
+    SERVICE={{ include "common.servicename.dbaas.tcp" . }}
+    set -eu
+
+    sentinel_update() {
+        echo "Updating sentinel config"
+        sed -i "1s/^/$(cat sentinel-id)\\n/" "$SENTINEL_CONF"
+        sed -i "2s/^/sentinel monitor $MASTER_GROUP $1 $REDIS_PORT $QUORUM \\n/" "$SENTINEL_CONF"
+        echo "sentinel announce-ip $ANNOUNCE_IP" >> $SENTINEL_CONF
+        echo "sentinel announce-port $SENTINEL_PORT" >> $SENTINEL_CONF
+    }
+
+    redis_update() {
+        echo "Updating redis config"
+        echo "slaveof $1 $REDIS_PORT" >> "$REDIS_CONF"
+        echo "slave-announce-ip $ANNOUNCE_IP" >> $REDIS_CONF
+        echo "slave-announce-port $REDIS_PORT" >> $REDIS_CONF
+    }
+
+    redis_master_update() {
+        echo "Updating redis default master config"
+        echo "slave-announce-ip $ANNOUNCE_IP" >> $REDIS_CONF
+        echo "slave-announce-port $REDIS_PORT" >> $REDIS_CONF
+    }
+
+    copy_config() {
+        if [ -f "$SENTINEL_CONF" ]; then
+            grep "sentinel myid" "$SENTINEL_CONF" > sentinel-id || true
+        fi
+        cp /readonly-config/redis.conf "$REDIS_CONF"
+        cp /readonly-config/sentinel.conf "$SENTINEL_CONF"
+    }
+
+    setup_defaults() {
+        echo "Setting up defaults"
+        if [ "$INDEX" = "0" ]; then
+            echo "Setting this pod as the default master"
+            sed -i "s/^.*slaveof.*//" "$REDIS_CONF"
+            redis_master_update
+            sentinel_update "$ANNOUNCE_IP"
+        else
+            DEFAULT_MASTER="$(getent hosts "{{ include "common.statefulsetname.dbaas" . }}-server-0.$SERVICE" | awk '{ print $1 }')"
+            if [ -z "$DEFAULT_MASTER" ]; then
+                echo "Unable to resolve host"
+                exit 1
+            fi
+            echo "Setting default slave config.."
+            redis_update "$DEFAULT_MASTER"
+            sentinel_update "$DEFAULT_MASTER"
+        fi
+    }
+
+    find_master() {
+        echo "Attempting to find master"
+        if [ "$(redis-cli -h "$MASTER"{{ if .Values.auth }} -a "$AUTH"{{ end }} ping)" != "PONG" ]; then
+           echo "Can't ping master, attempting to force failover"
+           if redis-cli -h "$SERVICE" -p "$SENTINEL_PORT" sentinel failover "$MASTER_GROUP" | grep -q 'NOGOODSLAVE' ; then
+               setup_defaults
+               return 0
+           fi
+           sleep 10
+           MASTER="$(redis-cli -h $SERVICE -p $SENTINEL_PORT sentinel get-master-addr-by-name $MASTER_GROUP | grep -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')"
+           if [ "$MASTER" ]; then
+               sentinel_update "$MASTER"
+               redis_update "$MASTER"
+           else
+              echo "Could not failover, exiting..."
+              exit 1
+           fi
+        else
+            echo "Found reachable master, updating config"
+            sentinel_update "$MASTER"
+            redis_update "$MASTER"
+        fi
+    }
+
+    mkdir -p /data/conf/
+
+    echo "Initializing config.."
+    copy_config
+
+    #    ANNOUNCE_IP=$(getent hosts "{{ include "common.statefulsetname.dbaas" . }}-server-$INDEX.$SERVICE" | awk '{ print $1 }')
+    if [ -z "$ANNOUNCE_IP" ]; then
+        "Could not resolve the announce ip for this pod"
+        exit 1
+    elif [ "$MASTER" ]; then
+        find_master
+    else
+        setup_defaults
+    fi
+
+    if [ "${AUTH:-}" ]; then
+        echo "Setting auth values"
+        sed -i "s/replace-default-auth/$AUTH/" "$REDIS_CONF" "$SENTINEL_CONF"
+    fi
+
+    echo "Ready..."
+
+{{- end }}
diff --git a/new-installer/helm/charts/nearrtric/dbaas/templates/service.yaml b/new-installer/helm/charts/nearrtric/dbaas/templates/service.yaml
new file mode 100644 (file)
index 0000000..f4f476e
--- /dev/null
@@ -0,0 +1,43 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.dbaas.tcp" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  clusterIP: None
+  ports:
+  - name: server
+    port: {{ include "common.serviceport.dbaas.redis" . }}
+    protocol: TCP
+    targetPort: redis
+{{- if $.Values.dbaas.enableHighAvailability }}
+  - name: sentinel
+    port: {{ include "common.serviceport.dbaas.sentinel" . }}
+    protocol: TCP
+    targetPort: sentinel
+{{- end }}
+  selector:
+    release: {{ .Release.Name }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}
diff --git a/new-installer/helm/charts/nearrtric/dbaas/templates/statefulset.yaml b/new-installer/helm/charts/nearrtric/dbaas/templates/statefulset.yaml
new file mode 100644 (file)
index 0000000..e6de6fe
--- /dev/null
@@ -0,0 +1,174 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $ctx := dict "ctx" . "defaultregistry" .Values.dbaas.image.registry }}
+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+  name: {{ include "common.statefulsetname.dbaas" . }}-server
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}
+      release: {{ .Release.Name }}
+  serviceName: {{ template "common.servicename.dbaas.tcp" . }}
+{{- if $.Values.dbaas.enableHighAvailability }}
+  replicas: {{ .Values.dbaas.haReplicas }}
+{{- else }}
+  replicas: {{ .Values.dbaas.saReplicas }}
+{{- end }}
+  podManagementPolicy: OrderedReady
+  updateStrategy:
+    type: RollingUpdate
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}
+        release: {{ .Release.Name }}
+    spec:
+{{- if $.Values.dbaas.enablePodAntiAffinity }}
+      affinity:
+        podAntiAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            - labelSelector:
+                matchLabels:
+                  app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}
+                  release: {{ .Release.Name }}
+              topologyKey: kubernetes.io/hostname
+          preferredDuringSchedulingIgnoredDuringExecution:
+            - weight: 100
+              podAffinityTerm:
+                labelSelector:
+                  matchLabels:
+                    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}
+                    release: {{ .Release.Name }}
+                topologyKey: topology.kubernetes.io/zone
+{{- end }}
+      imagePullSecrets:
+        {{- $ctx := dict "ctx" . "defaultregistry" .Values.dbaas.image.registry }}
+        - name: {{ include "common.dockerregistry.credential" $ctx }}
+      terminationGracePeriodSeconds: {{ .Values.dbaas.terminationGracePeriodSeconds }}
+{{- if $.Values.dbaas.enableHighAvailability }}
+      initContainers:
+      - name: config-init
+        image: {{ include "common.dockerregistry.url" $ctx }}/{{ .Values.dbaas.image.name }}:{{ .Values.dbaas.image.tag }}
+        imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $ctx  }}
+        command:
+        - sh
+        args:
+        - /readonly-config/init.sh
+        env:
+        - name: ANNOUNCE_IP
+          valueFrom:
+            fieldRef:
+              fieldPath: status.podIP
+        volumeMounts:
+        - name: config
+          mountPath: /readonly-config
+          readOnly: true
+        - name: data
+          mountPath: /data
+{{- end }}
+      shareProcessNamespace: true
+      containers:
+      - name: {{ include "common.containername.dbaas" . }}-redis
+        image: {{ include "common.dockerregistry.url" $ctx }}/{{ .Values.dbaas.image.name }}:{{ .Values.dbaas.image.tag }}
+        imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $ctx  }}
+        command:
+        - redis-server
+        args:
+{{- if $.Values.dbaas.enableHighAvailability }}
+        - /data/conf/redis.conf
+{{- else }}
+        - /data/redis.conf
+{{- end }}
+        livenessProbe:
+          exec:
+            command:
+            - /bin/sh
+            - -c
+            - {{ .Values.dbaas.probeTimeoutCommand }} {{ .Values.dbaas.probeTimeout }} redis-cli -p {{ include "common.serviceport.dbaas.redis" . }} ping
+          initialDelaySeconds: 15
+          periodSeconds: 5
+        readinessProbe:
+          exec:
+            command:
+            - /bin/sh
+            - -c
+            - {{ .Values.dbaas.probeTimeoutCommand }} {{ .Values.dbaas.probeTimeout }} redis-cli -p {{ include "common.serviceport.dbaas.redis" . }} ping
+          initialDelaySeconds: 15
+          periodSeconds: 5
+        ports:
+        - name: redis
+          containerPort: {{ include "common.serviceport.dbaas.redis" . }}
+        envFrom:
+        - configMapRef:
+            name: {{ include "common.configmapname.dbaas" . }}-appconfig
+        volumeMounts:
+        - mountPath: /data
+{{- if $.Values.dbaas.enableHighAvailability }}
+          name: data
+      - name: {{ include "common.containername.dbaas" . }}-sentinel
+        image: {{ include "common.dockerregistry.url" $ctx }}/{{ .Values.dbaas.image.name }}:{{ .Values.dbaas.image.tag }}
+        imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $ctx  }}
+        command:
+          - redis-server
+        args:
+          - /data/conf/sentinel.conf
+          - --sentinel
+        livenessProbe:
+          exec:
+            command:
+            - /bin/sh
+            - -c
+            - {{ .Values.dbaas.probeTimeoutCommand }} {{ .Values.dbaas.probeTimeout }} redis-cli -p {{ include "common.serviceport.dbaas.redis" . }} ping
+          initialDelaySeconds: 15
+          periodSeconds: 5
+        readinessProbe:
+          exec:
+            command:
+            - /bin/sh
+            - -c
+            - {{ .Values.dbaas.probeTimeoutCommand }} {{ .Values.dbaas.probeTimeout }} redis-cli -p {{ include "common.serviceport.dbaas.redis" . }} ping
+          initialDelaySeconds: 15
+          periodSeconds: 5
+        ports:
+          - name: sentinel
+            containerPort: {{ include "common.serviceport.dbaas.sentinel" . }}
+        envFrom:
+        - configMapRef:
+            name: {{ include "common.configmapname.dbaas" . }}-appconfig
+        volumeMounts:
+        - mountPath: /data
+          name: data
+{{- else }}
+          name: config
+{{- end }}
+      volumes:
+      - name: config
+        configMap:
+          name: {{ template "common.configmapname.dbaas" . }}-config
+{{- if $.Values.dbaas.enableHighAvailability }}
+      - name: data
+        emptyDir: {}
+{{- end }}
diff --git a/new-installer/helm/charts/nearrtric/dbaas/values.yaml b/new-installer/helm/charts/nearrtric/dbaas/values.yaml
new file mode 100644 (file)
index 0000000..4267ebe
--- /dev/null
@@ -0,0 +1,67 @@
+################################################################################
+#   Copyright (c) 2020 AT&T Intellectual Property.                             #
+#   Copyright (c) 2020 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+dbaas:
+  image:
+    registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+    name: ric-plt-dbaas
+    tag: 0.6.1
+  imagePullPolicy: IfNotPresent
+  enableHighAvailability: false
+  enablePodAntiAffinity: false
+  terminationGracePeriodSeconds: 5
+
+  redis:
+    masterGroupName: dbaasmaster
+    sa_config:
+      ## For /data/conf/redis.conf
+      # For now DBAAS has no discs, that's why disable AOF and RDB file snapshot saving
+      appendonly: "no"
+      save: ""
+      protected-mode: "no"
+      loadmodule: "/usr/local/libexec/redismodule/libredismodule.so"
+      bind: 0.0.0.0
+    ha_config:
+      ## For /data/conf/redis.conf
+      # For now DBAAS has no discs, that's why disable AOF and RDB file snapshot saving
+      appendonly: "no"
+      save: ""
+      min-slaves-to-write: 1
+      min-slaves-max-lag: 5
+      maxmemory: "0"
+      maxmemory-policy: "volatile-lru"
+      protected-mode: "no"
+      loadmodule: "/usr/local/libexec/redismodule/libredismodule.so"
+
+  sentinel:
+    quorum: 2
+    protected-mode: "no"
+    config:
+      ## For /data/conf/sentinel.conf
+      down-after-milliseconds: 5000
+      failover-timeout: 60000
+      parallel-syncs: 1
+
+  saReplicas: 1
+  haReplicas: 3
+  #Timeout command below requires -t flag if installed DBAAS image is older than
+  #0.5.0. Reason is that DBAAS image version 0.5.0 and newer ones are based on
+  #newer Alpine 3.11 OS version and in this Alpine version timeout command
+  #doesn't have -t flag anymore.
+  probeTimeoutCommand: "timeout"
+  #probeTimeoutCommand: "timeout -t"
+  probeTimeout: 10
diff --git a/new-installer/helm/charts/nearrtric/e2mgr/Chart.yaml b/new-installer/helm/charts/nearrtric/e2mgr/Chart.yaml
new file mode 100644 (file)
index 0000000..d793713
--- /dev/null
@@ -0,0 +1,30 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#   Copyright (c) Abhijit Gadgil.
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v2
+description: E2Manager Helm Chart for the NearRT RIC Platform.
+name: e2mgr
+sources:
+  - https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/e2mgr,general
+version: 0.1.0
+kubeVersion: ">= 1.22 "
+
+dependencies:
+  - name: nearrt-ric-common
+    version: ~0.x
+    repository: "@local"
diff --git a/new-installer/helm/charts/nearrtric/e2mgr/templates/configmap.yaml b/new-installer/helm/charts/nearrtric/e2mgr/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..ce55ef0
--- /dev/null
@@ -0,0 +1,160 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.e2mgr" . }}-router-configmap
+  namespace: {{ include "common.namespace.platform" . }}
+data:
+  rmr_verbose: |
+    0
+  router.txt: |
+    newrt|start
+    rte|1080|{{ include "common.servicename.e2mgr.rmr" .      }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2mgr.rmr.data" . }}
+    rte|1090|{{ include "common.servicename.e2term.rmr" .     }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2term.rmr.data" . }}
+    rte|1100|{{ include "common.servicename.e2term.rmr" .     }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2term.rmr.data" . }}
+    rte|1101|{{ include "common.servicename.e2term.rmr" .     }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2term.rmr.data" . }}
+    rte|10020|{{ include "common.servicename.e2mgr.rmr" .      }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2mgr.rmr.data" . }}
+    rte|10060|{{ include "common.servicename.e2term.rmr" .     }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2term.rmr.data" . }}
+    rte|10061|{{ include "common.servicename.e2mgr.rmr" .      }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2mgr.rmr.data" . }}
+    rte|10062|{{ include "common.servicename.e2mgr.rmr" .      }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2mgr.rmr.data" . }}
+    rte|10070|{{ include "common.servicename.e2term.rmr" .     }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2term.rmr.data" . }}
+    rte|10071|{{ include "common.servicename.e2term.rmr" .     }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2term.rmr.data" . }}
+    rte|10080|{{ include "common.servicename.e2mgr.rmr" .      }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2mgr.rmr.data" . }}
+    rte|10360|{{ include "common.servicename.e2term.rmr" .     }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2term.rmr.data" . }}
+    rte|10361|{{ include "common.servicename.e2mgr.rmr" .      }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2mgr.rmr.data" . }}
+    rte|10362|{{ include "common.servicename.e2mgr.rmr" .      }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2mgr.rmr.data" . }}
+    rte|10370|{{ include "common.servicename.e2mgr.rmr" .      }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2mgr.rmr.data" . }}
+    rte|10371|{{ include "common.servicename.e2term.rmr" .     }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2term.rmr.data" . }}
+    rte|12010|{{ include "common.servicename.e2term.rmr" .     }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2term.rmr.data" . }}
+    rte|12020|{{ include "common.servicename.e2term.rmr" .     }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2term.rmr.data" . }}
+    rte|20001|{{ include "common.servicename.a1mediator.rmr" . }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.a1mediator.rmr.data" . }}
+    newrt|end
+
+---
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.e2mgr" . }}-configuration-configmap
+  namespace: {{ include "common.namespace.platform" . }}
+data:
+  configuration.yaml: |
+    logging:
+      {{- if hasKey .Values.e2mgr "logLevel" }}
+      logLevel: {{ .Values.e2mgr.logLevel }}
+      {{- else }}
+      logLevel:  "info"
+      {{- end }}
+    http:
+      {{- if hasKey .Values.e2mgr "httpPort" }}
+      port: {{ .Values.e2mgr.httpPort }}
+      {{- else }}
+      port: 3800
+      {{- end }}
+    rmr:
+      {{- if hasKey .Values.e2mgr "rmrPort" }}
+      port: {{ .Values.e2mgr.rmrPort }}
+      {{- else }}
+      port: 3801
+      {{- end }}
+      {{- if hasKey .Values.e2mgr "maxMsgSize" }}
+      maxMsgSize: {{ .Values.e2mgr.maxMsgSize }}
+      {{- else }}
+      maxMsgSize: 65536
+      {{- end }}
+
+    routingManager:
+      {{- if hasKey .Values.e2mgr "baseUrl" }}
+      baseUrl: {{ .Values.e2mgr.baseUrl }}
+      {{- else }}
+      baseUrl: "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/"
+      {{- end }}
+
+    {{- if hasKey .Values.e2mgr "notificationResponseBuffer" }}
+    notificationResponseBuffer: {{ .Values.e2mgr.notificationResponseBuffer }}
+    {{- else }}
+    notificationResponseBuffer: 100
+    {{- end }}
+
+    {{- if hasKey .Values.e2mgr "bigRedButtonTimeoutSec" }}
+    bigRedButtonTimeoutSec: {{ .Values.e2mgr.bigRedButtonTimeoutSec }}
+    {{- else }}
+    bigRedButtonTimeoutSec: 5
+    {{- end }}
+
+    {{- if hasKey .Values.e2mgr "maxConnectionAttempts" }}
+    maxConnectionAttempts: {{ .Values.e2mgr.maxConnectionAttempts }}
+    {{- else }}
+    maxConnectionAttempts: 3
+    {{- end }}
+
+    {{- if hasKey .Values.e2mgr "maxRnibConnectionAttempts" }}
+    maxRnibConnectionAttempts: {{ .Values.e2mgr.maxRnibConnectionAttempts }}
+    {{- else }}
+    maxRnibConnectionAttempts: 3
+    {{- end }}
+
+    {{- if hasKey .Values.e2mgr "rnibRetryIntervalMs" }}
+    rnibRetryIntervalMs: {{ .Values.e2mgr.rnibRetryIntervalMs }}
+    {{- else }}
+    rnibRetryIntervalMs: 10
+    {{- end }}
+
+    {{- if hasKey .Values.e2mgr "keepAliveResponseTimeoutMs" }}
+    keepAliveResponseTimeoutMs: {{ .Values.e2mgr.keepAliveResponseTimeoutMs }}
+    {{- else }}
+    keepAliveResponseTimeoutMs: 360000
+    {{- end }}
+
+    {{- if hasKey .Values.e2mgr "keepAliveDelayMs" }}
+    keepAliveDelayMs: {{ .Values.e2mgr.keepAliveDelayMs }}
+    {{- else }}
+    keepAliveDelayMs: 120000
+    {{- end }}
+
+    globalRicId:
+      {{- if hasKey .Values.e2mgr "ricId" }}
+      ricId: {{ .Values.e2mgr.ricId }}
+      {{- else }}
+      ricId: "AACCE"
+      {{- end }}
+      {{- if hasKey .Values.e2mgr "mcc" }}
+      mcc: {{ .Values.e2mgr.mcc }}
+      {{- else }}
+      mcc: "310"
+      {{- end }}
+      {{- if hasKey .Values.e2mgr "mnc" }}
+      mnc: {{ .Values.e2mgr.mnc }}
+      {{- else }}
+      mnc: "411"
+      {{- end }}
+
+    rnibWriter:
+      {{- if hasKey .Values.e2mgr "stateChangeMessageChannel" }}
+      stateChangeMessageChannel: {{ .Values.e2mgr.stateChangeMessageChannel }}
+      {{- else }}
+      stateChangeMessageChannel: "RAN_CONNECTION_STATUS_CHANGE"
+      {{- end }}
+      {{- if hasKey .Values.e2mgr "ranManipulationMessageChannel" }}
+      ranManipulationMessageChannel: {{ .Values.e2mgr.ranManipulationMessageChannel }}
+      {{- else }}
+      ranManipulationMessageChannel: "RAN_MANIPULATION"
+      {{- end }}
+
+---
diff --git a/new-installer/helm/charts/nearrtric/e2mgr/templates/deployment.yaml b/new-installer/helm/charts/nearrtric/e2mgr/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..f5c9a1f
--- /dev/null
@@ -0,0 +1,99 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $imagectx := dict "ctx" . "defaultregistry" .Values.e2mgr.image.registry }}
+{{- $pullpolicyctx := dict "ctx" . "defaultpullpolicy" .Values.e2mgr.imagePullPolicy }}
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "common.deploymentname.e2mgr" .}}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2mgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.e2mgr.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2mgr" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      {{- if .Values.e2mgr.annotations }}
+      annotations:
+        {{- .Values.e2mgr.annotations | nindent 8 -}}
+      {{ end }}
+      labels:
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2mgr" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.e2mgr" . }} 
+      imagePullSecrets:
+        - name: {{ include "common.dockerregistry.credential" $imagectx }}
+      containers:
+        - name: {{ include "common.containername.e2mgr" . }}
+          image: {{ include "common.dockerregistry.url" $imagectx }}/{{ .Values.e2mgr.image.name }}:{{ .Values.e2mgr.image.tag }}
+          imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
+          volumeMounts:
+          - mountPath: /opt/E2Manager/router.txt
+            name: local-router-file
+            subPath: router.txt
+          - mountPath: /opt/E2Manager/resources/configuration.yaml
+            name: local-configuration-file
+            subPath: configuration.yaml
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.e2mgr" . }}-env
+            - configMapRef:
+                name: {{ include "common.configmapname.dbaas" . }}-appconfig
+          ports:
+            - name: "http"
+              containerPort: {{ include "common.serviceport.e2mgr.http" . }}
+            - name: "rmrroute"
+              containerPort: {{ include "common.serviceport.e2mgr.rmr.route" . }}
+            - name: "rmrdata"
+              containerPort: {{ include "common.serviceport.e2mgr.rmr.data" . }}
+          stdin: true
+          tty: true
+          securityContext:
+            privileged: {{ .Values.e2mgr.privilegedmode}}
+
+          {{- if eq .Values.e2mgr.liveness.enabled true }}
+          livenessProbe:
+            httpGet:
+              path: {{ .Values.e2mgr.liveness.api }}
+              port: {{ include "common.serviceport.e2mgr.http" . }}
+            initialDelaySeconds: {{ .Values.e2mgr.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.e2mgr.liveness.periodSeconds }}
+          {{- end }}
+          {{- if eq .Values.e2mgr.readiness.enabled true }}
+          readinessProbe:
+            httpGet:
+              path: {{ .Values.e2mgr.readiness.api }}
+              port: {{ include "common.serviceport.e2mgr.http" . }}
+            initialDelaySeconds: {{ .Values.e2mgr.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.e2mgr.liveness.periodSeconds }}
+          {{- end }}
+
+      volumes:
+        - name: local-router-file
+          configMap:
+            name: {{ include "common.configmapname.e2mgr" . }}-router-configmap
+        - name: local-configuration-file
+          configMap:
+            name: {{ include "common.configmapname.e2mgr" . }}-configuration-configmap
diff --git a/new-installer/helm/charts/nearrtric/e2mgr/templates/env.yaml b/new-installer/helm/charts/nearrtric/e2mgr/templates/env.yaml
new file mode 100644 (file)
index 0000000..213b571
--- /dev/null
@@ -0,0 +1,25 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.e2mgr" . }}-env
+data:
+   RMR_RTG_SVC: {{ include "common.serviceport.e2mgr.rmr.route" . | quote }}
+   RMR_SRC_ID: {{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}
+   #nano: {{ include "common.serviceport.e2mgr.rmr.data" . | quote }}
+
diff --git a/new-installer/helm/charts/nearrtric/e2mgr/templates/ingress-e2mgr.yaml b/new-installer/helm/charts/nearrtric/e2mgr/templates/ingress-e2mgr.yaml
new file mode 100644 (file)
index 0000000..9f72cfc
--- /dev/null
@@ -0,0 +1,15 @@
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: {{ include "common.ingressname.e2mgr" . }}
+spec:
+  rules:
+  - http:
+      paths:
+      - path: {{ include "common.kongpath.ric.e2mgr" . }}
+        pathType: Prefix
+        backend:
+          service:
+            name: {{ include "common.servicename.e2mgr.http" . }}
+            port:
+              number: {{ include "common.serviceport.e2mgr.http" . }}
diff --git a/new-installer/helm/charts/nearrtric/e2mgr/templates/service-http.yaml b/new-installer/helm/charts/nearrtric/e2mgr/templates/service-http.yaml
new file mode 100644 (file)
index 0000000..53319bc
--- /dev/null
@@ -0,0 +1,37 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.e2mgr.http" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2mgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.e2mgr.http" . }}
+      protocol: "TCP"
+      name: "http"
+      targetPort: "http" 
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2mgr" . }}
+    release: {{ .Release.Name }}
diff --git a/new-installer/helm/charts/nearrtric/e2mgr/templates/service-rmr.yaml b/new-installer/helm/charts/nearrtric/e2mgr/templates/service-rmr.yaml
new file mode 100644 (file)
index 0000000..a9e9416
--- /dev/null
@@ -0,0 +1,41 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.e2mgr.rmr" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2mgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.e2mgr.rmr.route" . }}
+      protocol: "TCP"
+      name: "rmrroute"
+      targetPort: "rmrroute"
+    - port: {{ include "common.serviceport.e2mgr.rmr.data" . }}
+      protocol: "TCP"
+      name: "rmrdata"
+      targetPort: "rmrdata"
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2mgr" . }}
+    release: {{ .Release.Name }}
diff --git a/new-installer/helm/charts/nearrtric/e2mgr/values.yaml b/new-installer/helm/charts/nearrtric/e2mgr/values.yaml
new file mode 100644 (file)
index 0000000..2927b6c
--- /dev/null
@@ -0,0 +1,53 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+
+e2mgr:
+  imagePullPolicy: IfNotPresent
+  image:
+    name: ric-plt-e2mgr
+    tag: 3.0.1
+    registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+
+  privilegedmode: false
+
+  replicaCount: 1
+
+  globalRicId:
+    plmnId: 131014
+    ricNearRtId: 556670
+
+  liveness:
+    api: v1/health
+    initialDelaySeconds: 3
+    periodSeconds: 10
+    enabled: true
+
+  readiness:
+    api: v1/health
+    initialDelaySeconds: 3
+    periodSeconds: 10
+    enabled: true
+
+  # Service ports are now defined in
+  # ric-common/Common-Template/helm/ric-common/templates/_ports.tpl file.
+  # If need to change a service port, make the code change necessary, then
+  # update the _ports.tpl file with the new port number.
diff --git a/new-installer/helm/charts/nearrtric/e2term/.helmignore b/new-installer/helm/charts/nearrtric/e2term/.helmignore
new file mode 100644 (file)
index 0000000..50af031
--- /dev/null
@@ -0,0 +1,22 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/new-installer/helm/charts/nearrtric/e2term/Chart.yaml b/new-installer/helm/charts/nearrtric/e2term/Chart.yaml
new file mode 100644 (file)
index 0000000..5feaa9a
--- /dev/null
@@ -0,0 +1,30 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#   Copyright (c) 2023 Abhijit Gadgil.
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v2
+description: Helm Chart for the E2 Termination for Near RT RIC Platform.
+name: e2term
+sources:
+  - https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/e2,general
+version: 0.1.0
+kubeVersion: " >= 1.22"
+
+dependencies:
+  - name: nearrt-ric-common
+    version: ~0.x
+    repository: "@local"
diff --git a/new-installer/helm/charts/nearrtric/e2term/resources/cleaner.sh b/new-installer/helm/charts/nearrtric/e2term/resources/cleaner.sh
new file mode 100644 (file)
index 0000000..f297fd7
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+(
+echo "$0 cleaning old files under $1 older than $2 days" > /tmp/cleaner.log
+while true; do
+  find $1 -type f -mtime +$2 -delete 
+  sleep 86400 
+done
+) >/dev/null 2>&1 & 
+disown -a
diff --git a/new-installer/helm/charts/nearrtric/e2term/resources/configfile.properties b/new-installer/helm/charts/nearrtric/e2term/resources/configfile.properties
new file mode 100644 (file)
index 0000000..140cc73
--- /dev/null
@@ -0,0 +1,20 @@
+{{- with index .Values.e2term .key }}
+Processors: pub
+pub.Class: com.att.research.basin.pubsubx.Publisher
+pub.Threads: 2
+pub.PublishURL: {{ .pizpub.publishURL }}
+pub.User: {{ .pizpub.user }}
+pub.Password: {{ .pizpub.password }}
+pub.meta.feed_id: {{ .pizpub.feedId }}
+pub.meta.version: 1
+pub.meta.splits: 1
+Factories: scanner
+scanner.Class: com.att.research.basin.pubsubx.FileScanner
+scanner.Destination: pub
+scanner.Directory: {{ .pizpub.dataRootDir }}/{{ .pizpub.scanDirectory }}
+scanner.MinAgeSeconds: 10
+scanner.ScanIntervalSeconds: 10
+scanner.DeleteOrGZip: delete
+scanner.LinkDirectory: {{ .pizpub.dataRootDir }}/{{ .pizpub.processedDirectory }}
+scanner.meta.record_count: countNewLines
+{{- end }}
diff --git a/new-installer/helm/charts/nearrtric/e2term/resources/pizpub.crontab b/new-installer/helm/charts/nearrtric/e2term/resources/pizpub.crontab
new file mode 100644 (file)
index 0000000..44b8a8e
--- /dev/null
@@ -0,0 +1,20 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+#
+{{- with index .Values.e2term .key }}
+0 * * * * find {{ .pizpub.dataRootDir }}/{{ .pizpub.processedDirectory }} -type f  -mtime +3 -delete
+{{- end }}
diff --git a/new-installer/helm/charts/nearrtric/e2term/templates/configmap-loglevel.yaml b/new-installer/helm/charts/nearrtric/e2term/templates/configmap-loglevel.yaml
new file mode 100644 (file)
index 0000000..1e4c7c6
--- /dev/null
@@ -0,0 +1,26 @@
+################################################################################
+#   Copyright (c) 2023 Alexandre Huff Intellectual Property.                   #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $topCtx :=  . }}
+{{- $common_env := .Values.common_env_variables }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.e2term" $topCtx }}-loglevel-configmap
+  namespace: {{ include "common.namespace.platform" $topCtx }}
+data:
+  {{ base $common_env.ConfigMapName }}: |
+    log-level: {{ .Values.loglevel }}
diff --git a/new-installer/helm/charts/nearrtric/e2term/templates/configmap-pizpub.yaml b/new-installer/helm/charts/nearrtric/e2term/templates/configmap-pizpub.yaml
new file mode 100644 (file)
index 0000000..63ea7d8
--- /dev/null
@@ -0,0 +1,34 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $topCtx :=  . }}
+{{- range keys .Values.e2term }}
+{{- $key := . }}
+{{- $_ := set $topCtx "key" $key }}
+{{- with index $topCtx.Values.e2term . }}
+
+{{ if .pizpub.enabled }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.e2term" $topCtx }}-pizpub-{{ $key }}
+  namespace: {{ include "common.namespace.platform" $topCtx }}
+data:
+{{ tpl ($topCtx.Files.Glob "resources/*").AsConfig $topCtx | indent 2 }}
+
+{{ end }}
+{{- end }}
+{{- end }}
diff --git a/new-installer/helm/charts/nearrtric/e2term/templates/configmap.yaml b/new-installer/helm/charts/nearrtric/e2term/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..38fe570
--- /dev/null
@@ -0,0 +1,112 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $topCtx :=  . }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.e2term" $topCtx }}-router-configmap
+  namespace: {{ include "common.namespace.platform" $topCtx }}
+data:
+  rmr_verbose: |
+    0
+  router.txt: |
+    newrt|start
+    rte|1080|{{ include "common.servicename.e2mgr.rmr" $topCtx }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2mgr.rmr.data" $topCtx }}
+    rte|1090|
+{{- $frist := true -}}
+{{- range keys .Values.e2term -}}
+{{- if $frist -}}
+{{- $frist = false -}}
+{{- else -}}
+;
+{{- end -}}
+{{ include "common.servicename.e2term.rmr" $topCtx }}-{{ . }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2term.rmr.data" $topCtx }}
+{{- end }}
+    rte|1100|{{ include "common.servicename.e2mgr.rmr" $topCtx }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2mgr.rmr.data" $topCtx }}
+    rte|10020|{{ include "common.servicename.e2mgr.rmr" $topCtx }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2mgr.rmr.data" $topCtx }}
+    rte|10060|
+{{- $frist := true -}}
+{{- range keys .Values.e2term -}}
+{{- if $frist -}}
+{{- $frist = false -}}
+{{- else -}}
+;
+{{- end -}}
+{{ include "common.servicename.e2term.rmr" $topCtx }}-{{ . }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2term.rmr.data" $topCtx }}
+{{- end }}
+    rte|10061|{{ include "common.servicename.e2mgr.rmr" $topCtx }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2mgr.rmr.data" $topCtx }}
+    rte|10062|{{ include "common.servicename.e2mgr.rmr" $topCtx }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2mgr.rmr.data" $topCtx }}
+    rte|10030|{{ include "common.servicename.e2mgr.rmr" $topCtx }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2mgr.rmr.data" $topCtx }}
+    rte|10070|{{ include "common.servicename.e2mgr.rmr" $topCtx }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2mgr.rmr.data" $topCtx }}
+    rte|10071|{{ include "common.servicename.e2mgr.rmr" $topCtx }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2mgr.rmr.data" $topCtx }}
+    rte|10080|{{ include "common.servicename.e2mgr.rmr" $topCtx }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2mgr.rmr.data" $topCtx }}
+    rte|10360|
+{{- $frist := true -}}
+{{- range keys .Values.e2term -}}
+{{- if $frist -}}
+{{- $frist = false -}}
+{{- else -}}
+;
+{{- end -}}
+{{ include "common.servicename.e2term.rmr" $topCtx }}-{{ . }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2term.rmr.data" $topCtx }}
+{{- end }}
+    rte|10361|{{ include "common.servicename.e2mgr.rmr" $topCtx }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2mgr.rmr.data" $topCtx }}
+    rte|10362|{{ include "common.servicename.e2mgr.rmr" $topCtx }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2mgr.rmr.data" $topCtx }}
+    rte|10370|{{ include "common.servicename.e2mgr.rmr" $topCtx }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2mgr.rmr.data" $topCtx }}
+    rte|10371|
+{{- $frist := true -}}
+{{- range keys .Values.e2term -}}
+{{- if $frist -}}
+{{- $frist = false -}}
+{{- else -}}
+;
+{{- end -}}
+{{ include "common.servicename.e2term.rmr" $topCtx }}-{{ . }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2term.rmr.data" $topCtx }}
+{{- end }}
+    rte|12010|
+{{- $frist := true -}}
+{{- range keys .Values.e2term -}}
+{{- if $frist -}}
+{{- $frist = false -}}
+{{- else -}}
+;
+{{- end -}}
+{{ include "common.servicename.e2term.rmr" $topCtx }}-{{ . }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2term.rmr.data" $topCtx }}
+{{- end }}
+    rte|12020|
+{{- $frist := true -}}
+{{- range keys .Values.e2term -}}
+{{- if $frist -}}
+{{- $frist = false -}}
+{{- else -}}
+;
+{{- end -}}
+{{ include "common.servicename.e2term.rmr" $topCtx }}-{{ . }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.e2term.rmr.data" $topCtx }}
+{{- end }}
+    rte|20001|{{ include "common.servicename.a1mediator.rmr" $topCtx }}.{{ include "common.namespace.platform" $topCtx }}:{{ include "common.serviceport.a1mediator.rmr.data" $topCtx }}
+    rte|12011|service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560;service-admission-ctrl-xapp-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560
+    rte|12050|service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560;service-admission-ctrl-xapp-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560
+    rte|12012|service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560;service-admission-ctrl-xapp-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560
+    rte|12021|service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560;service-admission-ctrl-xapp-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560
+    rte|12022|service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560;service-admission-ctrl-xapp-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560
+    rte|12041|service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560;service-admission-ctrl-xapp-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560
+    rte|12042|service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560;service-admission-ctrl-xapp-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560
+    rte|12050|service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560;service-admission-ctrl-xapp-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560
+    rte|20000|service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560;service-admission-ctrl-xapp-rmr.{{ include "common.namespace.xapp" $topCtx }}:4560
+    newrt|end
+
diff --git a/new-installer/helm/charts/nearrtric/e2term/templates/deployment.yaml b/new-installer/helm/charts/nearrtric/e2term/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..2ecf90b
--- /dev/null
@@ -0,0 +1,217 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $topCtx :=  . }}
+{{- $health := .Values.health }}
+{{- $common_env := .Values.common_env_variables }}
+{{- range keys .Values.e2term }}
+{{- $key := . }}
+{{- with index $topCtx.Values.e2term . }}
+
+{{- $imagectx := dict "ctx" $topCtx "defaultregistry" .image.registry }}
+{{- $pullpolicyctx := dict "ctx" $topCtx "defaultpullpolicy" .imagePullPolicy }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "common.deploymentname.e2term" $topCtx }}-{{ $key }}
+  namespace: {{ include "common.namespace.platform" $topCtx }}
+  labels:
+    app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }}
+    chart: {{ $topCtx.Chart.Name }}-{{ $topCtx.Chart.Version | replace "+" "_" }}
+    release: {{ $topCtx.Release.Name }}
+    heritage: {{ $topCtx.Release.Service }}
+spec:
+  replicas: {{ .replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }}
+      release: {{ $topCtx.Release.Name }}
+  template:
+    metadata:
+        {{- if $.Values.global }}
+          {{- if $.Values.global.danm_networks }}
+            {{- $networklist := list }}
+            {{- range $network := $.Values.global.danm_networks }}
+              {{- if $network.tenants }}
+                {{- if $network.tenants.e2term }}
+                  {{- if (hasKey $network.tenants.e2term $key) }}
+                    {{- $networklist = append $networklist $network }}
+                  {{- end }}
+                {{- end }}
+              {{- end }}
+            {{- end }}
+            {{- if $networklist }}
+      annotations:
+        danm.k8s.io/interfaces: |
+          [
+            {{- range $network := $networklist }}
+              {{- printf "\n            {\"clusterNetwork\": \"%s\"" $network.name }}
+              {{- with index $network.tenants.e2term $key }}
+              {{- if .ip }}
+                {{- printf ", \"ip\": \"%s\"" .ip }}
+              {{- else }}
+                {{- printf ", \"ip\": \"dynamic\"" }}
+              {{- end }}
+              {{- if .ip6 }}
+                {{- printf ", \"ip6\": \"%s\"" .ip6 }}
+              {{- end }}
+              {{- if .proutes }}
+                {{- printf ", \"proutes\": {" }}
+                {{- range $subnet, $gw := .proutes }}
+                  {{- if eq $subnet ( first ( keys .proutes ))}}
+                    {{- printf "\"%s\": \"%s\"" $subnet $gw }}
+                  {{- else }}
+                    {{- printf ", \"%s\": \"%s\"" $subnet $gw }}
+                  {{- end }}
+                {{- end }}
+                {{- printf "}" }}
+              {{- end }}
+              {{- end }}
+              {{- if ne $network.name (last $networklist).name }}
+              {{- printf "}," }}
+              {{- else }}
+              {{- printf "}" }}
+              {{- end }}
+            {{- end }}
+          ]
+            {{- end }}
+          {{- end }}
+        {{- end }}
+      labels:
+        app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }}
+        release: {{ $topCtx.Release.Name }}
+    spec:
+      hostname: {{ include "common.name.e2term" $topCtx }}-{{ $key }}
+      hostNetwork: {{ .hostnetworkmode }}
+      dnsPolicy: ClusterFirstWithHostNet
+      imagePullSecrets:
+        - name: {{ include "common.dockerregistry.credential" $imagectx }}
+      {{- with .nodeselector }}
+      nodeSelector: {{ toYaml . | trim | nindent 8 -}}
+      {{- end }}
+      containers:
+        - name: {{ include "common.containername.e2term" $topCtx }}
+          image: {{ include "common.dockerregistry.url" $imagectx }}/{{ .image.name }}:{{ .image.tag }}
+          imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
+          volumeMounts:
+          - mountPath: /opt/e2/router.txt
+            name: local-router-file
+            subPath: router.txt
+          - mountPath: /tmp/rmr_verbose
+            name: local-router-file
+            subPath: rmr_verbose
+          - mountPath: {{ $common_env.ConfigMapName }}
+            name: local-loglevel-file
+            subPath: log-level
+{{ if .pizpub.enabled }}
+          - mountPath: "{{ .env.messagecollectorfile }}"
+            name: vol-shared
+            readOnly: false
+            subPath: "{{ .pizpub.scanDirectory }}"
+{{ else }}
+          - mountPath: "{{ .env.messagecollectorfile }}"
+            name: vol-shared
+            readOnly: false
+{{ end }}
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.e2term" $topCtx }}-env-{{ $key }}
+          env:
+            - name: SYSTEM_NAME
+              value: "SEP"
+            - name: CONFIG_MAP_NAME
+              value: "{{ $common_env.ConfigMapName }}"
+            - name: HOST_NAME
+              valueFrom:
+               fieldRef:
+                fieldPath: spec.nodeName
+            - name: SERVICE_NAME
+              value: "{{ $common_env.ServiceName }}"
+            - name: CONTAINER_NAME
+              value: "{{ include "common.containername.e2term" $topCtx }}"
+            - name: POD_NAME
+              valueFrom:
+               fieldRef:
+                fieldPath: metadata.name
+          ports:
+            - name: "rmrroute-{{ $key }}"
+              containerPort: {{ include "common.serviceport.e2term.rmr.route" $topCtx }}
+            - name: "rmrdata-{{ $key }}"
+              containerPort: {{ include "common.serviceport.e2term.rmr.data" $topCtx }}
+            - name: "sctp-{{ $key }}"
+              containerPort: 36422
+              protocol: SCTP
+            - name: "prmts-{{ $key }}"
+              containerPort: {{ include "common.serviceport.e2term.prometheus" $topCtx }}
+          stdin: true
+          tty: true
+          securityContext:
+            privileged: {{ .privilegedmode }}
+          {{- if eq $health.liveness.enabled true }}
+          readinessProbe:
+            exec:
+              command: [ "/bin/sh", "-c", "{{ $health.readiness.command }}:{{ include "common.serviceport.e2term.rmr.data" . }}" ]
+            initialDelaySeconds: {{ $health.readiness.initialDelaySeconds }}
+            periodSeconds: {{ $health.readiness.periodSeconds }}
+          {{- end }}
+          {{- if eq $health.liveness.enabled true }}
+          livenessProbe:
+            exec:
+              command: [ "/bin/sh", "-c", "{{ $health.liveness.command }}:{{ include "common.serviceport.e2term.rmr.data" . }}" ]
+            initialDelaySeconds: {{ $health.liveness.initialDelaySeconds }}
+            periodSeconds: {{ $health.liveness.periodSeconds }}
+          {{- end }}
+{{ if .pizpub.enabled }}
+        - name: {{ include "common.containername.e2term" $topCtx }}-pizpub
+          {{- $pizpubimagectx := dict "ctx" $topCtx "defaultregistry" .pizpub.image.registry }}
+          image: {{ include "common.dockerregistry.url" $pizpubimagectx }}/{{ .pizpub.image.name }}:{{ .pizpub.image.tag }}
+          imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
+          volumeMounts:
+          - mountPath: /etc/localtime
+            name: localtime
+            readOnly: true
+          - mountPath: "{{ .pizpub.dataRootDir }}"
+            name: vol-shared
+            readOnly: false
+          - name: pizpub-config
+            mountPath: /opt/app/config/conf/
+          lifecycle:
+            postStart:
+              exec:
+                command: ["/bin/sh", "/opt/app/config/conf/cleaner.sh", "{{ .pizpub.dataRootDir }}/{{ .pizpub.processedDirectory }}", "3"]
+{{ end }}
+      volumes:
+        - name: local-router-file
+          configMap:
+            name: {{ include "common.configmapname.e2term" $topCtx }}-router-configmap
+        - name: local-loglevel-file
+          configMap:
+            name: {{ include "common.configmapname.e2term" $topCtx }}-loglevel-configmap
+{{ if .pizpub.enabled }}
+        - name: localtime
+          hostPath:
+            path: /etc/localtime
+        - name: pizpub-config
+          configMap:
+            name: {{ include "common.configmapname.e2term" $topCtx }}-pizpub-{{ $key }}
+{{ end }}
+        - name: vol-shared
+          persistentVolumeClaim:
+            claimName: {{ include "common.pvcname.e2term" $topCtx }}-{{ $key }}
+
+{{- end }}
+{{- end }}
diff --git a/new-installer/helm/charts/nearrtric/e2term/templates/env.yaml b/new-installer/helm/charts/nearrtric/e2term/templates/env.yaml
new file mode 100644 (file)
index 0000000..3d11225
--- /dev/null
@@ -0,0 +1,37 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $topCtx :=  . }}
+{{- range keys .Values.e2term }}
+{{- $key := . }}
+{{- with index $topCtx.Values.e2term . }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.e2term" $topCtx }}-env-{{ $key }}
+data:
+  RMR_SRC_ID: {{ include "common.servicename.e2term.rmr" $topCtx }}-{{ $key }}.{{ include "common.namespace.platform" $topCtx }}
+  RMR_RTG_SVC: {{ include "common.serviceport.e2term.rmr.route" $topCtx | quote }}
+  RMR_SEED_RT: "router.txt"
+  RMR_VCTL_FILE: "/tmp/rmr_verbose"
+  sctp: {{ include "common.serviceport.e2term.sctp" $topCtx | quote }}
+  nano: {{ include "common.serviceport.e2term.rmr.data" $topCtx | quote }}
+  print: "{{ .env.print }}"
+  volume: "{{ .env.messagecollectorfile }}"
+
+{{- end }}
+{{- end }}
diff --git a/new-installer/helm/charts/nearrtric/e2term/templates/pv.yaml b/new-installer/helm/charts/nearrtric/e2term/templates/pv.yaml
new file mode 100644 (file)
index 0000000..cf7f970
--- /dev/null
@@ -0,0 +1,40 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################1
+{{- $topCtx :=  . }}
+{{- range keys .Values.e2term }}
+{{- $key := . }}
+{{- with index $topCtx.Values.e2term . }}
+
+{{if eq .storageClassName "local-storage" }}
+---
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+  name: {{ include "common.pvname.e2term" $topCtx }}-{{ $key }}
+  labels:
+    type: local
+spec:
+  storageClassName: {{ .storageClassName }}
+  capacity:
+    storage: {{ .dataVolSize }}
+  accessModes:
+    - ReadWriteOnce
+  hostPath:
+    path: /mnt/{{ include "common.pvname.e2term" $topCtx }}-{{ $key }}
+{{ end }}
+
+{{- end }}
+{{- end }}
diff --git a/new-installer/helm/charts/nearrtric/e2term/templates/pvc.yaml b/new-installer/helm/charts/nearrtric/e2term/templates/pvc.yaml
new file mode 100644 (file)
index 0000000..2698d72
--- /dev/null
@@ -0,0 +1,34 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $topCtx :=  . }}
+{{- range keys .Values.e2term }}
+{{- $key := . }}
+{{- with index $topCtx.Values.e2term . }}
+---
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+  name: {{ include "common.pvcname.e2term" $topCtx }}-{{ $key }}
+spec:
+  accessModes:
+    - ReadWriteOnce
+  resources:
+    requests:
+      storage: {{ .dataVolSize }}
+  storageClassName: {{ .storageClassName }}
+  #volumeName: {{ include "common.pvname.e2term" $topCtx }}
+{{- end }}
+{{- end }}
diff --git a/new-installer/helm/charts/nearrtric/e2term/templates/service-prometheus.yaml b/new-installer/helm/charts/nearrtric/e2term/templates/service-prometheus.yaml
new file mode 100644 (file)
index 0000000..1810e81
--- /dev/null
@@ -0,0 +1,47 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $topCtx :=  . }} 
+{{- range keys .Values.e2term }} 
+{{- $key := . }} 
+{{- with index $topCtx.Values.e2term . }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.e2term.prometheus" $topCtx }}-{{ $key }}
+  namespace: {{ include "common.namespace.platform" $topCtx }}
+  labels:
+    app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }}
+    chart: {{ $topCtx.Chart.Name }}-{{ $topCtx.Chart.Version | replace "+" "_" }}
+    release: {{ $topCtx.Release.Name }}
+    heritage: {{ $topCtx.Release.Service }}
+  annotations:
+    prometheus.io/scrape: "true"
+    prometheus.io/path: "/metrics"
+    prometheus.io/port: {{ include "common.serviceport.e2term.prometheus" $topCtx | quote }}
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.e2term.prometheus" $topCtx }}
+      protocol: "TCP"
+      targetPort: "prmts-{{ $key }}"
+      name: "prmts-{{ $key }}"
+  selector:
+      app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }}
+      release: {{ $topCtx.Release.Name }}
+{{- end }}
+{{- end }}
diff --git a/new-installer/helm/charts/nearrtric/e2term/templates/service-rmr.yaml b/new-installer/helm/charts/nearrtric/e2term/templates/service-rmr.yaml
new file mode 100644 (file)
index 0000000..707856c
--- /dev/null
@@ -0,0 +1,47 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $topCtx :=  . }} 
+{{- range keys .Values.e2term }} 
+{{- $key := . }} 
+{{- with index $topCtx.Values.e2term . }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.e2term.rmr" $topCtx }}-{{ $key }}
+  namespace: {{ include "common.namespace.platform" $topCtx }}
+  labels:
+    app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }}
+    chart: {{ $topCtx.Chart.Name }}-{{ $topCtx.Chart.Version | replace "+" "_" }}
+    release: {{ $topCtx.Release.Name }}
+    heritage: {{ $topCtx.Release.Service }} 
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.e2term.rmr.route" $topCtx }}
+      protocol: "TCP"
+      targetPort: "rmrroute-{{ $key }}"
+      name: "rmrroute-{{ $key }}"
+    - port: {{ include "common.serviceport.e2term.rmr.data" $topCtx }}
+      protocol: "TCP"
+      targetPort: "rmrdata-{{ $key }}"
+      name: "rmrdata-{{ $key }}"
+  selector:
+      app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }}
+      release: {{ $topCtx.Release.Name }}
+{{- end }}
+{{- end }}
diff --git a/new-installer/helm/charts/nearrtric/e2term/templates/service-sctp.yaml b/new-installer/helm/charts/nearrtric/e2term/templates/service-sctp.yaml
new file mode 100644 (file)
index 0000000..d67ca22
--- /dev/null
@@ -0,0 +1,44 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $topCtx :=  . }} 
+{{- range $index, $element := keys .Values.e2term }} 
+{{- $key := . }}
+{{- with index $topCtx.Values.e2term . }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.e2term.sctp" $topCtx }}-{{ $key }} 
+  namespace: {{ include "common.namespace.platform" $topCtx }}
+  labels:
+    app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }}
+    chart: {{ $topCtx.Chart.Name }}-{{ $topCtx.Chart.Version | replace "+" "_" }}
+    release: {{ $topCtx.Release.Name }}
+    heritage: {{ $topCtx.Release.Service }} 
+spec:
+  type: NodePort
+  ports:
+    - port: {{ include "common.serviceport.e2term.sctp" $topCtx }}
+      nodePort: {{ add 32222 $index }}
+      protocol: "SCTP"
+      targetPort: {{ include "common.serviceport.e2term.sctp" $topCtx }}
+      name: "sctp-{{ $key }}"
+  selector:
+      app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }}
+      release: {{ $topCtx.Release.Name }}
+{{- end }}
+{{- end }}
diff --git a/new-installer/helm/charts/nearrtric/e2term/values.yaml b/new-installer/helm/charts/nearrtric/e2term/values.yaml
new file mode 100644 (file)
index 0000000..ab2681e
--- /dev/null
@@ -0,0 +1,77 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+
+e2term:
+  alpha:
+    imagePullPolicy: IfNotPresent
+    image:
+      name: ric-plt-e2
+      tag: 3.0.1
+      registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+
+    privilegedmode: false
+    hostnetworkmode: false
+
+    replicaCount: 1
+    env:
+      print: "1"
+      messagecollectorfile: "/data/outgoing/"
+    # Service ports are now defined in
+    # ric-common/Common-Template/helm/ric-common/templates/_ports.tpl file.
+    # If need to change a service port, make the code change necessary, then
+    # update the _ports.tpl file with the new port number.
+
+    dataVolSize: 100Mi
+    storageClassName: local-storage
+    #storageClassName: ric-storage-class
+
+    pizpub:
+      enabled: false
+    #  publishURL: ""
+    #  user: ""
+    #  password: ""
+    #  feedId: ""
+    #  dataRootDir: ""
+    #  scanDirectory: ""
+    #  processedDirectory: ""
+    #  image:
+    #    name: ""
+    #    tag: ""
+    #    registry: ""
+
+health:
+    liveness:
+      command: "ip=`hostname -i`;export RMR_SRC_ID=$ip;/opt/e2/rmr_probe -h $ip"
+      initialDelaySeconds: 10
+      periodSeconds: 10
+      enabled: true
+
+    readiness:
+      command: "ip=`hostname -i`;export RMR_SRC_ID=$ip;/opt/e2/rmr_probe -h $ip"
+      initialDelaySeconds: 120
+      periodSeconds: 60
+      enabled: true
+
+loglevel: 3
+
+common_env_variables:
+  ConfigMapName: "/etc/config/log-level"
+  ServiceName: "RIC_E2_TERM"
diff --git a/new-installer/helm/charts/nearrtric/jaegeradapter/.helmignore b/new-installer/helm/charts/nearrtric/jaegeradapter/.helmignore
new file mode 100644 (file)
index 0000000..d29b399
--- /dev/null
@@ -0,0 +1,37 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#   Copyright (c) 2019 Nokia.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/new-installer/helm/charts/nearrtric/jaegeradapter/Chart.yaml b/new-installer/helm/charts/nearrtric/jaegeradapter/Chart.yaml
new file mode 100644 (file)
index 0000000..80ba3ed
--- /dev/null
@@ -0,0 +1,27 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#   Copyright (c) 2023 Abhijit Gadgil.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+apiVersion: v2
+description: Helm chart for Jaeger Adapter for Near RT RIC Platform.
+name: jaegeradapter
+sources:
+  - https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/jaegeradapter,general
+version: 0.1.0
+kubeVersion: " >= 1.22"
+
+dependencies:
+  - name: nearrt-ric-common
+    version: ~0.x
+    repository: "@local"
diff --git a/new-installer/helm/charts/nearrtric/jaegeradapter/templates/agent-service.yaml b/new-installer/helm/charts/nearrtric/jaegeradapter/templates/agent-service.yaml
new file mode 100644 (file)
index 0000000..13b44cb
--- /dev/null
@@ -0,0 +1,43 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.jaegeradapter.agent" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.jaegeradapter" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:
+    - name: {{ include "common.portname.jaegeradapter.zipkincompact" . }}
+      port: {{ include "common.serviceport.jaegeradapter.zipkincompact" . }}
+      protocol: UDP
+      targetPort: {{ include "common.serviceport.jaegeradapter.zipkincompact" . }}
+    - name: {{ include "common.portname.jaegeradapter.jaegercompact" . }} 
+      port: {{ include "common.serviceport.jaegeradapter.jaegercompact" . }} 
+      protocol: UDP
+      targetPort: {{ include "common.serviceport.jaegeradapter.jaegercompact" . }} 
+    - name: {{ include "common.portname.jaegeradapter.jaegerbinary" . }}
+      port: {{ include "common.serviceport.jaegeradapter.jaegerbinary" . }}
+      protocol: UDP
+      targetPort: {{ include "common.serviceport.jaegeradapter.jaegerbinary" . }}
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.jaegeradapter" . }}
+    release: {{ .Release.Name }}
+
diff --git a/new-installer/helm/charts/nearrtric/jaegeradapter/templates/collector-service.yaml b/new-installer/helm/charts/nearrtric/jaegeradapter/templates/collector-service.yaml
new file mode 100644 (file)
index 0000000..130055c
--- /dev/null
@@ -0,0 +1,43 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.jaegeradapter.collector" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.jaegeradapter" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:
+    - name: {{ include "common.portname.jaegeradapter.jaegerhttpt" . }}
+      port: {{ include "common.serviceport.jaegeradapter.jaegerhttpt" . }}
+      protocol: TCP
+      targetPort: {{ include "common.serviceport.jaegeradapter.jaegerhttpt" . }}
+    - name: {{ include "common.portname.jaegeradapter.jaegerhttp" . }} 
+      port: {{ include "common.serviceport.jaegeradapter.jaegerhttp" . }} 
+      protocol: TCP
+      targetPort: {{ include "common.serviceport.jaegeradapter.jaegerhttp" . }} 
+    - name: {{ include "common.portname.jaegeradapter.zipkinhttp" . }}
+      port: {{ include "common.serviceport.jaegeradapter.zipkinhttp" . }}
+      protocol: TCP
+      targetPort: {{ include "common.serviceport.jaegeradapter.zipkinhttp" . }}
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.jaegeradapter" . }}
+    release: {{ .Release.Name }}
+
diff --git a/new-installer/helm/charts/nearrtric/jaegeradapter/templates/deployment.yaml b/new-installer/helm/charts/nearrtric/jaegeradapter/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..9cdedfd
--- /dev/null
@@ -0,0 +1,85 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+{{- $imagectx := dict "ctx" . "defaultregistry" .Values.jaegeradapter.image.registry }}
+{{- $pullpolicyctx := dict "ctx" . "defaultpullpolicy" .Values.jaegeradapter.imagePullPolicy }}
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "common.deploymentname.jaegeradapter" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.jaegeradapter" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.jaegeradapter.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.jaegeradapter" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      {{- if .Values.jaegeradapter.annotations }}
+      annotations:
+        {{- .Values.jaegeradapter.annotations | nindent 8 -}}
+      {{ end }}
+      labels:
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.jaegeradapter" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.jaegeradapter" . }}
+      imagePullSecrets:
+        - name: {{ include "common.dockerregistry.credential" $imagectx }}
+      containers:
+        - name: {{ include "common.containername.jaegeradapter" . }}
+          image: {{ include "common.dockerregistry.url" $imagectx }}/{{ .Values.jaegeradapter.image.name }}:{{ .Values.jaegeradapter.image.tag }}
+          imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.jaegeradapter" . }}
+          ports:
+            - name: {{ include "common.portname.jaegeradapter.zipkincompact" . }} 
+              containerPort: {{ include "common.serviceport.jaegeradapter.zipkincompact" . }}
+              protocol: UDP
+            - name: {{ include "common.portname.jaegeradapter.jaegercompact" . }}  
+              containerPort: {{ include "common.serviceport.jaegeradapter.jaegercompact" . }}
+              protocol: UDP
+            - name: {{ include "common.portname.jaegeradapter.jaegerbinary" . }} 
+              containerPort: {{ include "common.serviceport.jaegeradapter.jaegerbinary" . }}
+              protocol: UDP
+            - name: {{ include "common.portname.jaegeradapter.httpquery" . }} 
+              containerPort: {{ include "common.serviceport.jaegeradapter.httpquery" . }}
+              protocol: TCP
+            - name: {{ include "common.portname.jaegeradapter.httpconfig" . }} 
+              containerPort: {{ include "common.serviceport.jaegeradapter.httpconfig" . }}
+              protocol: TCP
+            - name: {{ include "common.portname.jaegeradapter.zipkinhttp" . }} 
+              containerPort: {{ include "common.serviceport.jaegeradapter.zipkinhttp" . }}
+              protocol: TCP
+            - name: {{ include "common.portname.jaegeradapter.jaegerhttp" . }} 
+              containerPort: {{ include "common.serviceport.jaegeradapter.jaegerhttp" . }}
+              protocol: TCP
+            - name: {{ include "common.portname.jaegeradapter.jaegerhttpt" . }}
+              containerPort: {{ include "common.serviceport.jaegeradapter.jaegerhttpt" . }}
+              protocol: TCP
+          livenessProbe:
+            httpGet:
+              path: /
+              port: {{ include "common.serviceport.jaegeradapter.httpquery" . }}
+          readinessProbe:
+            httpGet:
+              path: /
+              port: {{ include "common.serviceport.jaegeradapter.httpquery" . }}
+            initialDelaySeconds: 5
diff --git a/new-installer/helm/charts/nearrtric/jaegeradapter/templates/env.yaml b/new-installer/helm/charts/nearrtric/jaegeradapter/templates/env.yaml
new file mode 100644 (file)
index 0000000..e21b8d9
--- /dev/null
@@ -0,0 +1,11 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.jaegeradapter" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+data:
+  TRACING_ENABLED: "0"
+  TRACING_JAEGER_SAMPLER_TYPE: "const"
+  TRACING_JAEGER_SAMPLER_PARAM: "1"
+  TRACING_JAEGER_AGENT_ADDR: {{ include "common.servicename.jaegeradapter.agent" . }}.{{ include "common.namespace.platform" . }}
+  TRACING_JAEGER_LOG_LEVEL: "error"
diff --git a/new-installer/helm/charts/nearrtric/jaegeradapter/templates/query-service.yaml b/new-installer/helm/charts/nearrtric/jaegeradapter/templates/query-service.yaml
new file mode 100644 (file)
index 0000000..dc0f6ba
--- /dev/null
@@ -0,0 +1,35 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.jaegeradapter.query" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.jaegeradapter" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:
+  - name: {{ include "common.portname.jaegeradapter.httpquery" . }}
+    port: {{ include "common.serviceport.jaegeradapter.httpquery" . }}
+    protocol: TCP
+    targetPort: {{ include "common.serviceport.jaegeradapter.httpquery" . }}
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.jaegeradapter" . }}
+    release: {{ .Release.Name }}
+
diff --git a/new-installer/helm/charts/nearrtric/jaegeradapter/values.yaml b/new-installer/helm/charts/nearrtric/jaegeradapter/values.yaml
new file mode 100644 (file)
index 0000000..e17bf05
--- /dev/null
@@ -0,0 +1,34 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+# Default values for jaeger-all-in-one.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+jaegeradapter:
+  replicaCount: 1
+
+  imagePullPolicy: IfNotPresent
+  image:
+    name: jaegertracing/all-in-one
+    tag: 1.12
+    registry: "docker.io" 
+
+  nameOverride: ""
+  fullnameOverride: ""
+
+  ingress:
+    enabled: false
+    annotations: {}
+    tls: []
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/Chart.yaml b/new-installer/helm/charts/nearrtric/nearrt-ric-common/Chart.yaml
new file mode 100644 (file)
index 0000000..e52ff60
--- /dev/null
@@ -0,0 +1,22 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v2
+description: Common templates for inclusion in other charts for the Near RT RIC platform.
+name: nearrt-ric-common
+version: 0.1.0
+kubeVersion: " >= 1.22"
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_a1mediator.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_a1mediator.tpl
new file mode 100644 (file)
index 0000000..ec4740f
--- /dev/null
@@ -0,0 +1,66 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.name.a1mediator" -}}
+  {{- printf "a1mediator" -}}
+{{- end -}}
+
+{{- define "common.fullname.a1mediator" -}}
+  {{- $name := ( include "common.name.a1mediator" . ) -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.a1mediator" -}}
+  {{- $name := ( include "common.fullname.a1mediator" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.a1mediator" -}}
+  {{- $name := ( include "common.fullname.a1mediator" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.a1mediator" -}}
+  {{- $name := ( include "common.fullname.a1mediator" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceaccountname.a1mediator" -}}
+  {{- $name := ( include "common.fullname.a1mediator" . ) -}}
+  {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.ingressname.a1mediator" -}}
+  {{- $name := ( include "common.fullname.a1mediator" . ) -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.kongpath.ric.a1mediator" -}}/a1mediator{{- end -}}
+
+{{- define "common.servicename.a1mediator.rmr" -}}
+  {{- $name := ( include "common.fullname.a1mediator" . ) -}}
+  {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.a1mediator.http" -}}
+  {{- $name := ( include "common.fullname.a1mediator" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceport.a1mediator.rmr.data" -}}4562{{- end -}}
+{{- define "common.serviceport.a1mediator.rmr.route" -}}4561{{- end -}}
+{{- define "common.serviceport.a1mediator.http" -}}10000{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_alarmmanager.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_alarmmanager.tpl
new file mode 100644 (file)
index 0000000..a172e5e
--- /dev/null
@@ -0,0 +1,81 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.name.alarmmanager" -}}
+  {{- printf "alarmmanager" -}}
+{{- end -}}
+
+{{- define "common.fullname.alarmmanager" -}}
+  {{- $name := ( include "common.name.alarmmanager" . ) -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.alarmmanager" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.alarmmanager" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.alarmmanager" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceaccountname.alarmmanager" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
+  {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.ingressname.alarmmanager" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- define "common.kongpath.ric.alarmmanager" -}}/alarmmanager{{- end -}}
+
+{{- define "common.servicename.alarmmanager.rmr" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
+  {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.alarmmanager.http" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.alarmmanager.rest" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
+  {{- printf "service-%s-rest" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.pvname.alarmmanager" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
+  {{- printf "pv-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.pvcname.alarmmanager" -}}
+  {{- $name := ( include "common.fullname.alarmmanager" . ) -}}
+  {{- printf "pvc-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceport.alarmmanager.rmr.data" -}}4560{{- end -}}
+{{- define "common.serviceport.alarmmanager.rmr.route" -}}4561{{- end -}}
+{{- define "common.serviceport.alarmmanager.http" -}}8080{{- end -}}
+{{- define "common.serviceport.alarmmanager.rest" -}}8088{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_appmgr.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_appmgr.tpl
new file mode 100644 (file)
index 0000000..954ba3d
--- /dev/null
@@ -0,0 +1,74 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.name.appmgr" -}}
+  {{- printf "appmgr" -}}
+{{- end -}}
+
+
+{{- define "common.fullname.appmgr" -}}
+  {{- $name := ( include "common.name.appmgr" . ) -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.appmgr" -}}
+  {{- $name := ( include "common.fullname.appmgr" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.appmgr" -}}
+  {{- $name := ( include "common.fullname.appmgr" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.appmgr" -}}
+  {{- $name := ( include "common.fullname.appmgr" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "common.serviceaccountname.appmgr" -}}
+  {{- $name := ( include "common.fullname.appmgr" . ) -}}
+  {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.ingressname.appmgr" -}}
+  {{- $name := ( include "common.fullname.appmgr" . ) -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.kongpath.ric.appmgr" -}}/appmgr{{- end -}}
+
+{{- define "common.servicename.appmgr.rmr" -}}
+  {{- $name := ( include "common.fullname.appmgr" . ) -}}
+  {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.appmgr.http" -}}
+  {{- $name := ( include "common.fullname.appmgr" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.secretname.appmgr" -}}
+  {{- $name := ( include "common.fullname.appmgr" . ) -}}
+  {{- printf "secret-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceport.appmgr.rmr.data" -}}4560{{- end -}}
+{{- define "common.serviceport.appmgr.rmr.route" -}}4561{{- end -}}
+{{- define "common.serviceport.appmgr.http" -}}8080{{- end -}}
+
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_chart.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_chart.tpl
new file mode 100644 (file)
index 0000000..54875fd
--- /dev/null
@@ -0,0 +1,20 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+
+{{- define "common.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_context_locator.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_context_locator.tpl
new file mode 100644 (file)
index 0000000..8719552
--- /dev/null
@@ -0,0 +1,33 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "locate" -}}
+  {{- $ctx := .ctx }}
+  {{- $keylist := .keylist }}
+  {{- $currentkey := first $keylist -}}
+  {{- $restkeys := rest $keylist -}}
+  {{- if empty $restkeys -}}
+    {{- $result := index $ctx $currentkey -}}
+    {{- if not (empty $result) -}}
+      {{- $result -}}
+    {{- end -}}
+  {{- else -}}
+    {{- with index $ctx $currentkey }}
+      {{- $newctx := dict "ctx" . "keylist" $restkeys -}}
+      {{- include "locate" $newctx -}}
+    {{- end -}}
+  {{- end -}}
+{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_dbaas.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_dbaas.tpl
new file mode 100644 (file)
index 0000000..9f3daca
--- /dev/null
@@ -0,0 +1,58 @@
+################################################################################
+#   Copyright (c) 2020 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.name.dbaas" -}}
+  {{- printf "dbaas" -}}
+{{- end -}}
+
+{{- define "common.fullname.dbaas" -}}
+  {{- $name := ( include "common.name.dbaas" . ) -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.dbaas" -}}
+  {{- $name := ( include "common.fullname.dbaas" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.dbaas" -}}
+  {{- $name := ( include "common.fullname.dbaas" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.statefulsetname.dbaas" -}}
+  {{- $name := ( include "common.fullname.dbaas" . ) -}}
+  {{- printf "statefulset-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.dbaas" -}}
+  {{- $name := ( include "common.fullname.dbaas" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceaccountname.dbaas" -}}
+  {{- $name := ( include "common.fullname.dbaas" . ) -}}
+  {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.dbaas.tcp" -}}
+  {{- $name := ( include "common.fullname.dbaas" . ) -}}
+  {{- printf "service-%s-tcp" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceport.dbaas.redis" -}}6379{{- end -}}
+{{- define "common.serviceport.dbaas.sentinel" -}}26379{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_docker.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_docker.tpl
new file mode 100644 (file)
index 0000000..a778804
--- /dev/null
@@ -0,0 +1,63 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.dockerregistry.url" -}}
+  {{- $defaultregistry := .defaultregistry }}
+  {{- $keylist := list $.ctx.Chart.Name "registry" -}}
+  {{- $ctx := dict "ctx" $.ctx.Values "keylist" $keylist -}}
+  {{- $overrideregistry := include "locate" $ctx -}}
+  {{- $keylist := list "global" "localregistry" -}}
+  {{- $ctx := dict "ctx" $.ctx.Values "keylist" $keylist -}}
+  {{- $localregistry := include "locate" $ctx -}}
+  {{- if not (empty $overrideregistry) -}}
+    {{- $overrideregistry -}}
+  {{- else -}}
+    {{- if not (empty $localregistry) -}}
+      {{- $localregistry -}}
+    {{- else -}}
+      {{- $defaultregistry -}}
+    {{- end -}}
+  {{- end -}}
+{{- end -}}
+
+
+{{- define "common.dockerregistry.credential" -}}
+  {{- $reponame := include "common.dockerregistry.url" . -}}
+  {{- $postfix := $reponame | replace "." "-" | replace ":" "-" | replace "/" "-" | trunc 63 | trimSuffix "-" -}}
+  {{- printf "secret-%s" $postfix -}}
+{{- end -}}
+
+
+{{- define "common.dockerregistry.pullpolicy" -}}
+  {{- $defaulpullpolicy := .defaultpullpolicy }}
+  {{- $keylist := list $.ctx.Chart.Name "pullpolicy" -}}
+  {{- $ctx := dict "ctx" $.ctx.Values "keylist" $keylist -}}
+  {{- $overridepullpolicy := include "locate" $ctx -}}
+  {{- $keylist := list "common" "pullpolicy" -}}
+  {{- $ctx := dict "ctx" $.ctx.Values "keylist" $keylist -}}
+  {{- $globalpullpolicy := include "locate" $ctx -}}
+  {{- if not (empty $overridepullpolicy) -}}
+    {{- $overridepullpolicy -}}
+  {{- else -}}
+    {{- if not (empty $globalpullpolicy) -}}
+      {{- $globalpullpolicy -}}
+    {{- else -}}
+      {{- $defaulpullpolicy -}}
+    {{- end -}}
+  {{- end -}}
+{{- end -}}
+
+
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_e2mgr.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_e2mgr.tpl
new file mode 100644 (file)
index 0000000..5275d28
--- /dev/null
@@ -0,0 +1,66 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.name.e2mgr" -}}
+  {{- printf "e2mgr" -}}
+{{- end -}}
+
+{{- define "common.fullname.e2mgr" -}}
+  {{- $name := ( include "common.name.e2mgr" . ) -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.e2mgr" -}}
+  {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.e2mgr" -}}
+  {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.e2mgr" -}}
+  {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceaccountname.e2mgr" -}}
+  {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+  {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.ingressname.e2mgr" -}}
+  {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.kongpath.ric.e2mgr" -}}/e2mgr{{- end -}}
+
+{{- define "common.servicename.e2mgr.rmr" -}}
+  {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+  {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.e2mgr.http" -}}
+  {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceport.e2mgr.rmr.data" -}}3801{{- end -}}
+{{- define "common.serviceport.e2mgr.rmr.route" -}}4561{{- end -}}
+{{- define "common.serviceport.e2mgr.http" -}}3800{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_e2term.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_e2term.tpl
new file mode 100644 (file)
index 0000000..5a43161
--- /dev/null
@@ -0,0 +1,89 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.name.e2term" -}}
+  {{- printf "e2term" -}}
+{{- end -}}
+
+{{- define "common.fullname.e2term" -}}
+  {{- $name := ( include "common.name.e2term" . ) -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "common.deploymentname.e2term" -}}
+  {{- $name := ( include "common.fullname.e2term" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.e2term" -}}
+  {{- $name := ( include "common.fullname.e2term" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.e2term" -}}
+  {{- $name := ( include "common.fullname.e2term" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.pvname.e2term" -}}
+  {{- $name := ( include "common.fullname.e2term" . ) -}}
+  {{- printf "pv-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.pvcname.e2term" -}}
+  {{- $name := ( include "common.fullname.e2term" . ) -}}
+  {{- printf "pvc-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.e2term.rmr" -}}
+  {{- $name := ( include "common.fullname.e2term" . ) -}}
+  {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- define "common.servicename.e2term.sctp" -}}
+  {{- $name := ( include "common.fullname.e2term" . ) -}}
+  {{- printf "service-%s-sctp" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.e2term.http" -}}
+  {{- $name := ( include "common.fullname.e2term" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.e2term.prometheus" -}}
+  {{- $name := ( include "common.fullname.e2term" . ) -}}
+  {{- printf "service-%s-prometheus" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "common.serviceport.e2term.rmr.data" -}}38000{{- end -}}
+{{- define "common.serviceport.e2term.rmr.route" -}}4561{{- end -}}
+{{- define "common.serviceport.e2term.http" -}}8080{{- end -}}
+{{- define "common.serviceport.e2term.sctp" -}}36422{{- end -}}
+{{- define "common.serviceport.e2term.prometheus" -}}8088{{- end -}}
+
+
+{{- define "common.serviceaccountname.e2term" -}}
+  {{- $name := ( include "common.fullname.e2term" . ) -}}
+  {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "common.ingressname.e2term" -}}
+  {{- $name := ( include "common.fullname.e2term" . ) -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_influxdb.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_influxdb.tpl
new file mode 100644 (file)
index 0000000..c6be83c
--- /dev/null
@@ -0,0 +1,57 @@
+################################################################################\r
+#   Copyright (c) 2021 HCL Technologies Limited.                               #\r
+#                                                                              #\r
+#   Licensed under the Apache License, Version 2.0 (the "License");            #\r
+#   you may not use this file except in compliance with the License.           #\r
+#   You may obtain a copy of the License at                                    #\r
+#                                                                              #\r
+#       http://www.apache.org/licenses/LICENSE-2.0                             #\r
+#                                                                              #\r
+#   Unless required by applicable law or agreed to in writing, software        #\r
+#   distributed under the License is distributed on an "AS IS" BASIS,          #\r
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
+#   See the License for the specific language governing permissions and        #\r
+#   limitations under the License.                                             #\r
+################################################################################\r
+\r
+{{- define "common.name.influxdb" -}}\r
+  {{- printf "influxdb" -}}\r
+{{- end -}}\r
+\r
+{{- define "common.fullname.influxdb" -}}\r
+  {{- $name := ( include "common.name.influxdb" . ) -}}\r
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}\r
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}\r
+{{- end -}}\r
+\r
+{{- define "common.influxdb.chart" -}}\r
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}\r
+{{- end -}}\r
+\r
+{{- define "common.influxdb.labels" -}}\r
+helm.sh/chart: {{ include "common.influxdb.chart" . }}\r
+{{ include "common.influxdb.selectorLabels" . }}\r
+{{- if .Chart.AppVersion }}\r
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}\r
+{{- end }}\r
+app.kubernetes.io/managed-by: {{ .Release.Service }}\r
+{{- end -}}\r
+\r
+{{- define "common.influxdb.selectorLabels" -}}\r
+app.kubernetes.io/name: {{ include "common.name.influxdb" . }}\r
+app.kubernetes.io/instance: {{ .Release.Name }}\r
+{{- end -}}\r
+\r
+{{- define "common.influxdb.serviceAccountName" -}}\r
+  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}\r
+{{- end -}}\r
+\r
+{{- define "common.serviceport.influxdb.http" -}}8086{{- end -}}\r
+{{- define "common.serviceport.influxdb.meta.bind_address" -}}8091{{- end -}}\r
+{{- define "common.serviceport.influxdb.http.bind_address" -}}8086{{- end -}}\r
+{{- define "common.serviceport.influxdb.rpc.bind_address" -}}8088{{- end -}}\r
+{{- define "common.serviceport.influxdb.graphite.bind_address" -}}2003{{- end -}}\r
+{{- define "common.serviceport.influxdb.udp.bind_address" -}}8089{{- end -}}\r
+{{- define "common.serviceport.influxdb.opentsdb.bind_address" -}}4242{{- end -}}\r
+{{- define "common.serviceport.influxdb.collectd.bind_address" -}}25826{{- end -}}\r
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_ingress_controller.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_ingress_controller.tpl
new file mode 100644 (file)
index 0000000..e136404
--- /dev/null
@@ -0,0 +1,71 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.ingresscontroller.url.platform" -}}
+  {{- $keylist := list "common" "ingresscontroller" "url" "platform" -}}
+  {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}}
+  {{- $url := include "locate" $ctx -}}
+  {{- if not (empty $url) -}}
+    {{- $url -}}
+  {{- else -}}
+    {{- printf "ric-entry" -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "common.ingresscontroller.url.aux" -}}
+  {{- $keylist := list "common" "ingresscontroller" "url" "aux" -}}
+  {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}}
+  {{- $url := include "locate" $ctx -}}
+  {{- if not (empty $url) -}}
+    {{- $url -}}
+  {{- else -}}
+    {{- printf "aux-entry" -}}
+  {{- end -}}
+{{- end -}}
+
+
+{{- define "common.ingresscontroller.url.dashboard" -}}
+  {{- $keylist := list "common" "ingresscontroller" "url" "dashboard" -}}
+  {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}}
+  {{- $url := include "locate" $ctx -}}
+  {{- if not (empty $url) -}}
+    {{- $url -}}
+  {{- else -}}
+    {{- printf "dashboard-entry" -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "common.ingresscontroller.port.http" -}}
+  {{- $keylist := list "common" "ingresscontroller" "port" "http" -}}
+  {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}}
+  {{- $port := include "locate" $ctx -}}
+  {{- if not (empty $port) -}}
+    {{- $port -}}
+  {{- else -}}
+    {{- printf "32080" -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "common.ingresscontroller.port.https" -}}
+  {{- $keylist := list "common" "ingresscontroller" "port" "https" -}}
+  {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}}
+  {{- $port := include "locate" $ctx -}}
+  {{- if not (empty $port) -}}
+    {{- $port -}}
+  {{- else -}}
+    {{- printf "32443" -}}
+  {{- end -}}
+{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_jaegeradapter.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_jaegeradapter.tpl
new file mode 100644 (file)
index 0000000..0743710
--- /dev/null
@@ -0,0 +1,72 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.name.jaegeradapter" -}}
+  {{- printf "jaegeradapter" -}}
+{{- end -}}
+
+{{- define "common.fullname.jaegeradapter" -}}
+  {{- $name := ( include "common.name.jaegeradapter" . ) -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.jaegeradapter" -}}
+  {{- $name := ( include "common.fullname.jaegeradapter" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.jaegeradapter" -}}
+  {{- $name := ( include "common.fullname.jaegeradapter" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.jaegeradapter" -}}
+  {{- $name := ( include "common.fullname.jaegeradapter" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "common.servicename.jaegeradapter.query" -}}
+  {{- $name := ( include "common.fullname.jaegeradapter" . ) -}}
+  {{- printf "service-%s-query" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- define "common.servicename.jaegeradapter.collector" -}}
+  {{- $name := ( include "common.fullname.jaegeradapter" . ) -}}
+  {{- printf "service-%s-collector" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- define "common.servicename.jaegeradapter.agent" -}}
+  {{- $name := ( include "common.fullname.jaegeradapter" . ) -}}
+  {{- printf "service-%s-agent" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceport.jaegeradapter.zipkincompact" -}}5775{{- end -}}
+{{- define "common.serviceport.jaegeradapter.jaegercompact" -}}6831{{- end -}}
+{{- define "common.serviceport.jaegeradapter.jaegerbinary" -}}6832{{- end -}}
+{{- define "common.serviceport.jaegeradapter.httpquery" -}}16686{{- end -}}
+{{- define "common.serviceport.jaegeradapter.httpconfig" -}}5778{{- end -}}
+{{- define "common.serviceport.jaegeradapter.zipkinhttp" -}}9411{{- end -}}
+{{- define "common.serviceport.jaegeradapter.jaegerhttp" -}}14268{{- end -}}
+{{- define "common.serviceport.jaegeradapter.jaegerhttpt" -}}14267{{- end -}}
+
+{{- define "common.portname.jaegeradapter.zipkincompact" -}}"zipkincompact"{{- end -}}
+{{- define "common.portname.jaegeradapter.jaegercompact" -}}"jaegercompact"{{- end -}}
+{{- define "common.portname.jaegeradapter.jaegerbinary" -}}"jaegerbinary"{{- end -}}
+{{- define "common.portname.jaegeradapter.zipkinhttp" -}}"zipkinhttp"{{- end -}}
+{{- define "common.portname.jaegeradapter.jaegerhttp" -}}"jaegerhttp"{{- end -}}
+{{- define "common.portname.jaegeradapter.jaegerhttpt" -}}"jaegerhttpt"{{- end -}}
+{{- define "common.portname.jaegeradapter.httpquery" -}}"httpquery"{{- end -}}
+{{- define "common.portname.jaegeradapter.httpconfig" -}}"httpconfig"{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_namespace.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_namespace.tpl
new file mode 100644 (file)
index 0000000..d2df3ee
--- /dev/null
@@ -0,0 +1,60 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.namespace.platform" -}}
+  {{- $keylist := list "common" "namespace" "platform" -}}
+  {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}}
+  {{- $namespace := include "locate" $ctx -}}
+  {{- if not (empty $namespace) -}}
+    {{- $namespace -}}
+  {{- else -}}
+    {{- printf "ricplt" -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "common.namespace.infra" -}}
+  {{- $keylist := list "common" "namespace" "infra" -}}
+  {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}}
+  {{- $namespace := include "locate" $ctx -}}
+  {{- if not (empty $namespace) -}}
+    {{- $namespace -}}
+  {{- else -}}
+    {{- printf "ricinfra" -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "common.namespace.xapp" -}}
+  {{- $keylist := list "common" "namespace" "xapp" -}}
+  {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}}
+  {{- $namespace := include "locate" $ctx -}}
+  {{- if not (empty $namespace) -}}
+    {{- $namespace -}}
+  {{- else -}}
+    {{- printf "ricxapp" -}}
+  {{- end -}}
+{{- end -}}
+
+
+{{- define "common.namespace.aux" -}}
+  {{- $keylist := list "common" "namespace" "aux" -}}
+  {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}}
+  {{- $namespace := include "locate" $ctx -}}
+  {{- if not (empty $namespace) -}}
+    {{- $namespace -}}
+  {{- else -}}
+    {{- printf "ricaux" -}}
+  {{- end -}}
+{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_o1mediator.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_o1mediator.tpl
new file mode 100644 (file)
index 0000000..1abcbe6
--- /dev/null
@@ -0,0 +1,69 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.name.o1mediator" -}}
+  {{- printf "o1mediator" -}}
+{{- end -}}
+
+{{- define "common.fullname.o1mediator" -}}
+  {{- $name := ( include "common.name.o1mediator" . ) -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.o1mediator" -}}
+  {{- $name := ( include "common.fullname.o1mediator" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.o1mediator" -}}
+  {{- $name := ( include "common.fullname.o1mediator" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.o1mediator" -}}
+  {{- $name := ( include "common.fullname.o1mediator" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceaccountname.o1mediator" -}}
+  {{- $name := ( include "common.fullname.o1mediator" . ) -}}
+  {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.ingressname.o1mediator" -}}
+  {{- $name := ( include "common.fullname.o1mediator" . ) -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- define "common.kongpath.ric.o1mediator" -}}/o1mediator{{- end -}}
+
+{{- define "common.servicename.o1mediator.http" -}}
+  {{- $name := ( include "common.fullname.o1mediator" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.o1mediator.tcp.netconf" -}}
+  {{- $name := ( include "common.fullname.o1mediator" . ) -}}
+  {{- printf "service-%s-tcp-netconf" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "common.serviceport.o1mediator.http.supervise" -}}9001{{- end -}}
+{{- define "common.serviceport.o1mediator.http.mediation" -}}8080{{- end -}}
+{{- define "common.serviceport.o1mediator.http.event" -}}3000{{- end -}}
+{{- define "common.serviceport.o1mediator.tcp.netconf" -}}830{{- end -}}
+
+{{- define "common.nodeport.o1mediator.tcp.netconf" -}}30830{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_rtmgr.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_rtmgr.tpl
new file mode 100644 (file)
index 0000000..f3dd2ab
--- /dev/null
@@ -0,0 +1,64 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.name.rtmgr" -}}
+  {{- printf "rtmgr" -}}
+{{- end -}}
+
+{{- define "common.fullname.rtmgr" -}}
+  {{- $name := ( include "common.name.rtmgr" . ) -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.rtmgr" -}}
+  {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.rtmgr" -}}
+  {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.rtmgr" -}}
+  {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceaccountname.rtmgr" -}}
+  {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+  {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.ingressname.rtmgr" -}}
+  {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.rtmgr.rmr" -}}
+  {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+  {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.rtmgr.http" -}}
+  {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceport.rtmgr.rmr.data" -}}4560{{- end -}}
+{{- define "common.serviceport.rtmgr.rmr.route" -}}4561{{- end -}}
+{{- define "common.serviceport.rtmgr.http" -}}3800{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_submgr.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_submgr.tpl
new file mode 100644 (file)
index 0000000..9398b33
--- /dev/null
@@ -0,0 +1,55 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.name.submgr" -}}
+  {{- printf "submgr" -}}
+{{- end -}}
+
+{{- define "common.fullname.submgr" -}}
+  {{- $name := ( include "common.name.submgr" . ) -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.submgr" -}}
+  {{- $name := ( include "common.fullname.submgr" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "common.deploymentname.submgr" -}}
+  {{- $name := ( include "common.fullname.submgr" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.submgr" -}}
+  {{- $name := ( include "common.fullname.submgr" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.submgr.rmr" -}}
+  {{- $name := ( include "common.fullname.submgr" . ) -}}
+  {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.submgr.http" -}}
+  {{- $name := ( include "common.fullname.submgr" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceport.submgr.rmr.data" -}}4560{{- end -}}
+{{- define "common.serviceport.submgr.rmr.route" -}}4561{{- end -}}
+{{- define "common.serviceport.submgr.http" -}}8088{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_tiller.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_tiller.tpl
new file mode 100644 (file)
index 0000000..d423c39
--- /dev/null
@@ -0,0 +1,149 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "recursiveprinter" -}}
+  {{- $ctx := .ctx }}
+  {{- $printkeys := .printkeys }}
+  {{- $currentkey := first $printkeys -}}
+  {{- $restkeys := rest $printkeys -}}
+  {{- if empty $restkeys -}}
+    {{- $result := index $ctx $currentkey -}}
+    {{- if not (empty $result) -}}
+      {{- $result -}}
+    {{- end -}}
+  {{- else -}}
+    {{- with index $ctx $currentkey }}
+      {{- $newctx := dict "ctx" . "printkeys" $restkeys -}} 
+      {{- include "recursiveprinter" $newctx -}}
+    {{- end -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "printer" -}}
+  {{- $topctx := .ctx }}
+  {{- if hasKey $topctx.Values "common" }}
+    {{- if hasKey $topctx.Values.common "tillers" }}
+      {{- $ctx := index $topctx.Values.common.tillers .key -}}
+      {{- if not (empty $ctx) -}}
+        {{- $newctx := dict "ctx" $ctx "printkeys" .printkey -}}     
+        {{- include "recursiveprinter" $newctx -}}
+      {{- end -}}
+    {{- end -}}
+  {{- end -}}
+{{- end -}}
+
+
+
+
+{{- define "common.tillerName" -}}
+  {{- $printkey := list "name" -}}
+  {{- $newctx := dict "ctx" .ctx "key" .key "printkey" $printkey }}
+  {{- default "tiller-deploy" (include "printer" $newctx) -}}
+{{- end -}}
+
+
+{{- define "common.tillerNameSpace" -}}
+  {{- $printkey := list "nameSpace" -}}
+  {{- $newctx := dict "ctx" .ctx "key" .key "printkey" $printkey }}
+  {{- default "kube-system" (include "printer" $newctx) -}}
+{{- end -}}
+
+{{- define "common.tillerDeployNameSpace" -}}
+  {{- $printkey := list "deployNameSpace" -}}
+  {{- $newctx := dict "ctx" .ctx "key" .key "printkey" $printkey }}
+  {{- default "kube-system" (include "printer" $newctx) -}}
+{{- end -}}
+
+
+
+{{- define "common.tillerPort" -}}
+  {{- $printkey := list "port" -}}
+  {{- $newctx := dict "ctx" .ctx "key" .key "printkey" $printkey }}
+  {{- default 44134 (include "printer" $newctx) -}}
+{{- end -}}
+
+
+
+
+{{- define "common.tillerTLSVerify" -}}
+  {{- $printkey := list "tls" "verify" -}}
+  {{- $newctx := dict "ctx" .ctx "key" .key "printkey" $printkey }}
+  {{- default false (include "printer" $newctx) -}}
+{{- end -}}
+
+
+{{- define "common.tillerTLSAuthenticate" -}}
+  {{- $printkey := list "tls" "authenticate" -}}
+  {{- $newctx := dict "ctx" .ctx "key" .key "printkey" $printkey }}
+  {{- default false (include "printer" $newctx) -}}
+{{- end -}}
+
+
+{{- define "common.tillerHelmClientTLSSecret" -}}
+  {{- $tlsverify := include "common.tillerTLSVerify" . }}
+  {{- $tlsauthenticate := include "common.tillerTLSAuthenticate" . }}
+  {{- if or (eq $tlsverify "true") (eq $tlsauthenticate "true") }}
+    {{- $printkey := list "secret" "helmSecretName" -}}
+    {{- $newctx := dict "ctx" .ctx "key" .key "printkey" $printkey }}
+    {{- default "" (include "printer" $newctx) -}}
+  {{- else -}}
+    {{- printf "" -}}
+  {{- end }}
+{{- end -}}
+
+
+{{- define "common.serviceaccountname.tiller" -}}
+  {{- $name := ( include "common.tillerName" . ) -}}
+  {{- printf "svcacct-tiller-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+
+{{- define "common.deploymentname.tiller" -}}
+  {{- $name := ( include "common.tillerName" . ) -}}
+  {{- printf "deployment-tiller-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "common.servicename.tiller" -}}
+  {{- $topctx := .ctx }}
+  {{- if hasKey $topctx.Values "common" }}
+    {{- if hasKey $topctx.Values.common "tillers" }}
+      {{- $ctx := index $topctx.Values.common.tillers .key -}}
+      {{- if not (empty $ctx) -}}
+        {{- if hasKey $ctx "name" -}}
+          {{- $name := include "common.tillerName" . -}}
+          {{- printf "service-tiller-%s" $name | trunc 63 | trimSuffix "-" -}}
+        {{- else -}}
+          {{ "tiller-deploy" }}
+        {{- end -}}
+      {{- else -}}
+        {{ "tiller-deploy" }}
+      {{- end -}}
+    {{- else -}}
+      {{ "tiller-deploy" }}
+    {{- end -}}
+  {{- else -}}
+    {{ "tiller-deploy" }}
+  {{- end -}}
+{{- end -}}
+
+{{- define "common.tillerEndpoint" -}}
+  {{- $servicename := ( include "common.servicename.tiller" . ) -}}
+  {{- $deploynamespace :=  ( include "common.tillerDeployNameSpace" . ) -}}
+  {{- printf "%s.%s" $servicename $deploynamespace -}}
+{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_vespamgr.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_vespamgr.tpl
new file mode 100644 (file)
index 0000000..a1c443d
--- /dev/null
@@ -0,0 +1,53 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.name.vespamgr" -}}
+  {{- printf "vespamgr" -}}
+{{- end -}}
+
+{{- define "common.fullname.vespamgr" -}}
+  {{- $name := ( include "common.name.vespamgr" . ) -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.vespamgr" -}}
+  {{- $name := ( include "common.fullname.vespamgr" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.vespamgr" -}}
+  {{- $name := ( include "common.fullname.vespamgr" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.vespamgr" -}}
+  {{- $name := ( include "common.fullname.vespamgr" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.vespamgr.http" -}}
+  {{- $name := ( include "common.fullname.vespamgr" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.vespamgr.alert" -}}
+  {{- $name := ( include "common.fullname.vespamgr" . ) -}}
+  {{- printf "service-%s-alert" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceport.vespamgr.http" -}}8080{{- end -}}
+{{- define "common.serviceport.vespamgr.alert" -}}9095{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_xapp_onboarder.tpl b/new-installer/helm/charts/nearrtric/nearrt-ric-common/templates/_xapp_onboarder.tpl
new file mode 100644 (file)
index 0000000..357f3ea
--- /dev/null
@@ -0,0 +1,65 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- define "common.name.xapp-onboarder" -}}
+  {{- printf "xapp-onboarder" -}}
+{{- end -}}
+
+{{- define "common.fullname.xapp-onboarder" -}}
+  {{- $name := ( include "common.name.xapp-onboarder" . ) -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.xapp-onboarder" -}}
+  {{- $name := ( include "common.fullname.xapp-onboarder" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.xapp-onboarder" -}}
+  {{- $name := ( include "common.fullname.xapp-onboarder" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.xapp-onboarder" -}}
+  {{- $name := ( include "common.fullname.xapp-onboarder" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- define "common.containername.xapp-onboarder.chartmuseum" -}}
+  {{- $name := ( include "common.fullname.xapp-onboarder" . ) -}}
+  {{- printf "container-%s-chartmuseum" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceaccountname.xapp-onboarder" -}}
+  {{- $name := ( include "common.fullname.xapp-onboarder" . ) -}}
+  {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.ingressname.xapp-onboarder" -}}
+  {{- $name := ( include "common.fullname.xapp-onboarder" . ) -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.xapp-onboarder.server" -}}
+  {{- $name := ( include "common.fullname.xapp-onboarder" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceport.xapp-onboarder.server" -}}8888{{- end -}}
+{{- define "common.serviceport.xapp-onboarder.chartmuseum" -}}8080{{- end -}}
+
+{{- define "common.kongpath.ric.xapp-onboarder" -}}/onboard{{- end -}}
+{{- define "common.kongpath.ric.chartmuseum" -}}/helmrepo{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/nearrt-ric-common/values.yaml b/new-installer/helm/charts/nearrtric/nearrt-ric-common/values.yaml
new file mode 100644 (file)
index 0000000..8543211
--- /dev/null
@@ -0,0 +1,21 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+#################################################################
+# Global configuration default values that can be inherited by
+# all subcharts.
+#################################################################
diff --git a/new-installer/helm/charts/nearrtric/o1mediator/.gitignore b/new-installer/helm/charts/nearrtric/o1mediator/.gitignore
new file mode 100644 (file)
index 0000000..d8651e0
--- /dev/null
@@ -0,0 +1 @@
+NOTES.txt
diff --git a/new-installer/helm/charts/nearrtric/o1mediator/.helmignore b/new-installer/helm/charts/nearrtric/o1mediator/.helmignore
new file mode 100644 (file)
index 0000000..50af031
--- /dev/null
@@ -0,0 +1,22 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/new-installer/helm/charts/nearrtric/o1mediator/Chart.yaml b/new-installer/helm/charts/nearrtric/o1mediator/Chart.yaml
new file mode 100644 (file)
index 0000000..f31d56d
--- /dev/null
@@ -0,0 +1,30 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#   Copyright (c) 2023 Abhijit Gadgil.
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v2
+description: O1 Mediator Helm chart for Near RT RIC Platform.
+name: o1mediator
+sources:
+  - https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/o1,general
+version: 0.1.0
+kubeVersion: " >= 1.22"
+
+dependencies:
+  - name: nearrt-ric-common
+    version: ~0.x
+    repository: "@local"
diff --git a/new-installer/helm/charts/nearrtric/o1mediator/resources/config-file.json b/new-installer/helm/charts/nearrtric/o1mediator/resources/config-file.json
new file mode 100644 (file)
index 0000000..e7fc512
--- /dev/null
@@ -0,0 +1,28 @@
+{
+    "local": {
+        "host": ":8080"
+    },
+    "logger": {
+        "level": 4
+    },
+    "db": {
+        "namespaces": ["sdl", "rnib"]
+    },
+    "rmr": {
+        "protPort": "tcp:4560",
+        "maxSize": 65536,
+        "numWorkers": 1
+    },
+    "sbi": {
+        "appmgrAddr": "{{ include "common.servicename.appmgr.http" . }}:{{ include "common.serviceport.appmgr.http" . }}",
+        "alertmgrAddr": {{ .Values.o1mediator.prometheusAMUrl | quote }},
+        "timeout": 30
+    },
+    "nbi": {
+        "schemas": ["o-ran-sc-ric-xapp-desc-v1", "o-ran-sc-ric-ueec-config-v1"]
+    },
+    "controls": {
+        "active": true
+    }
+}
+
diff --git a/new-installer/helm/charts/nearrtric/o1mediator/resources/uta_rtg.rt b/new-installer/helm/charts/nearrtric/o1mediator/resources/uta_rtg.rt
new file mode 100644 (file)
index 0000000..900f071
--- /dev/null
@@ -0,0 +1,4 @@
+newrt|start
+rte|13111|127.0.0.1:4588
+rte|13111|127.0.0.1:4560
+newrt|end
diff --git a/new-installer/helm/charts/nearrtric/o1mediator/templates/appconfig.yaml b/new-installer/helm/charts/nearrtric/o1mediator/templates/appconfig.yaml
new file mode 100644 (file)
index 0000000..5262dfa
--- /dev/null
@@ -0,0 +1,23 @@
+################################################################################
+#   Copyright (c) 2020 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.o1mediator" . }}-appconfig-configmap
+  namespace: {{ include "common.namespace.platform" . }}
+data:
+{{ tpl (.Files.Glob "resources/*").AsConfig . | indent 2 }}
diff --git a/new-installer/helm/charts/nearrtric/o1mediator/templates/deployment.yaml b/new-installer/helm/charts/nearrtric/o1mediator/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..71fc663
--- /dev/null
@@ -0,0 +1,76 @@
+################################################################################
+#   Copyright (c) 2019,2020 AT&T Intellectual Property.                        #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{- $imagectx := dict "ctx" . "defaultregistry" .Values.o1mediator.image.registry }}
+{{- $pullpolicyctx := dict "ctx" . "defaultpullpolicy" .Values.o1mediator.imagePullPolicy }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "common.deploymentname.o1mediator" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.o1mediator" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.o1mediator.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.o1mediator" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      {{- if .Values.o1mediator.annotations }}
+      annotations:
+        {{- .Values.o1mediator.annotations | nindent 8 -}}
+      {{ end }}
+      labels:
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.o1mediator" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.o1mediator" . }}
+      imagePullSecrets:
+        - name: {{ include "common.dockerregistry.credential" $imagectx }}
+      serviceAccountName: {{ include "common.serviceaccountname.o1mediator" . }}
+      containers:
+        - name: {{ include "common.containername.o1mediator" . }}
+          image: {{ include "common.dockerregistry.url" $imagectx }}/{{ .Values.o1mediator.image.name }}:{{ .Values.o1mediator.image.tag }}
+          imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.dbaas" . }}-appconfig
+            - configMapRef:
+                name: {{ include "common.configmapname.o1mediator" . }}-env
+          volumeMounts:
+            - mountPath: /etc/o1agent
+              name: appconfig-file
+          ports:
+            - name: http-supervise
+              containerPort: {{ include "common.serviceport.o1mediator.http.supervise" . }}
+              protocol: TCP
+            - name: http-mediation
+              containerPort: {{ include "common.serviceport.o1mediator.http.mediation" . }}
+              protocol: TCP
+            - name: http-event
+              containerPort: {{ include "common.serviceport.o1mediator.http.event" . }}
+              protocol: TCP
+      volumes:
+        - name: appconfig-file
+          configMap:
+            name: {{ include "common.configmapname.o1mediator" . }}-appconfig-configmap
diff --git a/new-installer/helm/charts/nearrtric/o1mediator/templates/env.yaml b/new-installer/helm/charts/nearrtric/o1mediator/templates/env.yaml
new file mode 100644 (file)
index 0000000..58ada9a
--- /dev/null
@@ -0,0 +1,20 @@
+#   Copyright (c) 2020 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.o1mediator" . }}-env
+data:
+  RMR_SEED_RT: "/etc/o1agent/uta_rtg.rt"
diff --git a/new-installer/helm/charts/nearrtric/o1mediator/templates/service-http.yaml b/new-installer/helm/charts/nearrtric/o1mediator/templates/service-http.yaml
new file mode 100644 (file)
index 0000000..5a1aaf2
--- /dev/null
@@ -0,0 +1,46 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.o1mediator.http" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.o1mediator" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.o1mediator.http.supervise" . }}
+      protocol: "TCP"
+      name: "http-supervise"
+      targetPort: {{ include "common.serviceport.o1mediator.http.supervise" . }}
+    - port: {{ include "common.serviceport.o1mediator.http.mediation" . }}
+      protocol: "TCP"
+      name: "http-mediation"
+      targetPort: {{ include "common.serviceport.o1mediator.http.mediation" . }}
+    - port: {{ include "common.serviceport.o1mediator.http.event" . }}
+      protocol: "TCP"
+      name: "http-event"
+      targetPort: {{ include "common.serviceport.o1mediator.http.event" . }}
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.o1mediator" . }}
+    release: {{ .Release.Name }}
+
diff --git a/new-installer/helm/charts/nearrtric/o1mediator/templates/service-tcp.yaml b/new-installer/helm/charts/nearrtric/o1mediator/templates/service-tcp.yaml
new file mode 100644 (file)
index 0000000..be3ac60
--- /dev/null
@@ -0,0 +1,37 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.o1mediator.tcp.netconf" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.o1mediator" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: NodePort
+  ports:
+    - port: {{ include "common.serviceport.o1mediator.tcp.netconf" . }}
+      nodePort: {{ include "common.nodeport.o1mediator.tcp.netconf" . }}
+      protocol: "TCP"
+      name: "tcp-netconf"
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.o1mediator" . }}
+    release: {{ .Release.Name }}
+
diff --git a/new-installer/helm/charts/nearrtric/o1mediator/templates/serviceaccount.yaml b/new-installer/helm/charts/nearrtric/o1mediator/templates/serviceaccount.yaml
new file mode 100644 (file)
index 0000000..7527e46
--- /dev/null
@@ -0,0 +1,46 @@
+################################################################################
+#   Copyright (c) 2019-2020 AT&T Intellectual Property.                        #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ include "common.serviceaccountname.o1mediator" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: Role
+metadata:
+  name: {{ include "common.serviceaccountname.o1mediator" . }}-{{ include "common.namespace.xapp" . }}-podreader
+  namespace: {{ include "common.namespace.xapp" . }}
+rules:
+- apiGroups: [""]
+  resources: ["pods"]
+  verbs: ["get", "list", "watch"]
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+  name: {{ include "common.serviceaccountname.o1mediator" . }}-{{ include "common.namespace.xapp" . }}-podreader
+  namespace: {{ include "common.namespace.xapp" . }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: Role
+  name: {{ include "common.serviceaccountname.o1mediator" . }}-{{ include "common.namespace.xapp" . }}-podreader
+subjects:
+  - kind: ServiceAccount
+    name: {{ include "common.serviceaccountname.o1mediator" . }}
+    namespace: {{ include "common.namespace.platform" . }}
+
diff --git a/new-installer/helm/charts/nearrtric/o1mediator/values.yaml b/new-installer/helm/charts/nearrtric/o1mediator/values.yaml
new file mode 100644 (file)
index 0000000..79240af
--- /dev/null
@@ -0,0 +1,31 @@
+################################################################################
+#   Copyright (c) 2019-2020 AT&T Intellectual Property.                        #
+#   Copyright (c) 2019-2020 Nokia.                                             #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+o1mediator:
+  replicaCount: 1
+  imagePullPolicy: IfNotPresent
+  image:
+    name: ric-plt-o1
+    tag: 0.3.1
+    registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+
+  prometheusAMUrl: "r4-infrastructure-prometheus-alertmanager:80"
+
+  # Service ports are now defined in
+  # ric-common/Common-Template/helm/ric-common/templates/_ports.tpl file.
+  # If need to change a service port, make the code change necessary, then
+  # update the _ports.tpl file with the new port number.
+
diff --git a/new-installer/helm/charts/nearrtric/rtmgr/.helmignore b/new-installer/helm/charts/nearrtric/rtmgr/.helmignore
new file mode 100644 (file)
index 0000000..50af031
--- /dev/null
@@ -0,0 +1,22 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/new-installer/helm/charts/nearrtric/rtmgr/Chart.yaml b/new-installer/helm/charts/nearrtric/rtmgr/Chart.yaml
new file mode 100644 (file)
index 0000000..7b3ea1d
--- /dev/null
@@ -0,0 +1,29 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#   Copyright (c) 2023 Abhijit Gadgil.
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v2
+description: RMR Routing Manager Helm Chart for NearRT RIC Platform.
+name: rtmgr
+sources:
+  - https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/rtmgr,general
+version: 0.1.0
+
+dependencies:
+  - name: nearrt-ric-common
+    version: ~0.x
+    repository: "@local"
diff --git a/new-installer/helm/charts/nearrtric/rtmgr/templates/config.yaml b/new-installer/helm/charts/nearrtric/rtmgr/templates/config.yaml
new file mode 100644 (file)
index 0000000..c1e656a
--- /dev/null
@@ -0,0 +1,197 @@
+#
+#==================================================================================
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#   Copyright (c) 2019 Nokia
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#==================================================================================
+#
+#
+#   Abstract:           Configuration values for the routing manager
+#   Date:               29 May 2019
+#
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.rtmgr" . }}-rtmgrcfg
+data:
+  # FQDN and port info of the platform components for routing manager to form
+  # and distribute corresponding routes to them
+  rtmgrcfg: |
+       "PlatformComponents":
+         -
+           "name": "SUBMAN"
+           "fqdn": "{{ printf "%s.%s" (include "common.servicename.submgr.rmr" .) (include "common.namespace.platform" .) }}"
+           "port": {{ include "common.serviceport.submgr.rmr.data" . }}
+         -
+           "name": "E2MAN"
+           "fqdn": "{{ printf "%s.%s" (include "common.servicename.e2mgr.rmr" .) (include "common.namespace.platform" .) }}"
+           "port": {{ include "common.serviceport.e2mgr.rmr.data" . }}
+         -
+           "name": "A1MEDIATOR"
+           "fqdn": "{{ printf "%s.%s" (include "common.servicename.a1mediator.rmr" .) (include "common.namespace.platform" .) }}"
+           "port": {{ include "common.serviceport.a1mediator.rmr.data" . }}
+
+       "XMURL":
+         "http://{{ include "common.servicename.appmgr.http" . }}:{{ include "common.serviceport.appmgr.http" . }}/ric/v1/xapps"
+       "E2MURL":
+         "http://{{ include "common.servicename.e2mgr.http" . }}:{{ include "common.serviceport.e2mgr.http" . }}/v1/e2t/list"
+       "RTFILE":
+         "/db/rt.json"
+       "CFGFILE":
+         "/cfg/rtmgr-config.yaml"
+       "RPE":
+         "{{ .Values.rtmgr.rpe }}"
+       "SBI":
+         "{{ .Values.rtmgr.sbi }}"
+       "SBIURL":
+         "{{ .Values.rtmgr.sbiurl }}"
+       "NBI":
+         "{{ .Values.rtmgr.nbi }}"
+       "NBIURL":
+         "http://{{ include "common.servicename.rtmgr.http" . }}:{{ include "common.serviceport.rtmgr.http" . }}"
+       "SDL":
+         "file"
+       "local":
+         "host": ":8080"
+       "logger":
+         "level": 4
+       "periodicRoutes":
+         "enable"                 
+       "rmr":
+         "protPort": "tcp:4560"
+         "maxSize": 1024
+         "numWorkers": 1
+         "threadType": 1
+       "messagetypes": [
+          "RIC_HEALTH_CHECK_REQ=100",
+          "RIC_HEALTH_CHECK_RESP=101",
+          "RIC_ALARM=110",
+          "RIC_ALARM_QUERY=111",
+          "RIC_SCTP_CONNECTION_FAILURE=1080",
+          "E2_TERM_INIT=1100",
+          "E2_TERM_KEEP_ALIVE_REQ=1101",
+          "E2_TERM_KEEP_ALIVE_RESP=1102",
+          "RIC_SCTP_CLEAR_ALL=1090",
+          "RAN_CONNECTED=1200",
+          "RAN_RESTARTED=1210",
+          "RAN_RECONFIGURED=1220",
+          "RIC_ENB_LOAD_INFORMATION=10020",
+          "RIC_SN_STATUS_TRANSFER=10040",
+          "RIC_UE_CONTEXT_RELEASE=10050",
+          "RIC_X2_SETUP_REQ=10060",
+          "RIC_X2_SETUP_RESP=10061",
+          "RIC_X2_SETUP_FAILURE=10062",
+          "RIC_X2_RESET=10070",
+          "RIC_X2_RESET_RESP=10071",
+          "RIC_ENB_CONF_UPDATE=10080",
+          "RIC_ENB_CONF_UPDATE_ACK=10081",
+          "RIC_ENB_CONF_UPDATE_FAILURE=10082",
+          "RIC_RES_STATUS_REQ=10090",
+          "RIC_RES_STATUS_RESP=10091",
+          "RIC_RES_STATUS_FAILURE=10092",
+          "RIC_SGNB_ADDITION_REQ=10270",
+          "RIC_SGNB_ADDITION_ACK=10271",
+          "RIC_SGNB_ADDITION_REJECT=10272",
+          "RIC_SGNB_RECONF_COMPLETE=10280",
+          "RIC_SGNB_MOD_REQUEST=10290",
+          "RIC_SGNB_MOD_REQUEST_ACK=10291",
+          "RIC_SGNB_MOD_REQUEST_REJ=10292",
+          "RIC_SGNB_MOD_REQUIRED=10300",
+          "RIC_SGNB_MOD_CONFIRM=10301",
+          "RIC_SGNB_MOD_REFUSE=10302",
+          "RIC_SGNB_RELEASE_REQUEST=10310",
+          "RIC_SGNB_RELEASE_REQUEST_ACK=10311",
+          "RIC_SGNB_RELEASE_REQUIRED=10320",
+          "RIC_SGNB_RELEASE_CONFIRM=10321",
+          "RIC_RRC_TRANSFER=10350",
+          "RIC_ENDC_X2_SETUP_REQ=10360",
+          "RIC_ENDC_X2_SETUP_RESP=10361",
+          "RIC_ENDC_X2_SETUP_FAILURE=10362",
+          "RIC_ENDC_CONF_UPDATE=10370",
+          "RIC_ENDC_CONF_UPDATE_ACK=10371",
+          "RIC_ENDC_CONF_UPDATE_FAILURE=10372",
+          "RIC_SECONDARY_RAT_DATA_USAGE_REPORT=10380",
+          "RIC_E2_SETUP_REQ=12001",
+          "RIC_E2_SETUP_RESP=12002",
+          "RIC_E2_SETUP_FAILURE=12003",
+          "RIC_ERROR_INDICATION=12007",
+          "RIC_SUB_REQ=12010",
+          "RIC_SUB_RESP=12011",
+          "RIC_SUB_FAILURE=12012",
+          "RIC_SUB_DEL_REQ=12020",
+          "RIC_SUB_DEL_RESP=12021",
+          "RIC_SUB_DEL_FAILURE=12022",
+          "RIC_SUB_DEL_REQUIRED=12023",
+          "RIC_CONTROL_REQ=12040",
+          "RIC_CONTROL_ACK=12041",
+          "RIC_CONTROL_FAILURE=12042",
+          "RIC_INDICATION=12050",
+          "A1_POLICY_REQ=20010",
+          "A1_POLICY_RESP=20011",
+          "A1_POLICY_QUERY=20012",
+          "TS_UE_LIST=30000",
+          "TS_QOE_PRED_REQ=30001",
+          "TS_QOE_PREDICTION=30002",
+          "TS_ANOMALY_UPDATE=30003",
+          "TS_ANOMALY_ACK=30004",
+          "MC_REPORT=30010",
+          "DCAPTERM_RTPM_RMR_MSGTYPE=33001",
+          "DCAPTERM_GEO_RMR_MSGTYPE=33002",
+          "RIC_SERVICE_UPDATE=12030",
+          "RIC_SERVICE_UPDATE_ACK=12031",
+          "RIC_SERVICE_UPDATE_FAILURE=12032",
+          "RIC_E2NODE_CONFIG_UPDATE=12070",
+          "RIC_E2NODE_CONFIG_UPDATE_ACK==12071",
+          "RIC_E2NODE_CONFIG_UPDATE_FAILURE=12072",
+          "RIC_E2_RESET_REQ=12004",
+          "RIC_E2_RESET_RESP=12005",
+          ]
+
+       "PlatformRoutes": [
+         { 'messagetype': 'RIC_SUB_REQ', 'senderendpoint': 'SUBMAN', 'subscriptionid': -1, 'endpoint': '', 'meid': '%meid'},
+         { 'messagetype': 'RIC_SUB_DEL_REQ', 'senderendpoint': 'SUBMAN', 'subscriptionid': -1,'endpoint': '', 'meid': '%meid'},
+         { 'messagetype': 'RIC_SUB_RESP', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'SUBMAN', 'meid': ''},
+         { 'messagetype': 'RIC_SUB_DEL_RESP', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'SUBMAN', 'meid': ''},
+         { 'messagetype': 'RIC_SUB_FAILURE', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'SUBMAN', 'meid': ''},
+         { 'messagetype': 'RIC_SUB_DEL_FAILURE', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'SUBMAN', 'meid': ''},
+         { 'messagetype': 'RIC_SUB_DEL_REQUIRED', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'SUBMAN', 'meid': ''},
+         { 'messagetype': 'RIC_X2_SETUP_REQ', 'senderendpoint': 'E2MAN', 'subscriptionid': -1, 'endpoint': '', 'meid': '%meid'},
+         { 'messagetype': 'RIC_X2_RESET', 'senderendpoint': 'E2MAN', 'subscriptionid': -1, 'endpoint': '', 'meid': '%meid'},
+         { 'messagetype': 'RIC_X2_RESET_RESP', 'senderendpoint': 'E2MAN', 'subscriptionid': -1, 'endpoint': '', 'meid': '%meid'},
+         { 'messagetype': 'RIC_ENDC_X2_SETUP_REQ', 'senderendpoint': 'E2MAN', 'subscriptionid': -1, 'endpoint': '', 'meid': '%meid'},
+         { 'messagetype': 'RIC_ENB_CONF_UPDATE_ACK', 'senderendpoint': 'E2MAN', 'subscriptionid': -1, 'endpoint': '', 'meid': '%meid'},
+         { 'messagetype': 'RIC_ENB_CONF_UPDATE_FAILURE', 'senderendpoint': 'E2MAN', 'subscriptionid': -1, 'endpoint': '', 'meid': '%meid'},
+         { 'messagetype': 'RIC_ENDC_CONF_UPDATE_ACK', 'senderendpoint': 'E2MAN', 'subscriptionid': -1, 'endpoint': '', 'meid': '%meid'},
+         { 'messagetype': 'RIC_ENDC_CONF_UPDATE_FAILURE', 'senderendpoint': 'E2MAN', 'subscriptionid': -1, 'endpoint': '', 'meid': '%meid'},
+         { 'messagetype': 'RIC_E2_SETUP_REQ', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'E2_TERM_INIT', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'RIC_X2_SETUP_RESP', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'RIC_X2_SETUP_FAILURE', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'RIC_X2_RESET', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'RIC_X2_RESET_RESP', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'RIC_ENDC_X2_SETUP_RESP', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'RIC_ENDC_X2_SETUP_FAILURE', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'RIC_ENDC_CONF_UPDATE', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'RIC_SCTP_CONNECTION_FAILURE', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'RIC_ERROR_INDICATION', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'RIC_ENB_CONF_UPDATE', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'RIC_ENB_LOAD_INFORMATION', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'E2_TERM_KEEP_ALIVE_RESP', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'A1_POLICY_QUERY', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'A1MEDIATOR', 'meid': ''},
+         { 'messagetype': 'A1_POLICY_RESP', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'A1MEDIATOR', 'meid': ''},
+         { 'messagetype': 'RIC_SERVICE_UPDATE', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'RIC_E2NODE_CONFIG_UPDATE', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+         { 'messagetype': 'RIC_E2_RESET_REQ', 'senderendpoint': '', 'subscriptionid': -1, 'endpoint': 'E2MAN', 'meid': ''},
+          ]
+
diff --git a/new-installer/helm/charts/nearrtric/rtmgr/templates/deployment.yaml b/new-installer/helm/charts/nearrtric/rtmgr/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..7854a89
--- /dev/null
@@ -0,0 +1,93 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+{{- $imagectx := dict "ctx" . "defaultregistry" .Values.rtmgr.image.registry }}
+{{- $pullpolicyctx := dict "ctx" . "defaultpullpolicy" .Values.rtmgr.imagePullPolicy }}
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "common.deploymentname.rtmgr" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rtmgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.rtmgr.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rtmgr" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      {{- if .Values.rtmgr.annotations }}
+      annotations:
+        {{- .Values.rtmgr.annotations | nindent 8 -}}
+      {{ end }}
+      labels:
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rtmgr" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.rtmgr" . }}
+      imagePullSecrets:
+        - name: {{ include "common.dockerregistry.credential" $imagectx }}
+      containers:
+        - name: {{ include "common.containername.rtmgr" . }}
+          image: {{ include "common.dockerregistry.url" $imagectx }}/{{ .Values.rtmgr.image.name }}:{{ .Values.rtmgr.image.tag }}
+          imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
+          command: ["/run_rtmgr.sh"]
+          #command: ["/bin/sh"]
+          #args: ["-c", "while true; do echo hello; sleep 10;done"]
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.rtmgr" . }}-env
+            - configMapRef:
+                name: {{ include "common.configmapname.dbaas" . }}-appconfig
+          volumeMounts:
+            - mountPath: /cfg
+              name: rtmgrcfg
+              readOnly: true
+          ports:
+            - name: "http"
+              containerPort: {{ include "common.serviceport.rtmgr.http" . }}
+            - name: "rmrroute"
+              containerPort: {{ include "common.serviceport.rtmgr.rmr.route" . }}
+            - name: "rmrdata"
+              containerPort: {{ include "common.serviceport.rtmgr.rmr.data" . }}
+
+          livenessProbe:
+            httpGet:
+              path: ric/v1/health/alive
+              port: 8080
+            initialDelaySeconds: 5
+            periodSeconds: 15
+
+          readinessProbe:
+            httpGet:
+              path: ric/v1/health/ready
+              port: 8080
+            initialDelaySeconds: 5
+            periodSeconds: 15
+    
+      volumes:
+        - name: "rtmgrcfg"
+          configMap:
+            name: {{ include "common.configmapname.rtmgr" . }}-rtmgrcfg
+            items:
+              - key: rtmgrcfg
+                path: rtmgr-config.yaml
+                mode: 0644
diff --git a/new-installer/helm/charts/nearrtric/rtmgr/templates/env.yaml b/new-installer/helm/charts/nearrtric/rtmgr/templates/env.yaml
new file mode 100644 (file)
index 0000000..795f766
--- /dev/null
@@ -0,0 +1,26 @@
+###############################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.rtmgr" . }}-env
+data:
+   RMR_SEED_RT: "/uta_rtg_ric.rt"
+   RMR_RTG_SVC: {{ include "common.serviceport.rtmgr.rmr.route" . | quote }}
+   CFGFILE: "/cfg/rtmgr-config.yaml"
+   RMR_SRC_ID: {{ include "common.servicename.rtmgr.rmr" . }}.{{ include "common.namespace.platform" . }}
+   XMURL: "http://{{ include "common.servicename.appmgr.http" . }}:{{ include "common.serviceport.appmgr.http" . }}/ric/v1/xapps"
diff --git a/new-installer/helm/charts/nearrtric/rtmgr/templates/service-http.yaml b/new-installer/helm/charts/nearrtric/rtmgr/templates/service-http.yaml
new file mode 100644 (file)
index 0000000..7132a15
--- /dev/null
@@ -0,0 +1,38 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.rtmgr.http" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rtmgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }} 
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.rtmgr.http" . }}
+      protocol: "TCP"
+      name: "http"
+      targetPort: "http"
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rtmgr" . }}
+    release: {{ .Release.Name }}
+
diff --git a/new-installer/helm/charts/nearrtric/rtmgr/templates/service-rmr.yaml b/new-installer/helm/charts/nearrtric/rtmgr/templates/service-rmr.yaml
new file mode 100644 (file)
index 0000000..ac2f31e
--- /dev/null
@@ -0,0 +1,41 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.rtmgr.rmr" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rtmgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }} 
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.rtmgr.rmr.route" . }}
+      protocol: TCP
+      targetPort: "rmrroute"
+      name: "rmrroute"
+    - port: {{ include "common.serviceport.rtmgr.rmr.data" . }}
+      protocol: TCP
+      targetPort: "rmrdata"
+      name: "rmrdata"
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rtmgr" . }}
+    release: {{ .Release.Name }}
diff --git a/new-installer/helm/charts/nearrtric/rtmgr/values.yaml b/new-installer/helm/charts/nearrtric/rtmgr/values.yaml
new file mode 100644 (file)
index 0000000..bfa68dd
--- /dev/null
@@ -0,0 +1,33 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+rtmgr:
+  imagePullPolicy: IfNotPresent
+  image:
+    name: ric-plt-rtmgr
+    tag: 0.3.8
+    registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+  
+  rpe: rmrpush
+  sbi: rmrpush
+  sbiurl: 0.0.0.0
+  nbi: httpRESTful
+  nbiurl: http://0.0.0.0:8888
+
+  # Service ports are now defined in 
+  # ric-common/Common-Template/helm/ric-common/templates/_ports.tpl file.
+  # If need to change a service port, make the code change necessary, then
+  # update the _ports.tpl file with the new port number.
diff --git a/new-installer/helm/charts/nearrtric/submgr/Chart.yaml b/new-installer/helm/charts/nearrtric/submgr/Chart.yaml
new file mode 100644 (file)
index 0000000..435e8a8
--- /dev/null
@@ -0,0 +1,30 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#   Copyright (c) 2023 Abhijit Gadgil.
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v2
+description: Subscription Manager Helm Chart for NearRT RIC Platform.
+name: submgr
+sources:
+  - https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/submgr,general
+version: 0.1.0
+kubeVersion: ">= 1.22"
+
+dependencies:
+  - name: nearrt-ric-common
+    version: ~0.x
+    repository: "@local"
diff --git a/new-installer/helm/charts/nearrtric/submgr/templates/configmap.yaml b/new-installer/helm/charts/nearrtric/submgr/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..a211791
--- /dev/null
@@ -0,0 +1,55 @@
+#==================================================================================
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#==================================================================================
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: submgrcfg
+  namespace: ricplt
+data:
+  # FQDN and port info of rtmgr
+  submgrcfg: |
+    "local":
+      "host": ":8080"
+    "logger":
+      "level": 4
+    "rmr":
+      "protPort" : "tcp:4560"
+      "maxSize": 8192
+      "numWorkers": 1
+    "rtmgr":
+      "hostAddr": {{ include "common.servicename.rtmgr.http" . | quote }}
+      "port"    : {{ include "common.serviceport.rtmgr.http" . }}
+      "baseUrl" : "/ric/v1"
+    "db":
+      "sessionNamespace": "XMSession"
+      "host": ":6379"
+      "prot": "tcp"
+      "maxIdle": 80
+      "maxActive": 12000
+    "controls":
+      "e2tSubReqTimeout_ms": 2000
+      "e2tSubDelReqTime_ms": 2000
+      "e2tRecvMsgTimeout_ms": 2000
+      "e2tMaxSubReqTryCount": 2
+      "e2tMaxSubDelReqTryCount": 2
+      "checkE2State": "true"
+      "readSubsFromDb": "true"
+      "dbTryCount": 200
+      "dbRetryForever": "true"
+      "waitRouteCleanup_ms": 5000
+  submgrutartg: |
+      newrt|start
+      newrt|end
diff --git a/new-installer/helm/charts/nearrtric/submgr/templates/deployment.yaml b/new-installer/helm/charts/nearrtric/submgr/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..f9a1398
--- /dev/null
@@ -0,0 +1,96 @@
+#==================================================================================
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#   Copyright (c) 2019 Nokia
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#==================================================================================
+
+{{- $imagectx := dict "ctx" . "defaultregistry" .Values.submgr.image.registry }}
+{{- $pullpolicyctx := dict "ctx" . "defaultpullpolicy" .Values.submgr.imagePullPolicy }}
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "common.deploymentname.submgr" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.submgr.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      {{- if .Values.submgr.annotations }}
+      annotations:
+        {{- .Values.submgr.annotations | nindent 8 -}}
+      {{ end }}
+      labels:
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.submgr" . }}
+      imagePullSecrets:
+        - name: {{ include "common.dockerregistry.credential" $imagectx }}
+      containers:
+        - name: {{ include "common.containername.submgr" . }}
+          image: {{ include "common.dockerregistry.url" $imagectx }}/{{ .Values.submgr.image.name }}:{{ .Values.submgr.image.tag }}
+          imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
+          command: ["/submgr"]
+          args: ["-f", "/cfg/submgr-config.yaml"]
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.submgr" . }}-env
+            - configMapRef:
+                name: {{ include "common.configmapname.dbaas" . }}-appconfig
+          ports:
+            - name: http
+              containerPort: {{ include "common.serviceport.submgr.http" . }}
+              protocol: TCP
+            - name: rmrroute
+              containerPort: {{ include "common.serviceport.submgr.rmr.route" . }}
+              protocol: TCP
+            - name: rmrdata
+              containerPort: {{ include "common.serviceport.submgr.rmr.data" . }}
+              protocol: TCP
+          volumeMounts:
+            - name: config-volume
+              mountPath: /cfg
+          livenessProbe:
+            httpGet:
+              path: ric/v1/health/alive
+              port: 8080
+            initialDelaySeconds: 5
+            periodSeconds: 15
+          readinessProbe:
+            httpGet:
+              path: ric/v1/health/ready
+              port: 8080
+            initialDelaySeconds: 5
+            periodSeconds: 15
+
+      volumes:
+        - name: config-volume
+          configMap:
+            name: submgrcfg
+            items:
+              - key: submgrcfg
+                path: submgr-config.yaml
+                mode: 0644
+              - key: submgrutartg
+                path: submgr-uta-rtg.rt
+                mode: 0644
diff --git a/new-installer/helm/charts/nearrtric/submgr/templates/env.yaml b/new-installer/helm/charts/nearrtric/submgr/templates/env.yaml
new file mode 100644 (file)
index 0000000..4d40840
--- /dev/null
@@ -0,0 +1,26 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.submgr" . }}-env
+data:
+  RMR_RTG_SVC: {{ include "common.serviceport.submgr.rmr.route" . | quote }}
+  RMR_SRC_ID: {{ include "common.servicename.submgr.rmr" . }}.{{ include "common.namespace.platform" . }}
+  CFG_FILE: "/cfg/submgr-config.yaml"
+  RMR_SEED_RT: "/cfg/submgr-uta-rtg.rt"
+  SUBMGR_SEED_SN: "1"
diff --git a/new-installer/helm/charts/nearrtric/submgr/templates/service-http.yaml b/new-installer/helm/charts/nearrtric/submgr/templates/service-http.yaml
new file mode 100644 (file)
index 0000000..04eef04
--- /dev/null
@@ -0,0 +1,41 @@
+#
+#==================================================================================
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#   Copyright (c) 2019 Nokia
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#==================================================================================
+#
+#
+#   Abstract: Subscription Manager service manifest
+#   Date:              28 May 2019
+#
+kind: Service
+apiVersion: v1
+metadata:
+  name: {{ include "common.servicename.submgr.http" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }}
+    release: {{ .Release.Name }}
+  ports:
+  - name: http
+    port: {{ include "common.serviceport.submgr.http" . }}
+    protocol: TCP
+    targetPort: http
diff --git a/new-installer/helm/charts/nearrtric/submgr/templates/service-rmr.yaml b/new-installer/helm/charts/nearrtric/submgr/templates/service-rmr.yaml
new file mode 100644 (file)
index 0000000..6569db3
--- /dev/null
@@ -0,0 +1,46 @@
+#
+#==================================================================================
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#   Copyright (c) 2019 Nokia
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#==================================================================================
+#
+#
+#   Abstract: Subscription Manager service manifest
+#   Date:              28 May 2019
+#
+kind: Service
+apiVersion: v1
+metadata:
+  name: {{ include "common.servicename.submgr.rmr" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }}
+    release: {{ .Release.Name }}
+  ports:
+  - name: rmrdata
+    port: {{ include "common.serviceport.submgr.rmr.data" . }}
+    protocol: TCP
+    targetPort: rmrdata
+  - name: rmrroute
+    port: {{ include "common.serviceport.submgr.rmr.route" . }}
+    protocol: TCP
+    targetPort: rmrroute
+
diff --git a/new-installer/helm/charts/nearrtric/submgr/values.yaml b/new-installer/helm/charts/nearrtric/submgr/values.yaml
new file mode 100644 (file)
index 0000000..63aafb6
--- /dev/null
@@ -0,0 +1,30 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+
+submgr:
+  imagePullPolicy: IfNotPresent
+  image:
+    name: ric-plt-submgr
+    tag: 0.10.7
+    registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+
+  replicaCount: 1
diff --git a/new-installer/helm/charts/nearrtric/values.yaml b/new-installer/helm/charts/nearrtric/values.yaml
new file mode 100644 (file)
index 0000000..9cade85
--- /dev/null
@@ -0,0 +1,44 @@
+################################################################################
+#   Copyright (c) 2020 Nordix Foundation.                                      #
+#   Copyright (c) 2023 Abhijit Gadgil.
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+nearrtric:
+
+  persistence:
+    mountPath: /dockerdata-nfs
+
+  # Optional Components
+  # TODO: Document when these optional components are enabled.
+  installA1Mediator: false
+  installAlarmManager: false
+  installJaegerAdapter: false
+  installO1Mediator: false
+  installVespamgr: false
+  installXappOnboarder: false
+
+  # Third Party Components
+  # TODO: Add documentation when these third party components are enabled.
+  installInfluxDB: false
+
+  volume1:
+    size: 1Gi
+    storageClassName: volume1
+  volume2:
+    size: 1Gi
+    storageClassName: volume2
+  volume3:
+    size: 1Gi
+    storageClassName: volume3
diff --git a/new-installer/helm/charts/nearrtric/vespamgr/.helmignore b/new-installer/helm/charts/nearrtric/vespamgr/.helmignore
new file mode 100644 (file)
index 0000000..d29b399
--- /dev/null
@@ -0,0 +1,37 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#   Copyright (c) 2019 Nokia.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/new-installer/helm/charts/nearrtric/vespamgr/Chart.yaml b/new-installer/helm/charts/nearrtric/vespamgr/Chart.yaml
new file mode 100644 (file)
index 0000000..7091f9b
--- /dev/null
@@ -0,0 +1,27 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#   Copyright (c) 2019 Nokia.
+#   Copyright (c) 2023 Abhijit Gadgil.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+apiVersion: v2
+description: Helm Chart for Adapting to ONAP's VES Collector for Near RT RIC Platform.
+sources:
+  - https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/vespamgr,general
+name: vespamgr
+version: 0.1.0
+
+dependencies:
+  - name: nearrt-ric-common
+    version: ~0.x
+    repository: "@local"
diff --git a/new-installer/helm/charts/nearrtric/vespamgr/templates/_base.tpl b/new-installer/helm/charts/nearrtric/vespamgr/templates/_base.tpl
new file mode 100644 (file)
index 0000000..4fad48d
--- /dev/null
@@ -0,0 +1,2 @@
+# TODO: Hack right now to get this chart building. Revisit Later.
+{{- define "common.kongpath.aux.vescollector" -}}/vescollector{{- end -}}
diff --git a/new-installer/helm/charts/nearrtric/vespamgr/templates/deployment.yaml b/new-installer/helm/charts/nearrtric/vespamgr/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..6e2e225
--- /dev/null
@@ -0,0 +1,76 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#   Copyright (c) 2019 Nokia.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+{{- $imagectx := dict "ctx" . "defaultregistry" .Values.vespamgr.image.registry }}
+{{- $pullpolicyctx := dict "ctx" . "defaultpullpolicy" .Values.vespamgr.imagePullPolicy }}
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "common.deploymentname.vespamgr" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.vespamgr.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      {{- if .Values.vespamgr.annotations }}
+      annotations:
+        {{- .Values.vespamgr.annotations | nindent 8 -}}
+      {{ end }}
+      labels:
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.vespamgr" . }}
+      imagePullSecrets:
+        - name: {{ include "common.dockerregistry.credential" $imagectx }}
+      {{- with .Values.vespamgr.nodeselector }}
+      nodeSelector: {{ toYaml . | trim | nindent 8 -}}
+      {{- end }}
+      containers:
+        - name: {{ include "common.containername.vespamgr" . }}
+          image: {{ include "common.dockerregistry.url" $imagectx }}/{{ .Values.vespamgr.image.name }}:{{ .Values.vespamgr.image.tag }}
+          imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
+          ports:
+            - name: http
+              containerPort: {{ include "common.serviceport.vespamgr.http" . }}
+              protocol: TCP
+            - name: alert
+              containerPort: {{ include "common.serviceport.vespamgr.alert" . }}
+              protocol: TCP
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.vespamgr" . }}
+            - secretRef:
+                name: vespa-secrets
+          env:
+            - name: VESMGR_APPMGRDOMAN
+              value: {{ include "common.servicename.appmgr.http" . }}
+          livenessProbe:
+            httpGet:
+              path: /supervision
+              port: 8080
+            initialDelaySeconds: 30
+            periodSeconds: 60
+            timeoutSeconds: 20
+
diff --git a/new-installer/helm/charts/nearrtric/vespamgr/templates/secret.yaml b/new-installer/helm/charts/nearrtric/vespamgr/templates/secret.yaml
new file mode 100644 (file)
index 0000000..c3cad09
--- /dev/null
@@ -0,0 +1,8 @@
+apiVersion: v1
+kind: Secret
+metadata:
+  name: vespa-secrets
+type: Opaque
+data:
+  VESMGR_PRICOLLECTOR_USER: "c2FtcGxlMQo="
+  VESMGR_PRICOLLECTOR_PASSWORD: "JDJhJDEwJDBidWguMldlWXdOODY4WU13bk5ORXVORUFNTllWVTkuRlNNSkd5SUtWM2RHRVQvN29HT2k2Cg=="
diff --git a/new-installer/helm/charts/nearrtric/vespamgr/templates/service.yaml b/new-installer/helm/charts/nearrtric/vespamgr/templates/service.yaml
new file mode 100644 (file)
index 0000000..634a256
--- /dev/null
@@ -0,0 +1,39 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#   Copyright (c) 2019 Nokia.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.vespamgr.http" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.vespamgr.http" . }}
+      protocol: "TCP"
+      name: "http"
+      targetPort: "http"
+    - port: {{ include "common.serviceport.vespamgr.alert" . }}
+      protocol: "TCP"
+      name: "alert"
+      targetPort: "alert"
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }}
+    release: {{ .Release.Name }}
diff --git a/new-installer/helm/charts/nearrtric/vespamgr/templates/vespa-config.yaml b/new-installer/helm/charts/nearrtric/vespamgr/templates/vespa-config.yaml
new file mode 100644 (file)
index 0000000..2efec72
--- /dev/null
@@ -0,0 +1,16 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.vespamgr" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+data:
+  VESMGR_HB_INTERVAL: "60s"
+  VESMGR_MEAS_INTERVAL: "30s"
+  VESMGR_PRICOLLECTOR_ADDR: {{ include "common.ingresscontroller.url.aux" . | quote }}
+  VESMGR_PRICOLLECTOR_SERVERROOT: {{ include "common.kongpath.aux.vescollector" . | quote }}
+  VESMGR_PRICOLLECTOR_PORT: "8443"
+  VESMGR_PRICOLLECTOR_SECURE: "false"
+  VESMGR_PROMETHEUS_ADDR: {{ .Values.vespamgr.prometheusurl }}
+  VESMGR_PRICOLLECTOR_USER: "sample1"
+  VESMGR_PRICOLLECTOR_PASSWORD: "sample1"
+  VESMGR_ALERTMANAGER_BIND_ADDR: ":9095"
diff --git a/new-installer/helm/charts/nearrtric/vespamgr/values.yaml b/new-installer/helm/charts/nearrtric/vespamgr/values.yaml
new file mode 100644 (file)
index 0000000..bf88dac
--- /dev/null
@@ -0,0 +1,35 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+
+vespamgr:
+  imagePullPolicy: IfNotPresent
+  replicaCount: 1
+  image:
+    name: ric-plt-vespamgr
+    tag: 0.4.0
+    registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+
+  # Service ports are now defined in
+  # ric-common/Common-Template/helm/ric-common/templates/_ports.tpl file.
+  # If need to change a service port, make the code change necessary, then
+  # update the _ports.tpl file with the new port number.
+
+  prometheusurl: "http://r4-infrastructure-prometheus-server.ricplt"
diff --git a/new-installer/helm/charts/nearrtric/xapp-onboarder/.helmignore b/new-installer/helm/charts/nearrtric/xapp-onboarder/.helmignore
new file mode 100644 (file)
index 0000000..50af031
--- /dev/null
@@ -0,0 +1,22 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/new-installer/helm/charts/nearrtric/xapp-onboarder/Chart.yaml b/new-installer/helm/charts/nearrtric/xapp-onboarder/Chart.yaml
new file mode 100644 (file)
index 0000000..cfbe4fc
--- /dev/null
@@ -0,0 +1,30 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#   Copyright (c) Abhijit Gadgil.
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v2
+description: Helm Chart for XApp Onboarder for the Near RT RIC Platform.
+name: xapp-onboarder
+sources:
+  - https://gerrit.o-ran-sc.org/r/gitweb?p=ric-plt/appmgr.git;a=tree;f=xapp_orchestrater/dev
+version: 0.1.0
+kubeVersion: " >= 1.22"
+
+dependencies:
+  - name: nearrt-ric-common
+    version: ~0.x
+    repository: "@local"
diff --git a/new-installer/helm/charts/nearrtric/xapp-onboarder/templates/deployment.yaml b/new-installer/helm/charts/nearrtric/xapp-onboarder/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..cd8e2f7
--- /dev/null
@@ -0,0 +1,89 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "common.deploymentname.xapp-onboarder" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.xapp-onboarder" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.xapponboarder.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.xapp-onboarder" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      {{- if .Values.xapponboarder.annotations }}
+      annotations:
+        {{- .Values.xapponboarder.annotations | nindent 8 -}}
+      {{ end }}
+      labels:
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.xapp-onboarder" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.xapp-onboarder" . }}
+      securityContext:
+        fsGroup: 0
+        runAsUser: 0
+      restartPolicy: Always
+      imagePullSecrets:
+        {{- $newctx := dict "ctx" $ "defaultregistry" .Values.xapponboarder.image.xapponboarder.registry }}
+        - name: {{ include "common.dockerregistry.credential" $newctx }}
+      containers:
+        - name: {{ include "common.containername.xapp-onboarder.chartmuseum" . }}
+          {{- $newctx := dict "ctx" $ "defaultregistry" .Values.xapponboarder.image.chartmuseum.registry }}
+          image: {{ include "common.dockerregistry.url" $newctx }}/{{ .Values.xapponboarder.image.chartmuseum.name }}:{{ .Values.xapponboarder.image.chartmuseum.tag }}
+          {{- $newctx := dict "ctx" $ "defaultpullpolicy" .Values.xapponboarder.imagePullPolicy }}
+          imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $newctx }}
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.xapp-onboarder" . }}-chartmuseum-env
+          ports:
+            - name: chartmuseum
+              containerPort: {{ include "common.serviceport.xapp-onboarder.chartmuseum" . }}
+              protocol: TCP
+        - name: {{ include "common.containername.xapp-onboarder" . }}
+          {{- $newctx := dict "ctx" $ "defaultregistry" .Values.xapponboarder.image.xapponboarder.registry }}
+          image: {{ include "common.dockerregistry.url" $newctx }}/{{ .Values.xapponboarder.image.xapponboarder.name }}:{{ .Values.xapponboarder.image.xapponboarder.tag }}
+          {{- $newctx := dict "ctx" $ "defaultpullpolicy" .Values.xapponboarder.imagePullPolicy }}
+          imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $newctx }}
+          ports:
+            - name: server
+              containerPort: {{ include "common.serviceport.xapp-onboarder.server" . }}
+              protocol: TCP
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.xapp-onboarder" . }}-env
+            - configMapRef:
+                name: {{ include "common.configmapname.dbaas" . }}-appconfig
+          livenessProbe:
+            #exec:
+            #  command:
+            #    - /bin/bash
+            #    - -c
+            #    - ps -ef | grep {{ .Values.livenessprocessname }}| grep -v "grep"
+            #initialDelaySeconds: 120
+            #periodSeconds: 30
+          readinessProbe:
+          #  httpGet:
+          #    path: /
+          #    port: http
diff --git a/new-installer/helm/charts/nearrtric/xapp-onboarder/templates/env-chartmuseum.yaml b/new-installer/helm/charts/nearrtric/xapp-onboarder/templates/env-chartmuseum.yaml
new file mode 100644 (file)
index 0000000..85f5131
--- /dev/null
@@ -0,0 +1,25 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.xapp-onboarder" . }}-chartmuseum-env
+data:
+   DEBUG: "true"
+   STORAGE: "local"
+   STORAGE_LOCAL_ROOTDIR: "/charts"
+   PORT: {{ include "common.serviceport.xapp-onboarder.chartmuseum" . | quote }}
diff --git a/new-installer/helm/charts/nearrtric/xapp-onboarder/templates/env-xapp-onboarder.yaml b/new-installer/helm/charts/nearrtric/xapp-onboarder/templates/env-xapp-onboarder.yaml
new file mode 100644 (file)
index 0000000..748104d
--- /dev/null
@@ -0,0 +1,32 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.xapp-onboarder" . }}-env
+data:
+  FLASK_PORT: {{ include "common.serviceport.xapp-onboarder.server" . | quote }}  
+  FLASK_DEBUG: "False"
+  CHART_WORKSPACE_PATH: {{.Values.xapponboarder.chart_workspace_path | quote}}
+  CHART_REPO_URL: "http://0.0.0.0:8080"
+  HELM_VERSION: {{.Values.xapponboarder.helm_version | quote }}
+  HTTP_RETRY: {{.Values.xapponboarder.http_retry | quote }}
+  ALLOW_REDEPLOY: {{.Values.xapponboarder.allow_redeploy | quote }}
+  CHART_WORKSPACE_SIZE: {{.Values.xapponboarder.chart_workspace_size | quote }}
+  MOCK_TEST_MODE: "False"
+  MOCK_TEST_HELM_REPO_TEMP_DIR: "/tmp/mock_helm_repo"
+
diff --git a/new-installer/helm/charts/nearrtric/xapp-onboarder/templates/ingress-chartmuseum.yaml b/new-installer/helm/charts/nearrtric/xapp-onboarder/templates/ingress-chartmuseum.yaml
new file mode 100644 (file)
index 0000000..f3b2923
--- /dev/null
@@ -0,0 +1,15 @@
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: {{ include "common.ingressname.xapp-onboarder" . }}-chartmuseum
+spec:
+  rules:
+  - http:
+      paths:
+      - path: {{ include "common.kongpath.ric.chartmuseum" . }}
+        pathType: Prefix
+        backend:
+          service:
+            name: {{ include "common.servicename.xapp-onboarder.server" . }}
+            port:
+              number: {{ include "common.serviceport.xapp-onboarder.chartmuseum" . }}
diff --git a/new-installer/helm/charts/nearrtric/xapp-onboarder/templates/ingress-xapp-onboarder.yaml b/new-installer/helm/charts/nearrtric/xapp-onboarder/templates/ingress-xapp-onboarder.yaml
new file mode 100644 (file)
index 0000000..75ff962
--- /dev/null
@@ -0,0 +1,15 @@
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: {{ include "common.ingressname.xapp-onboarder" . }}-server
+spec:
+  rules:
+  - http:
+      paths:
+      - path: {{ include "common.kongpath.ric.xapp-onboarder" . }}
+        pathType: Prefix
+        backend:
+          service:
+            name: {{ include "common.servicename.xapp-onboarder.server" . }}
+            port:
+              number: {{ include "common.serviceport.xapp-onboarder.server" . }}
diff --git a/new-installer/helm/charts/nearrtric/xapp-onboarder/templates/service-http.yaml b/new-installer/helm/charts/nearrtric/xapp-onboarder/templates/service-http.yaml
new file mode 100644 (file)
index 0000000..1338537
--- /dev/null
@@ -0,0 +1,43 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.xapp-onboarder.server" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.xapp-onboarder" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }} 
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.xapp-onboarder.server" . }}
+      protocol: "TCP"
+      name: "server"
+      targetPort: "server"
+    - port: {{ include "common.serviceport.xapp-onboarder.chartmuseum" . }}
+      targetPort: "chartmuseum"
+      protocol: TCP
+      name: "chartmuseum"
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.xapp-onboarder" . }}
+    release: {{ .Release.Name }}
+
+
diff --git a/new-installer/helm/charts/nearrtric/xapp-onboarder/values.yaml b/new-installer/helm/charts/nearrtric/xapp-onboarder/values.yaml
new file mode 100644 (file)
index 0000000..5d0157e
--- /dev/null
@@ -0,0 +1,37 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+
+xapponboarder:
+  chart_workspace_size: "500MB"
+  chart_workspace_path: "/tmp/xapp-onboarder"
+  http_retry: "3"
+  helm_version: "2.12.3"
+  allow_redeploy: "True"
+
+  replicaCount: 1
+  imagePullPolicy: IfNotPresent
+  image:
+   xapponboarder:
+     registry: "nexus3.o-ran-sc.org:10004/o-ran-sc"
+     name: xapp-onboarder
+     tag: 1.0.0
+   chartmuseum:
+     registry: "docker.io"
+     name: chartmuseum/chartmuseum
+     tag: v0.8.2
+