Create RMR route listening services. Further integrating charts with common template. 78/478/2
authorZhe Huang <zhehuang@research.att.com>
Fri, 5 Jul 2019 18:49:22 +0000 (14:49 -0400)
committerZhe Huang <zhehuang@research.att.com>
Mon, 8 Jul 2019 14:29:41 +0000 (10:29 -0400)
Signed-off-by: Zhe Huang <zhehuang@research.att.com>
Change-Id: I96800ebe5374e189d62cabfd3f4f1dc56f526a18

76 files changed:
.gitignore
RECIPE_EXAMPLE/RIC_AUX_RECIPE_EXAMPLE
RECIPE_EXAMPLE/RIC_INFRA_RECIPE_EXAMPLE
RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE
ric-aux/80-Auxiliary-Functions/bin/install
ric-aux/80-Auxiliary-Functions/bin/uninstall
ric-aux/80-Auxiliary-Functions/etc/aux.conf [moved from ric-aux/80-Auxiliary-Functions/etc/dashboard.conf with 75% similarity]
ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/appconfig.yaml
ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/deployment.yaml
ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/service.yaml
ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml
ric-aux/85-Ext-Services/bin/install
ric-aux/85-Ext-Services/bin/uninstall
ric-aux/85-Ext-Services/etc/ext.conf
ric-common/Common-Template/helm/ric-common/templates/_configmapname.tpl
ric-common/Common-Template/helm/ric-common/templates/_containername.tpl [new file with mode: 0644]
ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl
ric-common/Common-Template/helm/ric-common/templates/_ingressname.tpl
ric-common/Common-Template/helm/ric-common/templates/_name.tpl
ric-common/Common-Template/helm/ric-common/templates/_namespace.tpl
ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl
ric-infra/10-Nexus/bin/install
ric-infra/10-Nexus/bin/uninstall
ric-infra/10-Nexus/etc/nexus.conf
ric-infra/10-Nexus/helm/templates/job-save-certs.yaml
ric-infra/20-Monitoring/bin/install
ric-infra/20-Monitoring/bin/uninstall
ric-infra/20-Monitoring/etc/elfkp.conf
ric-infra/40-Credential/bin/install
ric-infra/40-Credential/bin/uninstall
ric-infra/40-Credential/etc/credential.conf
ric-infra/40-Credential/helm/resources/tls.crt [deleted file]
ric-infra/40-Credential/helm/templates/_helper.tpl
ric-infra/40-Credential/helm/templates/config-helm-cert.yaml
ric-infra/40-Credential/helm/values.yaml
ric-platform/50-RIC-Platform/bin/install
ric-platform/50-RIC-Platform/bin/uninstall
ric-platform/50-RIC-Platform/etc/ric.conf
ric-platform/50-RIC-Platform/helm/a1mediator/resources/ricmanifest.json [moved from ric-platform/50-RIC-Platform/helm/a1mediator/files/ricmanifest.json with 100% similarity]
ric-platform/50-RIC-Platform/helm/a1mediator/resources/rmr_string_int_mapping.txt [moved from ric-platform/50-RIC-Platform/helm/a1mediator/files/rmr_string_int_mapping.txt with 100% similarity]
ric-platform/50-RIC-Platform/helm/a1mediator/templates/config.yaml
ric-platform/50-RIC-Platform/helm/a1mediator/templates/deployment.yaml
ric-platform/50-RIC-Platform/helm/a1mediator/templates/env.yaml [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/a1mediator/templates/service-http.yaml
ric-platform/50-RIC-Platform/helm/a1mediator/templates/service-rmr.yaml
ric-platform/50-RIC-Platform/helm/a1mediator/values.yaml
ric-platform/50-RIC-Platform/helm/appmgr/resources/appenv.yaml [deleted file]
ric-platform/50-RIC-Platform/helm/appmgr/resources/appmgr.yaml
ric-platform/50-RIC-Platform/helm/appmgr/templates/appconfig.yaml
ric-platform/50-RIC-Platform/helm/appmgr/templates/deployment.yaml
ric-platform/50-RIC-Platform/helm/appmgr/templates/env.yaml [moved from ric-platform/50-RIC-Platform/helm/appmgr/templates/appenv.yaml with 78% similarity]
ric-platform/50-RIC-Platform/helm/appmgr/templates/service-http.yaml
ric-platform/50-RIC-Platform/helm/appmgr/templates/service-rmr.yaml
ric-platform/50-RIC-Platform/helm/appmgr/templates/service-test.yaml [moved from ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_helpers.tpl with 55% similarity]
ric-platform/50-RIC-Platform/helm/appmgr/values.yaml
ric-platform/50-RIC-Platform/helm/dbaas/templates/deployment.yaml
ric-platform/50-RIC-Platform/helm/dbaas/templates/service.yaml
ric-platform/50-RIC-Platform/helm/dbaas/values.yaml
ric-platform/50-RIC-Platform/helm/e2mgr/templates/configmap.yaml
ric-platform/50-RIC-Platform/helm/e2mgr/templates/deployment.yaml
ric-platform/50-RIC-Platform/helm/e2mgr/templates/env.yaml [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/e2mgr/templates/service-http.yaml
ric-platform/50-RIC-Platform/helm/e2mgr/templates/service-rmr.yaml
ric-platform/50-RIC-Platform/helm/e2mgr/values.yaml
ric-platform/50-RIC-Platform/helm/e2term/templates/configmap.yaml
ric-platform/50-RIC-Platform/helm/e2term/templates/deployment.yaml
ric-platform/50-RIC-Platform/helm/e2term/templates/env.yaml [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/e2term/templates/service-rmr.yaml
ric-platform/50-RIC-Platform/helm/e2term/values.yaml
ric-platform/50-RIC-Platform/helm/rtmgr/templates/deployment.yaml
ric-platform/50-RIC-Platform/helm/rtmgr/templates/env.yaml [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/rtmgr/templates/service-rmr.yaml
ric-platform/50-RIC-Platform/helm/rtmgr/values.yaml
ric-platform/55-Ext-Services/bin/install
ric-platform/55-Ext-Services/etc/ext.conf

index a245a23..2fd1c28 100644 (file)
@@ -3,3 +3,4 @@
 *.tar
 *.tgz
 *.swp
+*.lock
index 2510331..f1a6290 100644 (file)
@@ -29,7 +29,7 @@ global:
   imagePullPolicy: Always
 
   # Helm repo that will be used by xApp manager
-  helmRepository: "https://ricaux-entry/helm"
+  helmRepository: "https://helm-entry"
 
   # Certificate of the helm repo
   helmRepositoryCert: xapp-mgr-certs
@@ -46,13 +46,22 @@ global:
   # The port the xApp helm tiller is listening to
   helmRepositoryTillerPort: 44134
 
-
-
+  # The ingress URL definitions for the ingress controller in four namespaces
+  ingressurl:
+    platform: ricplt-entry
+    xapp: ricxapp-entry
+    aux: ricaux-entry
+    infra: ricinfra-entry
+    localnexus: nexus-entry
+    localhelm: helm-entry
+    localdocker: docker-entry
   
 #-------------------------------------------------------------------------
 # Auxiliary Functions
 #-------------------------------------------------------------------------
 dashboard:
+  # Override the name using the following option
+  # nameOverride:
   image:
     name:: ric-dash-be
     tag: 1.0.5
@@ -63,4 +72,4 @@ dashboard:
 
 ext:
   ip:
-    192.168.130.110
\ No newline at end of file
+    192.168.130.110
index b97ef1c..3912aea 100644 (file)
@@ -29,7 +29,7 @@ global:
   imagePullPolicy: Always
 
   # Helm repo that will be used by xApp manager
-  helmRepository: "https://ricaux-entry/helm"
+  helmRepository: "https://helm-entry"
 
   # Certificate of the helm repo
   helmRepositoryCert: xapp-mgr-certs
@@ -46,6 +46,15 @@ global:
   # The port the xApp helm tiller is listening to
   helmRepositoryTillerPort: 44134
 
+  # The ingress URL definitions for the ingress controller in four namespaces
+  ingressurl:
+    platform: ricplt-entry
+    xapp: ricxapp-entry
+    aux: ricaux-entry
+    infra: ricinfra-entry
+    localnexus: nexus-entry
+    localhelm: helm-entry
+    localdocker: docker-entry
 #-------------------------------------------------------------------------
 # Infrastructure
 #-------------------------------------------------------------------------
@@ -56,17 +65,26 @@ cluster:
   useLocalHelmRepo: false
   useLocalDockerRegistry: false
 
+credential:
+  repositoryCredential:
+    user: <DOCKER USER NAME>
+    password: <DOCKER PASSWORD>
+  
+  
+  helmrepoCredential:
+    user: <HELM USER NAME>
+    password: <HELM PASSWORD>
+
+  helmCertificate: |2
+    -----BEGIN CERTIFICATE-----
+    <CERT FOR HELM>
+    -----END CERTIFICATE-----
+
+nexus:
+  image:
+    name: nexus-repository-helm-apt
+    tag: 1.0.0
+  adminPassword: <NEXUS ADMIN PASSWORD>
+  datapath: /tmp/nexus3-data/
+  storagesize: 20Gi
 
-repositoryCredential:
-  user: "docker"
-  password: "docker"
-
-
-helmrepoCredential:
-  user: "helm"
-  password: "helm"
-
-
-adminPassword: admin123
-
-datapath: /tmp/nexus3-data/
index 7be8304..483e736 100644 (file)
@@ -29,7 +29,7 @@ global:
   imagePullPolicy: Always
 
   # Helm repo that will be used by xApp manager
-  helmRepository: "https://ricaux-entry/helm"
+  helmRepository: "https://helm-entry"
 
   # Certificate of the helm repo
   helmRepositoryCert: xapp-mgr-certs
@@ -46,56 +46,83 @@ global:
   # The port the xApp helm tiller is listening to
   helmRepositoryTillerPort: 44134
 
+  # The ingress URL definitions for the ingress controller in four namespaces
+  ingressurl:
+    platform: ricplt-entry
+    xapp: ricxapp-entry
+    aux: ricaux-entry
+    infra: ricinfra-entry
+    localnexus: nexus-entry
+    localhelm: helm-entry
+    localdocker: docker-entry
 
 #-------------------------------------------------------------------------
 # Platform Components 
 #-------------------------------------------------------------------------
 # A1 Mediator
 a1mediator:
+  # Use the following option to override the docker registry value
+  # repositoryOverride:
   image:
     name: ric-plt-a1
     tag: 0.8.3
+  rmr_timeout_config:
+    rcv_retry_interval_ms: 500
+    rcv_retry_times: 20
 
 # xApp Manager 
 appmgr:
+  # Use the following option to override the docker registry value
+  # repositoryOverride:
   image:
     name: appmgr
     tag: 1.0.4
 
+
+
 # DBAAS 
 dbaas:
+  # Use the following option to override the docker registry value
+  # repositoryOverride:
   backend:
+    iterminationGracePeriodSeconds: 0
     image:
       name: ric-plt-dbaas
       tag: 0.1.0
 
 # E2 Manager
 e2mgr:
+  # Use the following option to override the docker registry value
+  # repositoryOverride:
   image:
     name: e2mgr
     tag: 1.6.0
   env:
-    RMR_RTG_SVC: "service-ricplt-rtmgr-rmr"
     RIC_ID: "bbbccc-abcd0e/20"
 
 
 # E2 Termination
 e2term:
+  # Use the following option to override the docker registry value
+  # repositoryOverride:
   image:
     name: e2
     tag: 1.6.0
   env:
     print: "1"
-    RMR_RTG_SVC: "service-ricplt-rtmgr-rmr"
 
 # Routing Manager
 rtmgr:
+  # Use the following option to override the docker registry value
+  # repositoryOverride:
   image:
     name: rtmgr
     tag: 0.0.2
 
 # Subscription Manager
 submgr:
+  # Use the following option to override the docker registry value
+  # repositoryOverride:
   image:
     name: submgr
     tag: v0.1.0
@@ -103,4 +130,5 @@ submgr:
 # the service for redirecting to AUX cluster
 ext:
   ip:
-    192.168.130.102
\ No newline at end of file
+    # The ip address of the aux cluster ingress controller
+    IP_ADDRESS
index df15d9b..2526b66 100755 (executable)
@@ -23,23 +23,45 @@ OVERRIDEYAML=$1
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
 
 
-source $DIR/../etc/dashboard.conf
+source $DIR/../etc/aux.conf
 
 if [ -z "$RICAUX_RELEASE_NAME" ];then
    RELEASE_NAME=$helm_release_name
 else
    RELEASE_NAME=$RICAUX_RELEASE_NAME
 fi
+
+# Namespace configuration
+if [ -z "$RICPLT_NAMESPACE" ];then
+   PLT_NAMESPACE=$plt_namespace
+else
+   PLT_NAMESPACE=$RICPLT_NAMESPACE
+fi
+if [ -z "$RICXAPP_NAMESPACE" ];then
+   XAPP_NAMESPACE=$xapp_namespace
+else
+   XAPP_NAMESPACE=$RICXAPP_NAMESPACE
+fi
 if [ -z "$RICAUX_NAMESPACE" ];then
-   NAMESPACE=$namespace
+   AUX_NAMESPACE=$aux_namespace
+else
+   AUX_NAMESPACE=$RICAUX_NAMESPACE
+fi
+if [ -z "$RICINFRA_NAMESPACE" ];then
+   INFRA_NAMESPACE=$infra_namespace
+else
+   INFRA_NAMESPACE=$RICINFRA_NAMESPACE
+fi
+
+if [ -z "$RIC_COMMON_OVERRIDE" ];then
+   COMMON_OVERRIDE="--set global.namespace.platform=$PLT_NAMESPACE --set global.namespace.xapp=$XAPP_NAMESPACE --set global.namespace.aux=$AUX_NAMESPACE --set global.namespace.infra=$INFRA_NAMESPACE"
 else
-   NAMESPACE=$RICAUX_NAMESPACE
+   COMMON_OVERRIDE=$RIC_COMMON_OVERRIDE
 fi
 
 RICAUX_COMPONENTS="dashboard ves message-router kong-aux"
 
 echo "Deploying RIC AUX components [$RICAUX_COMPONENTS]"
-echo "Platform Namespace: $NAMESPACE"
 echo "Helm Release Name: $RELEASE_NAME"
 
 
@@ -56,7 +78,7 @@ for component in $RICAUX_COMPONENTS; do
   if [ $component = "kong-aux" ]; then
       mkdir -p $DIR/../helm/$component/charts
       helm dep up $DIR/../helm/$component
-      helm install --namespace ricaux --name "${RELEASE_NAME}-$component" $DIR/../helm/$component --set postgresql.enabled=false --set env.database=off
+      helm install --namespace $AUX_NAMESPACE --name "${RELEASE_NAME}-$component" $DIR/../helm/$component --set postgresql.enabled=false --set env.database=off
       continue
   fi
 
@@ -65,8 +87,8 @@ for component in $RICAUX_COMPONENTS; do
   mkdir -p  $DIR/../helm/$component/charts/
   cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/$component/charts/
   if [ -z $OVERRIDEYAML ]; then
-  helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component
+  helm install --namespace $AUX_NAMESPACE --name "${RELEASE_NAME}-$component" $COMMON_OVERRIDE $DIR/../helm/$component
   else
-  helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component
+  helm install -f $OVERRIDEYAML --namespace $AUX_NAMESPACE --name "${RELEASE_NAME}-$component" $COMMON_OVERRIDE $DIR/../helm/$component
   fi
 done
index 67e6840..fcd1761 100755 (executable)
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
 
 
-source $DIR/../etc/dashboard.conf
+source $DIR/../etc/aux.conf
 
 if [ -z "$RICAUX_RELEASE_NAME" ];then
    RELEASE_NAME=$helm_release_name
 else
    RELEASE_NAME=$RICAUX_RELEASE_NAME
 fi
-if [ -z "$RICAUX_NAMESPACE" ];then
-   NAMESPACE=$namespace
-else
-   NAMESPACE=$RICAUX_NAMESPACE
-fi
 
 RICAUX_COMPONENTS="dashboard message-router ves kong-aux"
 
 echo "Undeploying RIC AUX components [$RICAUX_COMPONENTS]"
-echo "Platform Namespace: $NAMESPACE"
 echo "Helm Release Name: $RELEASE_NAME"
 
 
 
 
 # helm_release_name defines the release name helm will use to deploy RIC
-# It will be overrided by RICAUX_RELEASE_NAME
-helm_release_name=r0
+# It will be overrided by RICPLT_RELEASE_NAME
+helm_release_name=r1
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICPLT_NAMESPACE
+plt_namespace=ricplt
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICXAPP_NAMESPACE
+xapp_namespace=ricxapp
 
 # namespace defines the namespace that helm will use to deploy RIC
 # It will be overrided by RICAUX_NAMESPACE
-namespace=ricaux
+aux_namespace=ricaux
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICINFRA_NAMESPACE
+infra_namespace=ricinfra
diff --git a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl
new file mode 100644 (file)
index 0000000..9f89c39
--- /dev/null
@@ -0,0 +1,57 @@
+################################################################################
+#   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.                                             #
+################################################################################
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Generate the URLS of the endpoints.
+*/}}
+
+
+{{- define "dashboard.endpoint.a1mediator" -}}
+  {{- $ingress := ( include "common.ingressurl.ricplt" . ) -}}
+  {{- if .Values.dashboard.properties.a1med.url.override -}}
+    {{- printf "%s" .Values.dashboard.properties.a1med.url.override -}}
+  {{- else -}}
+    {{- printf "http://%s/a1mediator%s" $ingress .Values.dashboard.properties.a1med.url.suffix -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "dashboard.endpoint.anrxapp" -}}
+  {{- $ingress := ( include "common.ingressurl.ricxapp" . ) -}}
+  {{- if .Values.dashboard.properties.anrxapp.url.override -}}
+    {{- printf "%s" .Values.dashboard.properties.anrxapp.url.override -}}
+  {{- else -}}
+    {{- printf "http://%s/anr%s" $ingress .Values.dashboard.properties.anrxapp.url.suffix -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "dashboard.endpoint.e2mgr" -}}
+  {{- $ingress := ( include "common.ingressurl.ricplt" . ) -}}
+  {{- if .Values.dashboard.properties.e2mgr.url.override -}}
+    {{- printf "%s" .Values.dashboard.properties.e2mgr.url.override -}}
+  {{- else -}}
+    {{- printf "http://%s/e2mgr%s" $ingress .Values.dashboard.properties.e2mgr.url.suffix -}}
+  {{- end -}}
+{{- end -}}
+    
+{{- define "dashboard.endpoint.xappmgr" -}}
+  {{- $ingress := ( include "common.ingressurl.ricplt" . ) -}}
+  {{- if .Values.dashboard.properties.xappmgr.url.override -}}
+    {{- printf "%s" .Values.dashboard.properties.xappmgr.url.override -}}
+  {{- else -}}
+    {{- printf "http://%s/appmgr%s" $ingress .Values.dashboard.properties.xappmgr.url.suffix -}}
+  {{- end -}}
+{{- end -}}
index 837f4b1..2b68de2 100644 (file)
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: {{ include "dashboard.fullname" . }}-appconfig
+  name: {{ include "common.configmapname.dashboard" . }}-appconfig
 data:
   # this key becomes the filename when mounted
   application.properties: |
     # appconfig.yaml
-    server.port = {{ .Values.dashboard.server.port }}
-    a1med.url =   {{ .Values.dashboard.properties.a1med.url   }}
-    anrxapp.url = {{ .Values.dashboard.properties.anrxapp.url }}
-    e2mgr.url =   {{ .Values.dashboard.properties.e2mgr.url   }}
-    # mock names for R1 testing, empty or missing entry disables the mock
+    server.port = {{ .Values.dashboard.service.http.containerPort }}
+    a1med.url =   {{ include "dashboard.endpoint.a1mediator" . }}
+    anrxapp.url = {{ include "dashboard.endpoint.anrxapp" . }}
+    e2mgr.url =   {{ include "dashboard.endpoint.e2mgr" . }}
+    # mock names for R1 testing, removing this entry disables the mock
     e2mgr.mock.rannames = {{ .Values.dashboard.properties.e2mgr.mock.rannames }}
-    xappmgr.url = {{ .Values.dashboard.properties.xappmgr.url }}
+    xappmgr.url = {{ include "dashboard.endpoint.xappmgr" . }}
index a4b311d..adacef2 100644 (file)
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: {{ include "dashboard.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
+  name: {{ include "common.deploymentname.dashboard" . }}
+  namespace: {{ include "common.namespace.aux" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.aux" . }}-{{ include "common.name.dashboard" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
@@ -29,24 +29,24 @@ spec:
   replicas: {{ .Values.dashboard.replicaCount }}
   selector:
     matchLabels:
-      app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+      app: {{ include "common.namespace.aux" . }}-{{ include "common.name.dashboard" . }}
       release: {{ .Release.Name }}
   template:
     metadata:
       labels:
-        app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        app: {{ include "common.namespace.aux" . }}-{{ include "common.name.dashboard" . }}
         release: {{ .Release.Name }}
     spec:
-      hostname: {{ .Chart.Name }}
+      hostname: {{ include "common.name.dashboard" . }}
       imagePullSecrets:
         - name: {{ include "common.repositoryCred" . }}
       containers:
-        - name: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        - name: {{ include "common.containername.dashboard" . }}
           image: {{ include "common.repository" . }}/{{ .Values.dashboard.image.name }}:{{ .Values.dashboard.image.tag }}
           imagePullPolicy: {{ include "common.pullPolicy" . }}
           ports:
             - name: http
-              containerPort: {{ .Values.dashboard.server.port }}
+              containerPort: {{ .Values.dashboard.service.http.containerPort }}
               protocol: TCP
           volumeMounts:
             - name: application-config
@@ -64,4 +64,4 @@ spec:
       volumes:
         - name: application-config
           configMap:
-            name: {{ include "dashboard.fullname" . }}-appconfig
+            name: {{ include "common.configmapname.dashboard" . }}-appconfig
index 08a4887..b35e408 100644 (file)
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "dashboard.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
+  name: {{ include "common.servicename.dashboard.http" . }}
+  namespace: {{ include "common.namespace.aux" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.aux" . }}-{{ include "common.name.dashboard" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
 spec:
-  type: {{ .Values.dashboard.service.type }}
+  type: NodePort
   ports:
-    - port: {{ .Values.dashboard.server.port }}
-      nodePort: {{ .Values.dashboard.service.port }}
+    - port: {{ .Values.dashboard.service.http.containerPort }}
+      nodePort: {{ .Values.dashboard.service.http.nodeport }}
       targetPort: http
       protocol: TCP
   selector:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.aux" . }}-{{ include "common.name.dashboard" . }}
     release: {{ .Release.Name }}
index 2b8e9a4..17188ac 100644 (file)
@@ -26,27 +26,41 @@ dashboard:
     name: ric-dash-be
     tag: 1.0.5
   replicaCount: 1
-  server:
-    # Tomcat listens here
-    port: 8080
   service:
-    type: NodePort
-    port: 30080
-    name: dashboard-service
+    http:
+      nodeport: 30080
+      # Tomcat listens here
+      containerPort: 8080
   # config URLs must be specified at deployment
   properties:
     # These URLs use K8S/Kong service names
     a1med:
-      # no suffix required
-      url:  http://ricplt-entry/a1mediator
+      # The URL will be provided by the RIC common template
+      url:
+        # no suffix required
+        suffix: ""
+        # You can override the URL using the following option
+        # override:  http://ricplt-entry/a1mediator
     anrxapp:
-      # no suffix required
-      url:  http://ricxapp-entry/anr
+      # The URL will be provided by the RIC common template
+      url:
+        # no suffix required
+        suffix: ""
+        # You can override the URL using the following option
+        # override:  http://ricxapp-entry/anr
     e2mgr:
-      # suffix must be "/v1"
-      url:  http://ricplt-entry/e2mgr/v1
+      # The URL will be provided by the RIC common template
+      url:
+        # suffix must be "/v1"
+        suffix: "/v1"
+        # You can override the URL using the following option
+        # override:  http://ricplt-entry/e2mgr/v1
       mock:
-        rannames: "" # mock with CSV: "ABCD123456, EFGH123456"
+        rannames: "" # mock with CSV; e.g., ABCD123456, EFGH123456
     xappmgr:
-      # suffix must be "/ric/v1"
-      url:  http://ricplt-entry/appmgr/ric/v1
+      # The URL will be provided by the RIC common template
+      url:
+        # suffix must be "/ric/v1"
+        suffix: "/ric/v1"
+        # You can override the URL using the following option
+        # override:  http://ricplt-entry/appmgr/ric/v1
index 552c237..39ca0ea 100755 (executable)
@@ -29,16 +29,38 @@ if [ -z "$RICAUX_RELEASE_NAME" ];then
 else
    RELEASE_NAME=$RICAUX_RELEASE_NAME
 fi
+
+# Namespace configuration
+if [ -z "$RICPLT_NAMESPACE" ];then
+   PLT_NAMESPACE=$plt_namespace
+else
+   PLT_NAMESPACE=$RICPLT_NAMESPACE
+fi
+if [ -z "$RICXAPP_NAMESPACE" ];then
+   XAPP_NAMESPACE=$xapp_namespace
+else
+   XAPP_NAMESPACE=$RICXAPP_NAMESPACE
+fi
 if [ -z "$RICAUX_NAMESPACE" ];then
-   NAMESPACE=$namespace
+   AUX_NAMESPACE=$aux_namespace
+else
+   AUX_NAMESPACE=$RICAUX_NAMESPACE
+fi
+if [ -z "$RICINFRA_NAMESPACE" ];then
+   INFRA_NAMESPACE=$infra_namespace
+else
+   INFRA_NAMESPACE=$RICINFRA_NAMESPACE
+fi
+
+if [ -z "$RIC_COMMON_OVERRIDE" ];then
+   COMMON_OVERRIDE="--set global.namespace.platform=$PLT_NAMESPACE --set global.namespace.xapp=$XAPP_NAMESPACE --set global.namespace.aux=$AUX_NAMESPACE --set global.namespace.infra=$INFRA_NAMESPACE"
 else
-   NAMESPACE=$RICAUX_NAMESPACE
+   COMMON_OVERRIDE=$RIC_COMMON_OVERRIDE
 fi
 
 RICAUX_COMPONENTS="ext"
 
 echo "Deploying RIC AUX components [$RICAUX_COMPONENTS]"
-echo "Platform Namespace: $NAMESPACE"
 echo "Helm Release Name: $RELEASE_NAME"
 
 
@@ -52,8 +74,8 @@ for component in $RICAUX_COMPONENTS; do
   mkdir -p  $DIR/../helm/$component/charts/
   cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/$component/charts/
   if [ -z $OVERRIDEYAML ]; then
-  helm install --debug --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component
+  helm install --debug --namespace $AUX_NAMESPACE --name "${RELEASE_NAME}-$component" $COMMON_OVERRIDE $DIR/../helm/$component
   else
-  helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component
+  helm install -f $OVERRIDEYAML --namespace $AUX_NAMESPACE --name "${RELEASE_NAME}-$component" $COMMON_OVERRIDE $DIR/../helm/$component
   fi
 done
index 97edfa2..fd51c57 100755 (executable)
@@ -29,16 +29,10 @@ if [ -z "$RICAUX_RELEASE_NAME" ];then
 else
    RELEASE_NAME=$RICAUX_RELEASE_NAME
 fi
-if [ -z "$RICAUX_NAMESPACE" ];then
-   NAMESPACE=$namespace
-else
-   NAMESPACE=$RICAUX_NAMESPACE
-fi
 
 RICAUX_COMPONENTS="ext"
 
 echo "Undeploying RIC AUX components [$RICAUX_COMPONENTS]"
-echo "Platform Namespace: $NAMESPACE"
 echo "Helm Release Name: $RELEASE_NAME"
 
 
index 0ee625b..92008b5 100644 (file)
 
 
 # helm_release_name defines the release name helm will use to deploy RIC
-# It will be overrided by RICAUX_RELEASE_NAME
-helm_release_name=r0
+# It will be overrided by RICPLT_RELEASE_NAME
+helm_release_name=r1
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICPLT_NAMESPACE
+plt_namespace=ricplt
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICXAPP_NAMESPACE
+xapp_namespace=ricxapp
 
 # namespace defines the namespace that helm will use to deploy RIC
 # It will be overrided by RICAUX_NAMESPACE
-namespace=ricaux
+aux_namespace=ricaux
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICINFRA_NAMESPACE
+infra_namespace=ricinfra
index 8cb57d7..7aa2795 100644 (file)
   {{- $name := ( include "common.fullname.nexus" . ) -}}
   {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
+
+{{- define "common.configmapname.dashboard" -}}
+  {{- $name := ( include "common.fullname.dashboard" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.messagerouter" -}}
+  {{- $name := ( include "common.fullname.messagerouter" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.ves" -}}
+  {{- $name := ( include "common.fullname.ves" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_containername.tpl b/ric-common/Common-Template/helm/ric-common/templates/_containername.tpl
new file mode 100644 (file)
index 0000000..3935beb
--- /dev/null
@@ -0,0 +1,71 @@
+################################################################################
+#   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.                                             #
+################################################################################
+
+{{/*
+  Resolve the name of a chart's container.
+*/}}
+
+
+{{- define "common.containername.appmgr" -}}
+  {{- $name := ( include "common.fullname.appmgr" . ) -}}
+  {{- printf "container-%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.containername.e2mgr" -}}
+  {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+  {{- printf "container-%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.containername.rtmgr" -}}
+  {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+  {{- printf "container-%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.containername.nexus" -}}
+  {{- $name := ( include "common.fullname.nexus" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.dashboard" -}}
+  {{- $name := ( include "common.fullname.dashboard" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.messagerouter" -}}
+  {{- $name := ( include "common.fullname.messagerouter" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.containername.ves" -}}
+  {{- $name := ( include "common.fullname.ves" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
index 4242ab8..185bfc1 100644 (file)
   {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-
-
 {{- define "common.deploymentname.nexus" -}}
   {{- $name := ( include "common.fullname.nexus" . ) -}}
   {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
+
+{{- define "common.deploymentname.dashboard" -}}
+  {{- $name := ( include "common.fullname.dashboard" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.messagerouter" -}}
+  {{- $name := ( include "common.fullname.messagerouter" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.ves" -}}
+  {{- $name := ( include "common.fullname.ves" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
index 894ad05..f80063f 100644 (file)
@@ -46,3 +46,8 @@
   {{- $name := ( include "common.fullname.nexus" . ) -}}
   {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
+
+{{- define "common.ingressname.ves" -}}
+  {{- $name := ( include "common.fullname.ves" . ) -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
index f712184..f86bc24 100644 (file)
@@ -35,7 +35,8 @@
 
 {{- define "common.fullname.appmgr" -}}
   {{- $name := ( include "common.name.appmgr" . ) -}}
-  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 
@@ -53,7 +54,8 @@
 
 {{- define "common.fullname.dbaas" -}}
   {{- $name := ( include "common.name.dbaas" . ) -}}
-  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 
@@ -81,7 +83,8 @@
 
 {{- define "common.fullname.e2mgr" -}}
   {{- $name := ( include "common.name.e2mgr" . ) -}}
-  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 {{- define "common.name.e2term" -}}
 
 {{- define "common.fullname.e2term" -}}
   {{- $name := ( include "common.name.e2term" . ) -}}
-  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 
 
 {{- define "common.fullname.rtmgr" -}}
   {{- $name := ( include "common.name.rtmgr" . ) -}}
-  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 
 
 {{- define "common.fullname.a1mediator" -}}
   {{- $name := ( include "common.name.a1mediator" . ) -}}
-  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 
 
 {{- define "common.fullname.nexus" -}}
   {{- $name := ( include "common.name.nexus" . ) -}}
-  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+  {{- $namespace := ( include "common.namespace.infra" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "common.name.dashboard" -}}
+  {{- if .Values.dashboard -}}
+    {{- if .Values.dashboard.nameOverride -}}
+      {{- printf "%s" .Values.dashboard.nameOverride -}}
+    {{- else -}}
+      {{- printf "dashboard" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "dashboard" -}}
+  {{- end -}}
+{{- end -}}
+
+
+{{- define "common.fullname.dashboard" -}}
+  {{- $name := ( include "common.name.dashboard" . ) -}}
+  {{- $namespace := ( include "common.namespace.aux" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.name.messagerouter" -}}
+  {{- if .Values.messagerouter -}}
+    {{- if .Values.messagerouter.nameOverride -}}
+      {{- printf "%s" .Values.messagerouter.nameOverride -}}
+    {{- else -}}
+      {{- printf "messagerouter" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "messagerouter" -}}
+  {{- end -}}
+{{- end -}}
+
+
+{{- define "common.fullname.messagerouter" -}}
+  {{- $name := ( include "common.name.messagerouter" . ) -}}
+  {{- $namespace := ( include "common.namespace.aux" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 
+{{- define "common.name.ves" -}}
+  {{- if .Values.ves -}}
+    {{- if .Values.ves.nameOverride -}}
+      {{- printf "%s" .Values.ves.nameOverride -}}
+    {{- else -}}
+      {{- printf "ves" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "ves" -}}
+  {{- end -}}
+{{- end -}}
 
 
+{{- define "common.fullname.ves" -}}
+  {{- $name := ( include "common.name.ves" . ) -}}
+  {{- $namespace := ( include "common.namespace.aux" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
 
 {{- define "common.name" -}}
   {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
index a657432..c506a59 100644 (file)
 
   - .Values.nsPrefix  : override namespace prefix
 */}}
+
+{{- define "common.namespace.platform" -}}
+  {{- if .Values.global -}}
+    {{- if .Values.global.namespace -}}
+      {{- if .Values.global.namespace.platform -}}
+        {{- printf "%s" .Values.global.namespace.platform -}}
+      {{- else -}}
+        {{- printf "ricplt" -}}
+      {{- end -}}
+    {{- else -}}
+      {{- printf "ricplt" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "ricplt" -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "common.namespace.aux" -}}
+  {{- if .Values.global -}}
+    {{- if .Values.global.namespace -}}
+      {{- if .Values.global.namespace.aux -}}
+        {{- printf "%s" .Values.global.namespace.aux -}}
+      {{- else -}}
+        {{- printf "ricaux" -}}
+      {{- end -}}
+    {{- else -}}
+      {{- printf "ricaux" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "ricaux" -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "common.namespace.xapp" -}}
+  {{- if .Values.global -}}
+    {{- if .Values.global.namespace -}}
+      {{- if .Values.global.namespace.xapp -}}
+        {{- printf "%s" .Values.global.namespace.xapp -}}
+      {{- else -}}
+        {{- printf "ricxapp" -}}
+      {{- end -}}
+    {{- else -}}
+      {{- printf "ricxapp" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "ricxapp" -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "common.namespace.infra" -}}
+  {{- if .Values.global -}}
+    {{- if .Values.global.namespace -}}
+      {{- if .Values.global.namespace.infra -}}
+        {{- printf "%s" .Values.global.namespace.infra -}}
+      {{- else -}}
+        {{- printf "ricinfra" -}}
+      {{- end -}}
+    {{- else -}}
+      {{- printf "ricinfra" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "ricinfra" -}}
+  {{- end -}}
+{{- end -}}
+
 {{- define "common.namespace" -}}
   {{- default .Release.Namespace .Values.nsPrefix -}}
 {{- end -}}
index c9804f5..e4e337f 100644 (file)
   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-
 {{- define "common.servicename.nexus.http" -}}
   {{- $name := ( include "common.fullname.nexus" . ) -}}
   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
+
+{{- define "common.servicename.dashboard.http" -}}
+  {{- $name := ( include "common.fullname.dashboard" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
 ###################### TCP Service ##################################
 
 {{- define "common.servicename.dbaas.tcp" -}}
   {{- $name := ( include "common.fullname.dbaas" . ) -}}
   {{- printf "service-%s-tcp" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
+
+{{- define "common.servicename.messagerouter.tcp" -}}
+  {{- $name := ( include "common.fullname.messagerouter" . ) -}}
+  {{- printf "service-%s-tcp" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.ves.tcp" -}}
+  {{- $name := ( include "common.fullname.ves" . ) -}}
+  {{- printf "service-%s-tcp" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
index f160a48..f1ca83a 100755 (executable)
@@ -27,16 +27,36 @@ if [ -z "$RICINFRA_RELEASE_NAME" ];then
 else
    RELEASE_NAME=$RICINFRA_RELEASE_NAME
 fi
+
+# Namespace configuration
+if [ -z "$RICPLT_NAMESPACE" ];then
+   PLT_NAMESPACE=$plt_namespace
+else
+   PLT_NAMESPACE=$RICPLT_NAMESPACE
+fi
+if [ -z "$RICXAPP_NAMESPACE" ];then
+   XAPP_NAMESPACE=$xapp_namespace
+else
+   XAPP_NAMESPACE=$RICXAPP_NAMESPACE
+fi
+if [ -z "$RICAUX_NAMESPACE" ];then
+   AUX_NAMESPACE=$aux_namespace
+else
+   AUX_NAMESPACE=$RICAUX_NAMESPACE
+fi
 if [ -z "$RICINFRA_NAMESPACE" ];then
-   NAMESPACE=$namespace
+   INFRA_NAMESPACE=$infra_namespace
 else
-   NAMESPACE=$RICINFRA_NAMESPACE
+   INFRA_NAMESPACE=$RICINFRA_NAMESPACE
 fi
 
-
+if [ -z "$RIC_COMMON_OVERRIDE" ];then
+   COMMON_OVERRIDE="--set global.namespace.platform=$PLT_NAMESPACE --set global.namespace.xapp=$XAPP_NAMESPACE --set global.namespace.aux=$AUX_NAMESPACE --set global.namespace.infra=$INFRA_NAMESPACE"
+else
+   COMMON_OVERRIDE=$RIC_COMMON_OVERRIDE
+fi
 
 echo "Deploying nexus repo managers for local docker registry and helm repo."
-echo "Name Space: $NAMESPACE"
 echo "Helm Release: $RELEASE_NAME"
 
 
@@ -57,9 +77,9 @@ mkdir -p  $DIR/../helm/charts/
 cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/charts/
 
 if [ -z $OVERRIDEYAML ]; then
-helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-nexus" $DIR/../helm
+helm install --namespace $INFRA_NAMESPACE --name "${RELEASE_NAME}-nexus" $COMMON_OVERRIDE $DIR/../helm
 else
-helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-nexus" $DIR/../helm
+helm install -f $OVERRIDEYAML --namespace $INFRA_NAMESPACE --name "${RELEASE_NAME}-nexus" $COMMON_OVERRIDE $DIR/../helm
 fi
 
 
index d185b61..0f965de 100755 (executable)
@@ -27,20 +27,10 @@ if [ -z "$RICINFRA_RELEASE_NAME" ];then
 else
    RELEASE_NAME=$RICINFRA_RELEASE_NAME
 fi
-if [ -z "$RICINFRA_NAMESPACE" ];then
-   NAMESPACE=$namespace
-else
-   NAMESPACE=$RICINFRA_NAMESPACE
-fi
-if [ -z "$INGRESS_PORT" ];then
-   INGRESS_PORT_NEXUS=$ingress_port
-else
-   INGRESS_PORT_NEXUS=$INGRESS_PORT
-fi
+
 
 
 
 echo "Undeploying nexus repo managers for local docker registry and helm repo."
-echo "Name Space: $NAMESPACE"
 echo "Helm Release: $RELEASE_NAME"
 helm delete --purge  "${RELEASE_NAME}-nexus" 
index f706d46..038dbe7 100644 (file)
 ################################################################################
 
 
+# helm_release_name defines the release name helm will use to deploy RIC
+# It will be overrided by RICPLT_RELEASE_NAME
+helm_release_name=r1
 
-# helm_release_name defines the release name helm will use to deploy nexus
-# It will be overrided by RICINFRA_RELEASE_NAME
-helm_release_name=r0
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICPLT_NAMESPACE
+plt_namespace=ricplt
 
-# namespace defines the namespace that helm will use to deploy nexus
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICXAPP_NAMESPACE
+xapp_namespace=ricxapp
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICAUX_NAMESPACE
+aux_namespace=ricaux
+
+# namespace defines the namespace that helm will use to deploy RIC
 # It will be overrided by RICINFRA_NAMESPACE
-namespace=ricinfra
+infra_namespace=ricinfra
 
 
 default_admin_password=admin123
index 6ed84d1..91f72ef 100644 (file)
@@ -18,7 +18,7 @@
 apiVersion: batch/v1
 kind: Job
 metadata:
-  name: job-{{ include "common.name.nexus" . }}-save-certs
+  name: job-{{ include "common.fullname.nexus" . }}-save-certs
 spec:
   template:
     spec:
index b7d0c6f..a714cee 100755 (executable)
@@ -29,10 +29,32 @@ if [ -z "$RICAUX_RELEASE_NAME" ];then
 else
    RELEASE_NAME=$RICAUX_RELEASE_NAME
 fi
+# Namespace configuration
+if [ -z "$RICPLT_NAMESPACE" ];then
+   PLT_NAMESPACE=$plt_namespace
+else
+   PLT_NAMESPACE=$RICPLT_NAMESPACE
+fi
+if [ -z "$RICXAPP_NAMESPACE" ];then
+   XAPP_NAMESPACE=$xapp_namespace
+else
+   XAPP_NAMESPACE=$RICXAPP_NAMESPACE
+fi
 if [ -z "$RICAUX_NAMESPACE" ];then
-   NAMESPACE=$namespace
+   AUX_NAMESPACE=$aux_namespace
+else
+   AUX_NAMESPACE=$RICAUX_NAMESPACE
+fi
+if [ -z "$RICINFRA_NAMESPACE" ];then
+   INFRA_NAMESPACE=$infra_namespace
+else
+   INFRA_NAMESPACE=$RICINFRA_NAMESPACE
+fi
+
+if [ -z "$RIC_COMMON_OVERRIDE" ];then
+   COMMON_OVERRIDE="--set global.namespace.platform=$PLT_NAMESPACE --set global.namespace.xapp=$XAPP_NAMESPACE --set global.namespace.aux=$AUX_NAMESPACE --set global.namespace.infra=$INFRA_NAMESPACE"
 else
-   NAMESPACE=$RICAUX_NAMESPACE
+   COMMON_OVERRIDE=$RIC_COMMON_OVERRIDE
 fi
 
 #helm install --name my-release stable/elastic-stack --set elasticsearch.data.persistence.enabled=false --set elasticsearch.master.persistence.enabled=false --set logstash.persistence.enabled=false 
@@ -40,7 +62,6 @@ fi
 RICAUX_COMPONENTS="elfkp"
 
 echo "Deploying RIC AUX components [$RICAUX_COMPONENTS]"
-echo "Platform Namespace: $NAMESPACE"
 echo "Helm Release Name: $RELEASE_NAME"
 
 
@@ -62,8 +83,8 @@ for component in $RICAUX_COMPONENTS; do
   #eval "$CMD"
 
   if [ -z $OVERRIDEYAML ]; then
-    helm install --debug --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $component
+    helm install --debug --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $COMMON_OVERRIDE $DIR/../helm/$component
   else
-    helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $component
+    helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $COMMON_OVERRIDE $DIR/../helm/$component
   fi
 done
index dba83ea..8a3ba14 100755 (executable)
@@ -29,16 +29,10 @@ if [ -z "$RICAUX_RELEASE_NAME" ];then
 else
    RELEASE_NAME=$RICAUX_RELEASE_NAME
 fi
-if [ -z "$RICAUX_NAMESPACE" ];then
-   NAMESPACE=$namespace
-else
-   NAMESPACE=$RICAUX_NAMESPACE
-fi
 
 RICAUX_COMPONENTS="elfkp"
 
 echo "Undeploying RIC AUX components [$RICAUX_COMPONENTS]"
-echo "Platform Namespace: $NAMESPACE"
 echo "Helm Release Name: $RELEASE_NAME"
 
 
index 700ad79..92008b5 100644 (file)
 
 
 # helm_release_name defines the release name helm will use to deploy RIC
-# It will be overrided by RICAUX_RELEASE_NAME
-helm_release_name=r0
+# It will be overrided by RICPLT_RELEASE_NAME
+helm_release_name=r1
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICPLT_NAMESPACE
+plt_namespace=ricplt
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICXAPP_NAMESPACE
+xapp_namespace=ricxapp
 
 # namespace defines the namespace that helm will use to deploy RIC
 # It will be overrided by RICAUX_NAMESPACE
-namespace=ricinfra
+aux_namespace=ricaux
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICINFRA_NAMESPACE
+infra_namespace=ricinfra
index 1c38a86..bae3107 100755 (executable)
@@ -30,10 +30,32 @@ if [ -z "$RICPLT_RELEASE_NAME" ];then
 else
    RELEASE_NAME=$RICPLT_RELEASE_NAME
 fi
+# Namespace configuration
 if [ -z "$RICPLT_NAMESPACE" ];then
-   NAMESPACE=$namespace
+   PLT_NAMESPACE=$plt_namespace
 else
-   NAMESPACE=$RICPLT_NAMESPACE
+   PLT_NAMESPACE=$RICPLT_NAMESPACE
+fi
+if [ -z "$RICXAPP_NAMESPACE" ];then
+   XAPP_NAMESPACE=$xapp_namespace
+else
+   XAPP_NAMESPACE=$RICXAPP_NAMESPACE
+fi
+if [ -z "$RICAUX_NAMESPACE" ];then
+   AUX_NAMESPACE=$aux_namespace
+else
+   AUX_NAMESPACE=$RICAUX_NAMESPACE
+fi
+if [ -z "$RICINFRA_NAMESPACE" ];then
+   INFRA_NAMESPACE=$infra_namespace
+else
+   INFRA_NAMESPACE=$RICINFRA_NAMESPACE
+fi
+
+if [ -z "$RIC_COMMON_OVERRIDE" ];then
+   COMMON_OVERRIDE="--set global.namespace.platform=$PLT_NAMESPACE --set global.namespace.xapp=$XAPP_NAMESPACE --set global.namespace.aux=$AUX_NAMESPACE --set global.namespace.infra=$INFRA_NAMESPACE"
+else
+   COMMON_OVERRIDE=$RIC_COMMON_OVERRIDE
 fi
 
 COMMON_CHART_VERSION=$(cat $DIR/../../../ric-common/Common-Template/helm/ric-common/Chart.yaml | grep version | awk '{print $2}')
@@ -45,8 +67,14 @@ cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/charts/
 
 
 if [ -z $OVERRIDEYAML ]; then
-  helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-${NAMESPACE}-credential" $DIR/../helm
+  helm install --namespace "${PLT_NAMESPACE}" --name "${RELEASE_NAME}-${PLT_NAMESPACE}-credential" $COMMON_OVERRIDE $DIR/../helm
+  helm install --namespace "${XAPP_NAMESPACE}" --name "${RELEASE_NAME}-${XAPP_NAMESPACE}-credential" $COMMON_OVERRIDE $DIR/../helm
+  helm install --namespace "${AUX_NAMESPACE}" --name "${RELEASE_NAME}-${AUX_NAMESPACE}-credential" $COMMON_OVERRIDE $DIR/../helm
+  helm install --namespace "${INFRA_NAMESPACE}" --name "${RELEASE_NAME}-${INFRA_NAMESPACE}-credential" $COMMON_OVERRIDE $DIR/../helm
 else
-  helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-${NAMESPACE}-credential" $DIR/../helm
+  helm install -f $OVERRIDEYAML --namespace "${PLT_NAMESPACE}" --name "${RELEASE_NAME}-${PLT_NAMESPACE}-credential" $COMMON_OVERRIDE $DIR/../helm
+  helm install -f $OVERRIDEYAML --namespace "${XAPP_NAMESPACE}" --name "${RELEASE_NAME}-${XAPP_NAMESPACE}-credential" $COMMON_OVERRIDE $DIR/../helm
+  helm install -f $OVERRIDEYAML --namespace "${AUX_NAMESPACE}" --name "${RELEASE_NAME}-${AUX_NAMESPACE}-credential" $COMMON_OVERRIDE $DIR/../helm
+  helm install -f $OVERRIDEYAML --namespace "${INFRA_NAMESPACE}" --name "${RELEASE_NAME}-${INFRA_NAMESPACE}-credential" $COMMON_OVERRIDE $DIR/../helm
 fi
 
index c820c7f..4eda797 100755 (executable)
@@ -30,11 +30,32 @@ if [ -z "$RICPLT_RELEASE_NAME" ];then
 else
    RELEASE_NAME=$RICPLT_RELEASE_NAME
 fi
+
+# Namespace configuration
 if [ -z "$RICPLT_NAMESPACE" ];then
-   NAMESPACE=$namespace
+   PLT_NAMESPACE=$plt_namespace
+else
+   PLT_NAMESPACE=$RICPLT_NAMESPACE
+fi
+if [ -z "$RICXAPP_NAMESPACE" ];then
+   XAPP_NAMESPACE=$xapp_namespace
+else
+   XAPP_NAMESPACE=$RICXAPP_NAMESPACE
+fi
+if [ -z "$RICAUX_NAMESPACE" ];then
+   AUX_NAMESPACE=$aux_namespace
+else
+   AUX_NAMESPACE=$RICAUX_NAMESPACE
+fi
+if [ -z "$RICINFRA_NAMESPACE" ];then
+   INFRA_NAMESPACE=$infra_namespace
 else
-   NAMESPACE=$RICPLT_NAMESPACE
+   INFRA_NAMESPACE=$RICINFRA_NAMESPACE
 fi
 
-helm delete --purge "${RELEASE_NAME}-${NAMESPACE}-credential"
+helm delete --purge "${RELEASE_NAME}-${PLT_NAMESPACE}-credential"
+helm delete --purge "${RELEASE_NAME}-${XAPP_NAMESPACE}-credential"
+helm delete --purge "${RELEASE_NAME}-${AUX_NAMESPACE}-credential"
+helm delete --purge "${RELEASE_NAME}-${INFRA_NAMESPACE}-credential"
+
 
index c4fc902..92008b5 100644 (file)
 ################################################################################
 
 
-# helm_release_name defines the release name helm will use to deploy the credential
+# helm_release_name defines the release name helm will use to deploy RIC
 # It will be overrided by RICPLT_RELEASE_NAME
-helm_release_name=r0
+helm_release_name=r1
 
-# namespace defines the namespace that helm will use to deploy the credential
+# namespace defines the namespace that helm will use to deploy RIC
 # It will be overrided by RICPLT_NAMESPACE
-namespace=ricplt
+plt_namespace=ricplt
 
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICXAPP_NAMESPACE
+xapp_namespace=ricxapp
 
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICAUX_NAMESPACE
+aux_namespace=ricaux
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICINFRA_NAMESPACE
+infra_namespace=ricinfra
diff --git a/ric-infra/40-Credential/helm/resources/tls.crt b/ric-infra/40-Credential/helm/resources/tls.crt
deleted file mode 100644 (file)
index 08bcca2..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIEADCCAuigAwIBAgIJALB/C/KeS4iuMA0GCSqGSIb3DQEBCwUAMIGUMQswCQYD
-VQQGEwJVUzETMBEGA1UECAwKTmV3IEplcnNleTETMBEGA1UEBwwKQmVkbWluc3Rl
-cjENMAsGA1UECgwEQVQmVDEWMBQGA1UECwwNTGFicyBSZXNlYXJjaDEXMBUGA1UE
-AwwOcmljaW5mcmEtZW50cnkxGzAZBgkqhkiG9w0BCQEWDHJpY0BvcmFuLm9yZzAe
-Fw0xOTA2MjkwMjAyNTdaFw0yMDA2MjgwMjAyNTdaMIGUMQswCQYDVQQGEwJVUzET
-MBEGA1UECAwKTmV3IEplcnNleTETMBEGA1UEBwwKQmVkbWluc3RlcjENMAsGA1UE
-CgwEQVQmVDEWMBQGA1UECwwNTGFicyBSZXNlYXJjaDEXMBUGA1UEAwwOcmljaW5m
-cmEtZW50cnkxGzAZBgkqhkiG9w0BCQEWDHJpY0BvcmFuLm9yZzCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAKSXZuxSxglJdRgrfYbaPIjivpv6fNPOQ3mL
-LRAYWn4KwQFzwx+8c++BE4isG037hwsSbco8ZmFIduOdos7tqKSMPSwZkz7n6rUu
-xgis2VGJhgcEzpsnqai+pmcbnu2IaisAR73V4ILCRQBn+5QIH7EXbPOGc9eyEvjq
-s8zKSx73ScxUNFR3D3SPdPU3hGbGGb77LStfV3mzUigYd7zbfPjp0v50xRRMS/tr
-nv9MjRtZjuKwLHJfMsoFJtMBIP/IoggSb1VfHZR8GJhFWxPu+lGGqFxiuylVIcp3
-mkxBZ5xfX13RHJshrGChtf/aqudju1j3hBbAxSkftFkkceQ0cTECAwEAAaNTMFEw
-HQYDVR0OBBYEFDHaLptOqWPK9UdkcWlw6XnKx51IMB8GA1UdIwQYMBaAFDHaLptO
-qWPK9UdkcWlw6XnKx51IMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQAD
-ggEBAAKtolJatF/nbQU2jdTqq0iwGdG4vngRZvCUyQM2aVozb+znR44fOxbDtZ3V
-z9gBicFjdGEtml3wWY1hiFkoJNQOMyAjZZ+Du17u0Y3HcQHCtvaODwHhjE6iQTEq
-H8SAjWMQumrBkdGLUt+LkPoGbwS5JBv4vnVaEOkIf5uDCM2RQea2pZRmHDLYS8tT
-sGdg5LVq4luu7NI/WIIoDH6OnSerenoqEZLIuTL62/kGqiNSzkpUCjQYWClCwlGX
-CuDMDJuGIrdNt16mR3PAe4NkWeyMD2HeG/Ka2GdSq9UT5F4lDyDtOLqD+PCHjTMb
-hCBc7V4Ppj0+JVHzXWU2m+5HK0Q=
------END CERTIFICATE-----
index 83d4967..e908b87 100644 (file)
 #   limitations under the License.                                             #
 ################################################################################
 
-{{/* vim: set filetype=mustache: */}}
-{{/*
-Expand the name of the chart.
-*/}}
-{{- define "ricapp.name" -}}
-{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-
-{{/*
-Create a default fully qualified app name.
-We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
-If release name contains chart name it will be used as a full name.
-*/}}
-{{- define "ricapp.fullname" -}}
-{{- if .Values.ricapp.fullnameOverride -}}
-{{- .Values.ricapp.fullnameOverride | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- $name := default .Chart.Name .Values.ricapp.nameOverride -}}
-{{- if contains $name .Release.Name -}}
-{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-{{- end -}}
-{{- end -}}
-
-{{/*
-Create chart name and version as used by the chart label.
-*/}}
-{{- define "ricapp.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-
 
 {{/*
   Resolve the image repository secret token.
@@ -59,7 +26,7 @@ Create chart name and version as used by the chart label.
 */}}
 {{- define "repository.secret" -}}
   {{- $repo := include "common.repository" . }}
-  {{- $cred := .Values.repositoryCredential }}
+  {{- $cred := .Values.credential.repositoryCredential }}
   {{- $user := default "docker" $cred.user }}
   {{- $password := default "docker" $cred.password }}
   {{- $mail := default "@" $cred.mail }}
@@ -70,12 +37,12 @@ Create chart name and version as used by the chart label.
 
 
 {{- define "helmrepo.secret.user" -}}
-  {{- $user := default "helm" .Values.helmrepoCredential.user -}}
+  {{- $user := default "helm" .Values.credential.helmrepoCredential.user -}}
   {{- printf "%s" $user |b64enc }}
 {{- end -}}
 
 
 {{- define "helmrepo.secret.password" -}}
-  {{- $pass := default "helm" .Values.helmrepoCredential.password -}}
+  {{- $pass := default "helm" .Values.credential.helmrepoCredential.password -}}
   {{- printf "%s" $pass |b64enc }}
 {{- end -}}
index 7140d6b..0962061 100644 (file)
@@ -20,5 +20,6 @@ kind: ConfigMap
 metadata:
   name: xapp-mgr-certs
 data:
-  {{ (.Files.Glob "resources/tls.crt").AsConfig | nindent 2 }}
+  tls.crt: |
+  {{- .Values.credential.helmCertificate | nindent 4 }}
 
index ad22a1a..e47f912 100644 (file)
 
 repository: "nexus3.o-ran-sc.org:10004"
 
-repositoryCredential:
-  user: "docker"
-  password: "docker"
 
-
-helmrepoCredential:
-  user: "helm"
-  password: "helm"
+credential:
+  repositoryCredential:
+    user: "docker"
+    password: "docker"
+  
+  
+  helmrepoCredential:
+    user: "helm"
+    password: "helm"
+  
+  helmCertificate: |2 
+    -----BEGIN CERTIFICATE-----
+    <CERT FOR HELM>
+    -----END CERTIFICATE-----
index e4c031e..ea7f493 100755 (executable)
@@ -30,17 +30,39 @@ if [ -z "$RICPLT_RELEASE_NAME" ];then
 else
    RELEASE_NAME=$RICPLT_RELEASE_NAME
 fi
+
+# Namespace configuration
 if [ -z "$RICPLT_NAMESPACE" ];then
-   NAMESPACE=$namespace
+   PLT_NAMESPACE=$plt_namespace
+else
+   PLT_NAMESPACE=$RICPLT_NAMESPACE
+fi
+if [ -z "$RICXAPP_NAMESPACE" ];then
+   XAPP_NAMESPACE=$xapp_namespace
+else
+   XAPP_NAMESPACE=$RICXAPP_NAMESPACE
+fi
+if [ -z "$RICAUX_NAMESPACE" ];then
+   AUX_NAMESPACE=$aux_namespace
+else
+   AUX_NAMESPACE=$RICAUX_NAMESPACE
+fi
+if [ -z "$RICINFRA_NAMESPACE" ];then
+   INFRA_NAMESPACE=$infra_namespace
+else
+   INFRA_NAMESPACE=$RICINFRA_NAMESPACE
+fi
+
+if [ -z "$RIC_COMMON_OVERRIDE" ];then
+   COMMON_OVERRIDE="--set global.namespace.platform=$PLT_NAMESPACE --set global.namespace.xapp=$XAPP_NAMESPACE --set global.namespace.aux=$AUX_NAMESPACE --set global.namespace.infra=$INFRA_NAMESPACE"
 else
-   NAMESPACE=$RICPLT_NAMESPACE
+   COMMON_OVERRIDE=$RIC_COMMON_OVERRIDE
 fi
 
 
 RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator kong-platform kong-xapp"
 
 echo "Deploying RIC Platform components [$RICPLT_COMPONENTS]"
-echo "Platform Namespace: $NAMESPACE"
 echo "Helm Release Name: $RELEASE_NAME"
 
 
@@ -57,24 +79,23 @@ for component in $RICPLT_COMPONENTS; do
   if [ $component = "kong-platform" ]; then
      mkdir -p $DIR/../helm/$component/charts
      helm dep up $DIR/../helm/$component
-     helm install --namespace ricplt --name "${RELEASE_NAME}-$component" $DIR/../helm/$component --set postgresql.enabled=false --set env.database=off
+     helm install --namespace $PLT_NAMESPACE --name "${RELEASE_NAME}-$component" $DIR/../helm/$component --set postgresql.enabled=false --set env.database=off
      continue
   fi
 
   if [ $component = "kong-xapp" ]; then
      mkdir -p $DIR/../helm/$component/charts 
      helm dep up $DIR/../helm/$component
-     helm install --namespace ricxapp --name "${RELEASE_NAME}-$component" $DIR/../helm/$component --set postgresql.enabled=false --set env.database=off
+     helm install --namespace $XAPP_NAMESPACE --name "${RELEASE_NAME}-$component" $DIR/../helm/$component --set postgresql.enabled=false --set env.database=off
      continue
   fi
 
-  echo "not kong component"
      
   mkdir -p $DIR/../helm/$component/charts/
   cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/$component/charts/
   if [ -z $OVERRIDEYAML ]; then
-  helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component
+  helm install --namespace "${PLT_NAMESPACE}" --name "${RELEASE_NAME}-$component" $COMMON_OVERRIDE $DIR/../helm/$component
   else
-  helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component
+  helm install -f $OVERRIDEYAML --namespace "${PLT_NAMESPACE}" --name "${RELEASE_NAME}-$component" $COMMON_OVERRIDE $DIR/../helm/$component
   fi
 done
index d4d2c62..38e7ca4 100755 (executable)
@@ -29,18 +29,11 @@ if [ -z "$RICPLT_RELEASE_NAME" ];then
 else
    RELEASE_NAME=$RICPLT_RELEASE_NAME
 fi
-if [ -z "$RICPLT_NAMESPACE" ];then
-   NAMESPACE=$namespace
-else
-   NAMESPACE=$RICPLT_NAMESPACE
-fi
-
 
 RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator kong-platform kong-xapp"
 
 
 echo "Undeploying RIC Platform components [$RICPLT_COMPONENTS]"
-echo "Platform Namespace: $NAMESPACE"
 echo "Helm Release Name: $RELEASE_NAME"
 
 
index 29339d8..92008b5 100644 (file)
 
 # helm_release_name defines the release name helm will use to deploy RIC
 # It will be overrided by RICPLT_RELEASE_NAME
-helm_release_name=r0
+helm_release_name=r1
 
 # namespace defines the namespace that helm will use to deploy RIC
 # It will be overrided by RICPLT_NAMESPACE
-namespace=ricplt
+plt_namespace=ricplt
 
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICXAPP_NAMESPACE
+xapp_namespace=ricxapp
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICAUX_NAMESPACE
+aux_namespace=ricaux
 
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICINFRA_NAMESPACE
+infra_namespace=ricinfra
index 7e52fda..db68c15 100644 (file)
@@ -23,21 +23,21 @@ metadata:
 data:
   local.rt: |
     newrt|start
-    rte|10060|{{ include "common.servicename.e2term.rmr" . }}.ricplt:38000
-    rte|10061|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|10062|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|10080|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|10360|{{ include "common.servicename.e2term.rmr" . }}.ricplt:38000
-    rte|10361|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|10362|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|12010|{{ include "common.servicename.e2term.rmr" . }}.ricplt:38000
-    rte|20001|{{ include "common.servicename.a1mediator.rmr" . }}.ricplt:4562
-    rte|12011|service-ricxapp-admctrl-rmr.ricxapp:4563
-    rte|12012|service-ricxapp-admctrl-rmr.ricxapp:4563
-    rte|12021|service-ricxapp-admctrl-rmr.ricxapp:4563;service-ricxapp-ueec-rmr.ricxapp:4560
-    rte|12022|service-ricxapp-admctrl-rmr.ricxapp:4563;service-ricxapp-ueec-rmr.ricxapp:4560
-    rte|12050|service-ricxapp-admctrl-rmr.ricxapp:4563;service-ricxapp-ueec-rmr.ricxapp:4560
-    rte|20000|service-ricxapp-admctrl-rmr.ricxapp:4563
+    rte|10060|{{ include "common.servicename.e2term.rmr" . }}.{{ include "common.namespace.platform" . }}:38000
+    rte|10061|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|10062|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|10080|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|10360|{{ include "common.servicename.e2term.rmr" . }}.{{ include "common.namespace.platform" . }}:38000
+    rte|10361|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|10362|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|12010|{{ include "common.servicename.e2term.rmr" . }}.{{ include "common.namespace.platform" . }}:38000
+    rte|20001|{{ include "common.servicename.a1mediator.rmr" . }}.{{ include "common.namespace.platform" . }}:4562
+    rte|12011|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563
+    rte|12012|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563
+    rte|12021|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563;service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" . }}:4560
+    rte|12022|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563;service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" . }}:4560
+    rte|12050|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563;service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" . }}:4560
+    rte|20000|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563
     newrt|end
-  rmr_string_int_mapping.txt: {{ tpl (.Files.Get "files/rmr_string_int_mapping.txt") . | quote }}
-  ricmanifest.json: {{ tpl (.Files.Get "files/ricmanifest.json") . | quote }}
+  rmr_string_int_mapping.txt: {{ tpl (.Files.Get "resources/rmr_string_int_mapping.txt") . | quote }}
+  ricmanifest.json: {{ tpl (.Files.Get "resources/ricmanifest.json") . | quote }}
index 4eb0110..dbd8857 100644 (file)
@@ -20,9 +20,9 @@ apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.deploymentname.a1mediator" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
@@ -30,19 +30,19 @@ spec:
   replicas: {{ .Values.a1mediator.replicaCount }}
   selector:
     matchLabels:
-      app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
       release: {{ .Release.Name }}
   template:
     metadata:
       labels:
-        app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
         release: {{ .Release.Name }}
     spec:
-      hostname: {{ .Chart.Name }}
+      hostname: {{ include "common.name.a1mediator" . }}
       imagePullSecrets:
         - name: {{ include "common.repositoryCred" . }}
       containers:
-        - name: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        - name: {{ include "common.containername.a1mediator" . }}
           volumeMounts:
           - name: a1conf
             mountPath: /opt/ricmanifest.json
@@ -53,21 +53,20 @@ spec:
           - name: a1conf
             mountPath: /opt/route/local.rt
             subPath: local.rt
-          env:
-          - name: PYTHONUNBUFFERED
-            value: "0"
-          - name: RMR_RCV_RETRY_INTERVAL
-            value: "{{ .Values.a1mediator.rmr_timeout_config.rcv_retry_interval_ms }}"
-          - name: RMR_RETRY_TIMES
-            value: "{{ .Values.a1mediator.rmr_timeout_config.rcv_retry_times }}"
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.a1mediator" . }}-env
           image: {{ include "common.repository" . }}/{{ .Values.a1mediator.image.name }}:{{ .Values.a1mediator.image.tag }}
           imagePullPolicy: {{ include "common.pullPolicy" . }}
           ports:
             - name: http
               containerPort: {{ .Values.a1mediator.service.http.containerPort }}
               protocol: TCP
-            - name: rmr
-              containerPort: {{ .Values.a1mediator.service.rmr.containerPort }}
+            - name: rmrroute
+              containerPort: {{ .Values.a1mediator.service.rmr.route.port }}
+              protocol: TCP
+            - name: rmrdata
+              containerPort: {{ .Values.a1mediator.service.rmr.data.port }}
               protocol: TCP
           livenessProbe:
             httpGet:
@@ -80,4 +79,4 @@ spec:
       volumes:
         - name: "a1conf"
           configMap:
-            name:  {{ include "common.configmapname.a1mediator" . }}-a1conf
\ No newline at end of file
+            name:  {{ include "common.configmapname.a1mediator" . }}-a1conf
diff --git a/ric-platform/50-RIC-Platform/helm/a1mediator/templates/env.yaml b/ric-platform/50-RIC-Platform/helm/a1mediator/templates/env.yaml
new file mode 100644 (file)
index 0000000..3b4203a
--- /dev/null
@@ -0,0 +1,29 @@
+################################################################################
+#   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:
+  DBAAS_SERVICE_HOST: {{ include "common.servicename.dbaas.tcp" . | quote }}
+  DBAAS_SERVICE_PORT: "6379"
+  DBAAS_PORT_6379_TCP_ADDR: {{ include "common.servicename.dbaas.tcp" . | quote }}
+  DBAAS_PORT_6379_TCP_PORT: "6379"
+  RMR_RTG_SVC: "{{ .Values.a1mediator.service.rmr.route.port }}"
+  PYTHONUNBUFFERED: "0"
+  RMR_RCV_RETRY_INTERVAL: "{{ .Values.a1mediator.rmr_timeout_config.rcv_retry_interval_ms }}"
+  RMR_RETRY_TIMES: "{{ .Values.a1mediator.rmr_timeout_config.rcv_retry_times }}"
index c04f6f3..b0f5a49 100644 (file)
@@ -19,9 +19,9 @@ apiVersion: v1
 kind: Service
 metadata:
   name: {{ include "common.servicename.a1mediator.http" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
@@ -33,6 +33,6 @@ spec:
       name: "http"
       targetPort: "http"
   selector:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
     release: {{ .Release.Name }}
 
index 987dde4..7f555ca 100644 (file)
@@ -19,19 +19,23 @@ apiVersion: v1
 kind: Service
 metadata:
   name: {{ include "common.servicename.a1mediator.rmr" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    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: {{ .Values.a1mediator.service.rmr.port }}
+    - port: {{ .Values.a1mediator.service.rmr.route.port }}
       protocol: "TCP"
-      name: "rmr"
-      targetPort: "rmr"
+      name: "rmrroute"
+      targetPort: "rmrroute"
+    - port: {{ .Values.a1mediator.service.rmr.data.port }}
+      protocol: "TCP"
+      name: "rmrdata"
+      targetPort: "rmrdata"
   selector:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
     release: {{ .Release.Name }}
index d09cb18..7893d3c 100644 (file)
@@ -29,15 +29,17 @@ a1mediator:
 
   image:
     name: ric-plt-a1
-    tag: 0.8.2
+    tag: 0.8.3
 
   service:
     http:
       port: 10000
       containerPort: 10000
     rmr:
-      port: 4562
-      containerPort: 4562
+      route:
+        port: 4561
+      data:
+        port: 4562
 
 
 # these are ENV variables that A1 takes; see docs
diff --git a/ric-platform/50-RIC-Platform/helm/appmgr/resources/appenv.yaml b/ric-platform/50-RIC-Platform/helm/appmgr/resources/appenv.yaml
deleted file mode 100644 (file)
index 733bf07..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-NAME: xappmgr
-DBAAS_SERVICE_HOST: __DBAAS_SERVICE_HOST__
-DBAAS_SERVICE_PORT: "6379"
-DBAAS_PORT_6379_TCP_ADDR: __DBAAS_SERVICE_HOST__
-DBAAS_PORT_6379_TCP_PORT: "6379"
index c7c8086..6240038 100644 (file)
@@ -18,7 +18,7 @@
   "retry": 1
 "xapp":
   #Namespace to install xAPPs
-  "namespace": "ricxapp"
+  "namespace": __XAPP_NAMESPACE__
   "tarDir": "/tmp"
   "schema": "descriptors/schema.json"
   "config": "config/config-file.json"
index 02275f0..1a15217 100644 (file)
@@ -26,4 +26,5 @@ data:
     {{- $tiller := include "common.helmrepositorytiller" . | quote -}}
     {{- $tillernamespace := include "common.helmrepositorytillernamespace" . | quote -}}
     {{- $tillerport := include "common.helmrepositorytillerport" . | quote -}}
-    {{- (.Files.Glob "resources/appmgr.yaml").AsConfig | replace "__HELM_REPO__" $helmrepo | replace "__REST_PORT__" $restport | replace "__REPO_NAME__" $reponame | replace "__TILLER_SERVICE__" $tiller | replace "__TILLER_NAMESPACE__" $tillernamespace | replace "__TILLER_PORT__" $tillerport | nindent 2 }}
+    {{- $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__" $tiller | replace "__TILLER_NAMESPACE__" $tillernamespace | replace "__TILLER_PORT__" $tillerport | nindent 2 }}
index fafcb42..a484813 100644 (file)
@@ -19,9 +19,9 @@ apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.deploymentname.appmgr" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
@@ -29,27 +29,30 @@ spec:
   replicas: {{ .Values.appmgr.replicaCount }}
   selector:
     matchLabels:
-      app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
       release: {{ .Release.Name }}
   template:
     metadata:
       labels:
-        app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
         release: {{ .Release.Name }}
     spec:
-      hostname: {{ .Chart.Name }}
+      hostname: {{ include "common.name.appmgr" . }}
       imagePullSecrets:
         - name: {{ include "common.repositoryCred" . }}
       containers:
-        - name: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        - name: {{ include "common.containername.appmgr" . }}
           image: {{ include "common.repository" . }}/{{ .Values.appmgr.image.name }}:{{ .Values.appmgr.image.tag }}
           imagePullPolicy: {{ include "common.pullPolicy" . }}
           ports:
             - name: http
               containerPort: {{ .Values.appmgr.service.http.containerPort }}
               protocol: TCP
-            - name: rmr
-              containerPort: {{ .Values.appmgr.service.rmr.containerPort }}
+            - name: rmrroute
+              containerPort: {{ .Values.appmgr.service.rmr.route.port }}
+              protocol: TCP
+            - name: rmrdata
+              containerPort: {{ .Values.appmgr.service.rmr.data.port }}
               protocol: TCP
           volumeMounts:
             - name: config-volume
@@ -61,7 +64,7 @@ spec:
               mountPath: {{ .Values.appmgr.appcertpath }}
           envFrom:
             - configMapRef:
-                name: {{ include "common.configmapname.appmgr" . }}-appenv
+                name: {{ include "common.configmapname.appmgr" . }}-env
           livenessProbe:
             #exec:
             #  command:
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: {{ include "common.configmapname.appmgr" . }}-appenv
+  name: {{ include "common.configmapname.appmgr" . }}-env
 data:
-  {{- $dbaasservicehost := include "common.servicename.dbaas.tcp" . | quote -}}
-  {{- (.Files.Get "resources/appenv.yaml") | replace "__DBAAS_SERVICE_HOST__" $dbaasservicehost | nindent 2 }}
+  NAME: "xappmgr"
+  DBAAS_SERVICE_HOST: {{ include "common.servicename.dbaas.tcp" . | quote }}
+  DBAAS_SERVICE_PORT: "6379"
+  DBAAS_PORT_6379_TCP_ADDR: {{ include "common.servicename.dbaas.tcp" . | quote }}
+  DBAAS_PORT_6379_TCP_PORT: "6379"
+  RMR_RTG_SVC: "{{ .Values.appmgr.service.rmr.route.port }}"
index edc144d..265b1e9 100644 (file)
@@ -19,9 +19,9 @@ apiVersion: v1
 kind: Service
 metadata:
   name: {{ include "common.servicename.appmgr.http" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }} 
@@ -33,6 +33,6 @@ spec:
       name: "http"
       targetPort: "http"
   selector:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
     release: {{ .Release.Name }}
 
index 972a263..3451529 100644 (file)
@@ -19,20 +19,24 @@ apiVersion: v1
 kind: Service
 metadata:
   name: {{ include "common.servicename.appmgr.rmr" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    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: {{ .Values.appmgr.service.rmr.port }}
+    - port: {{ .Values.appmgr.service.rmr.route.port }}
       protocol: "TCP"
-      name: "rmr"
-      targetPort: "rmr"
+      name: "rmrroute"
+      targetPort: "rmrroute"
+    - port: {{ .Values.appmgr.service.rmr.data.port }}
+      protocol: "TCP"
+      name: "rmrdata"
+      targetPort: "rmrdata"
   selector:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
     release: {{ .Release.Name }}
 
 #   limitations under the License.                                             #
 ################################################################################
 
-{{/* vim: set filetype=mustache: */}}
-{{/*
-Expand the name of the chart.
-*/}}
-{{- define "dashboard.name" -}}
-{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.dashboard.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: {{ .Values.appmgr.service.http.port }}
+      protocol: "TCP"
+      name: "http"
+      targetPort: "http"
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
+    release: {{ .Release.Name }}
 
-{{/*
-Create a default fully qualified app name.
-We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
-If release name contains chart name it will be used as a full name.
-*/}}
-{{- define "dashboard.fullname" -}}
-{{- if .Values.fullnameOverride -}}
-{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- $name := default .Chart.Name .Values.nameOverride -}}
-{{- if contains $name .Release.Name -}}
-{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-{{- end -}}
-{{- end -}}
-
-{{/*
-Create chart name and version as used by the chart label.
-*/}}
-{{- define "dashboard.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
index 58a6a20..d0929ce 100644 (file)
@@ -24,7 +24,7 @@ repositoryCred: docker-reg-cred
 # By default a local helm repo is used. The global setting will override
 # the default value. You can further override using
 #helmRepositoryOverride: ""
-helmRepository: "https://ricaux-entry/helm
+helmRepository: "https://helm-entry
 
 # Default secret name for Helm Repo credential. .Value.golbal.helmRepositoryCred will
 # override the default value. You can further override uing
@@ -78,8 +78,10 @@ appmgr:
       port: 8080
       containerPort: 8080
     rmr:
-      port: 4560
-      containerPort: 4560
+      route:
+        port: 4561
+      data:
+        port: 4560
 
 
   # config
index d4213b2..867b4c2 100644 (file)
@@ -19,9 +19,9 @@ apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.deploymentname.dbaas" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
@@ -29,12 +29,12 @@ spec:
   replicas: {{ .Values.dbaas.backend.replicas }}
   selector:
     matchLabels:
-      app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}
       release: {{ .Release.Name }}
   template:
     metadata:
       labels:
-        app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}
         release: {{ .Release.Name }}
     spec:
       imagePullSecrets:
@@ -47,5 +47,5 @@ spec:
         - containerPort: {{ .Values.dbaas.backend.containerPort }}
           name: sql
           protocol: TCP
-        name: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        name: {{ include "common.containername.dbaas" . }}
       restartPolicy: Always
index d9ef65e..d0f3df5 100644 (file)
@@ -19,15 +19,15 @@ apiVersion: v1
 kind: Service
 metadata:
   name: {{ include "common.servicename.dbaas.tcp" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }} 
 spec:
   selector:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }}
     release: {{ .Release.Name }}
   ports:
   - port: {{ .Values.dbaas.backend.port }}
index 58b2feb..965aaa6 100644 (file)
@@ -27,4 +27,4 @@ dbaas:
     containerPort: 6379
     image:
       name: ric-plt-dbaas
-      tag: latest
\ No newline at end of file
+      tag: 0.1.0
index 35632c1..6c9b318 100644 (file)
@@ -20,24 +20,23 @@ apiVersion: v1
 kind: ConfigMap
 metadata:
   name: {{ include "common.configmapname.e2mgr" . }}-router-configmap
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
 data:
   router.txt: |
     newrt|start
-    rte|10060|{{ include "common.servicename.e2term.rmr" . }}.ricplt:38000
-    rte|10061|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|10062|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|10080|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|10360|{{ include "common.servicename.e2term.rmr" . }}.ricplt:38000
-    rte|10361|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|10362|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|12010|{{ include "common.servicename.e2term.rmr" . }}.ricplt:38000
-    rte|20001|{{ include "common.servicename.a1mediator.rmr" . }}.ricplt:4562
-    rte|12011|service-ricxapp-admctrl-rmr.ricxapp:4563
-    rte|12012|service-ricxapp-admctrl-rmr.ricxapp:4563
-    rte|12021|service-ricxapp-admctrl-rmr.ricxapp:4563;service-ricxapp-ueec-rmr.ricxapp:4560
-    rte|12022|service-ricxapp-admctrl-rmr.ricxapp:4563;service-ricxapp-ueec-rmr.ricxapp:4560
-    rte|12050|service-ricxapp-admctrl-rmr.ricxapp:4563;service-ricxapp-ueec-rmr.ricxapp:4560
-    rte|20000|service-ricxapp-admctrl-rmr.ricxapp:4563
+    rte|10060|{{ include "common.servicename.e2term.rmr" . }}.{{ include "common.namespace.platform" . }}:38000
+    rte|10061|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|10062|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|10080|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|10360|{{ include "common.servicename.e2term.rmr" . }}.{{ include "common.namespace.platform" . }}:38000
+    rte|10361|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|10362|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|12010|{{ include "common.servicename.e2term.rmr" . }}.{{ include "common.namespace.platform" . }}:38000
+    rte|20001|{{ include "common.servicename.a1mediator.rmr" . }}.{{ include "common.namespace.platform" . }}:4562
+    rte|12011|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563
+    rte|12012|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563
+    rte|12021|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563;service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" . }}:4560
+    rte|12022|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563;service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" . }}:4560
+    rte|12050|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563;service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" . }}:4560
+    rte|20000|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563
     newrt|end
-
index e62dfd4..330f123 100644 (file)
@@ -19,9 +19,9 @@ apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.deploymentname.e2mgr" .}}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2mgr" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
@@ -29,35 +29,35 @@ spec:
   replicas: {{ .Values.e2mgr.replicaCount }}
   selector:
     matchLabels:
-      app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2mgr" . }}
       release: {{ .Release.Name }}
   template:
     metadata:
       labels:
-        app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2mgr" . }}
         release: {{ .Release.Name }}
     spec:
-      hostname: {{ .Chart.Name }} 
+      hostname: {{ include "common.name.e2mgr" . }} 
       imagePullSecrets:
         - name: {{ include "common.repositoryCred" . }}
       containers:
-        - name: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        - name: {{ include "common.containername.e2mgr" . }}
           image: {{ include "common.repository" . }}/{{ .Values.e2mgr.image.name }}:{{ .Values.e2mgr.image.tag }}
           imagePullPolicy: {{ include "common.pullPolicy" . }}
           volumeMounts:
           - mountPath: /opt/E2Manager/router.txt
             name: local-router-file
             subPath: router.txt
-          env:
-            - name: RMR_RTG_SVC
-              value: "{{ .Values.e2mgr.env.RMR_RTG_SVC }}"
-            - name: RIC_ID
-              value: "{{ .Values.e2mgr.env.RIC_ID }}"
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.e2mgr" . }}-env
           ports:
             - name: "http"
               containerPort: {{ .Values.e2mgr.service.http.containerPort }}
-            - name: "rmr"
-              containerPort: {{ .Values.e2mgr.service.rmr.containerPort }}
+            - name: "rmrroute"
+              containerPort: {{ .Values.e2mgr.service.rmr.route.port }}
+            - name: "rmrdata"
+              containerPort: {{ .Values.e2mgr.service.rmr.data.port }}
           stdin: true
           tty: true
           securityContext:
diff --git a/ric-platform/50-RIC-Platform/helm/e2mgr/templates/env.yaml b/ric-platform/50-RIC-Platform/helm/e2mgr/templates/env.yaml
new file mode 100644 (file)
index 0000000..b37cfc4
--- /dev/null
@@ -0,0 +1,27 @@
+################################################################################
+#   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:
+   DBAAS_SERVICE_HOST: {{ include "common.servicename.dbaas.tcp" . | quote }}
+   DBAAS_SERVICE_PORT: "6379"
+   DBAAS_PORT_6379_TCP_ADDR: {{ include "common.servicename.dbaas.tcp" . | quote }}
+   DBAAS_PORT_6379_TCP_PORT: "6379"
+   RMR_RTG_SVC: "{{ .Values.e2mgr.service.rmr.route.port }}"
+   RIC_ID: "{{ .Values.e2mgr.env.RIC_ID }}"
index 95e0590..5e30924 100644 (file)
@@ -19,9 +19,9 @@ apiVersion: v1
 kind: Service
 metadata:
   name: {{ include "common.servicename.e2mgr.http" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2mgr" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
@@ -33,5 +33,5 @@ spec:
       name: "http"
       targetPort: "http" 
   selector:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2mgr" . }}
     release: {{ .Release.Name }}
index d7d39d9..6a4bdad 100644 (file)
@@ -19,19 +19,23 @@ apiVersion: v1
 kind: Service
 metadata:
   name: {{ include "common.servicename.e2mgr.rmr" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    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: {{ .Values.e2mgr.service.rmr.port }}
+    - port: {{ .Values.e2mgr.service.rmr.route.port }}
       protocol: "TCP"
-      name: "rmr"
-      targetPort: "rmr"
+      name: "rmrroute"
+      targetPort: "rmrroute"
+    - port: {{ .Values.e2mgr.service.rmr.data.port }}
+      protocol: "TCP"
+      name: "rmrdata"
+      targetPort: "rmrdata"
   selector:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2mgr" . }}
     release: {{ .Release.Name }}
index 9a84755..f2509d8 100644 (file)
@@ -45,7 +45,6 @@ e2mgr:
   replicaCount: 1
   
   env:
-    RMR_RTG_SVC: "ric-full-rtmgr"
     RIC_ID: "bbbccc-abcd0e/20"
 
   service:
@@ -53,5 +52,7 @@ e2mgr:
       port: 3800
       containerPort: 3800
     rmr:
-      port: 3801
-      containerPort: 3801
+      route:
+        port: 4561
+      data:
+        port: 3801
index d82ab13..8bd6c12 100644 (file)
@@ -20,23 +20,23 @@ apiVersion: v1
 kind: ConfigMap
 metadata:
   name: {{ include "common.configmapname.e2term" . }}-router-configmap
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
 data:
   router.txt: |
     newrt|start
-    rte|10060|{{ include "common.servicename.e2term.rmr" . }}.ricplt:38000
-    rte|10061|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|10062|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|10080|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|10360|{{ include "common.servicename.e2term.rmr" . }}.ricplt:38000
-    rte|10361|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|10362|{{ include "common.servicename.e2mgr.rmr" . }}.ricplt:3801
-    rte|12010|{{ include "common.servicename.e2term.rmr" . }}.ricplt:38000
-    rte|20001|{{ include "common.servicename.a1mediator.rmr" . }}.ricplt:4562
-    rte|12011|service-ricxapp-admctrl-rmr.ricxapp:4563
-    rte|12012|service-ricxapp-admctrl-rmr.ricxapp:4563
-    rte|12021|service-ricxapp-admctrl-rmr.ricxapp:4563;service-ricxapp-ueec-rmr.ricxapp:4560
-    rte|12022|service-ricxapp-admctrl-rmr.ricxapp:4563;service-ricxapp-ueec-rmr.ricxapp:4560
-    rte|12050|service-ricxapp-admctrl-rmr.ricxapp:4563;service-ricxapp-ueec-rmr.ricxapp:4560
-    rte|20000|service-ricxapp-admctrl-rmr.ricxapp:4563
+    rte|10060|{{ include "common.servicename.e2term.rmr" . }}.{{ include "common.namespace.platform" . }}:38000
+    rte|10061|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|10062|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|10080|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|10360|{{ include "common.servicename.e2term.rmr" . }}.{{ include "common.namespace.platform" . }}:38000
+    rte|10361|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|10362|{{ include "common.servicename.e2mgr.rmr" . }}.{{ include "common.namespace.platform" . }}:3801
+    rte|12010|{{ include "common.servicename.e2term.rmr" . }}.{{ include "common.namespace.platform" . }}:38000
+    rte|20001|{{ include "common.servicename.a1mediator.rmr" . }}.{{ include "common.namespace.platform" . }}:4562
+    rte|12011|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563
+    rte|12012|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563
+    rte|12021|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563;service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" . }}:4560
+    rte|12022|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563;service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" . }}:4560
+    rte|12050|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563;service-ricxapp-ueec-rmr.{{ include "common.namespace.xapp" . }}:4560
+    rte|20000|service-ricxapp-admctrl-rmr.{{ include "common.namespace.xapp" . }}:4563
     newrt|end
index f3b5ce2..993fd52 100644 (file)
@@ -19,9 +19,9 @@ apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.deploymentname.e2term" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2term" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
@@ -29,39 +29,35 @@ spec:
   replicas: {{ .Values.e2term.replicaCount }}
   selector:
     matchLabels:
-      app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2term" . }}
       release: {{ .Release.Name }}
   template:
     metadata:
       labels:
-        app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2term" . }}
         release: {{ .Release.Name }}
     spec:
-      hostname: {{ .Chart.Name }}
+      hostname: {{ include "common.name.e2term" . }}
       hostNetwork: true
       dnsPolicy: ClusterFirstWithHostNet
       imagePullSecrets:
         - name: {{ include "common.repositoryCred" . }}
       containers:
-        - name: {{ .Chart.Name }}
+        - name: {{ include "common.containername.e2term" . }}
           image: {{ include "common.repository" . }}/{{ .Values.e2term.image.name }}:{{ .Values.e2term.image.tag }}
           imagePullPolicy: {{ include "common.pullPolicy" . }}
           volumeMounts:
           - mountPath: /opt/e2/router.txt
             name: local-router-file
             subPath: router.txt
-          env:
-            - name: sctp
-              value: "5577"
-            - name: nano
-              value: "{{ .Values.e2term.service.rmr.port }}"
-            - name: print
-              value: "{{ .Values.e2term.env.print }}"
-            - name: RMR_RTG_SVC
-              value: "{{ .Values.e2term.env.RMR_RTG_SVC }}"
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.e2term" . }}-env
           ports:
-            - name: "rmr"
-              containerPort: {{ .Values.e2term.service.rmr.containerPort }}
+            - name: "rmrroute"
+              containerPort: {{ .Values.e2term.service.rmr.route.port }}
+            - name: "rmrdata"
+              containerPort: {{ .Values.e2term.service.rmr.data.port }}
           stdin: true
           tty: true
           securityContext:
diff --git a/ric-platform/50-RIC-Platform/helm/e2term/templates/env.yaml b/ric-platform/50-RIC-Platform/helm/e2term/templates/env.yaml
new file mode 100644 (file)
index 0000000..7637a41
--- /dev/null
@@ -0,0 +1,29 @@
+################################################################################
+#   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.e2term" . }}-env
+data:
+  DBAAS_SERVICE_HOST: {{ include "common.servicename.dbaas.tcp" . | quote }}
+  DBAAS_SERVICE_PORT: "6379"
+  DBAAS_PORT_6379_TCP_ADDR: {{ include "common.servicename.dbaas.tcp" . | quote }}
+  DBAAS_PORT_6379_TCP_PORT: "6379"
+  RMR_RTG_SVC: "{{ .Values.e2term.service.rmr.route.port }}"
+  sctp: "5577"
+  nano: "{{ .Values.e2term.service.rmr.data.port }}"
+  print: "{{ .Values.e2term.env.print }}"
index 08a8a4c..f4cf20a 100644 (file)
@@ -19,19 +19,23 @@ apiVersion: v1
 kind: Service
 metadata:
   name: {{ include "common.servicename.e2term.rmr" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2term" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }} 
 spec:
   type: ClusterIP
   ports:
-    - port: {{ .Values.e2term.service.rmr.port }}
+    - port: {{ .Values.e2term.service.rmr.route.port }}
       protocol: "TCP"
-      targetPort: "rmr"
-      name: "rmr"
+      targetPort: "rmrroute"
+      name: "rmrroute"
+    - port: {{ .Values.e2term.service.rmr.data.port }}
+      protocol: "TCP"
+      targetPort: "rmrdata"
+      name: "rmrdata"
   selector:
-      app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2term" . }}
       release: {{ .Release.Name }}
index 17d2c5c..f40e068 100644 (file)
@@ -36,16 +36,17 @@ repositoryCred: docker-reg-cred
 e2term:
   image:
     name: e2
-    tag: 1.0.0
+    tag: 1.6.0
   
   
   replicaCount: 1
   
   env:
     print: "1"
-    RMR_RTG_SVC: "ric-full-rtmgr"
   
   service:
     rmr:
-      port: 38000
-      containerPort: 38000
+      route:
+        port: 4561
+      data:
+        port: 38000
index d6f3259..66cef2f 100644 (file)
@@ -19,9 +19,9 @@ apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.deploymentname.rtmgr" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rtmgr" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
@@ -29,37 +29,27 @@ spec:
   replicas: {{ .Values.rtmgr.replicaCount }}
   selector:
     matchLabels:
-      app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rtmgr" . }}
       release: {{ .Release.Name }}
   template:
     metadata:
       labels:
-        app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rtmgr" . }}
         release: {{ .Release.Name }}
     spec:
-      hostname: {{ .Chart.Name }}
+      hostname: {{ include "common.name.rtmgr" . }}
       imagePullSecrets:
         - name: {{ include "common.repositoryCred" . }}
       containers:
-        - name: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        - name: {{ include "common.containername.rtmgr" . }}
           image: {{ include "common.repository" . }}/{{ .Values.rtmgr.image.name }}:{{ .Values.rtmgr.image.tag }}
           imagePullPolicy: {{ include "common.pullPolicy" . }}
           command: ["/run_rtmgr.sh"]
-          env:
-            - name: XMURL
-              value: "http://{{ include "common.servicename.appmgr.http" . }}:8080/ric/v1/xapps"
-            - name: SOCKET
-              value: "tcp://0.0.0.0:4560"
-            - name: RTFILE
-              value: "/db/rt.json"
-            - name: NBI
-              value: "httpGetter"
-            - name: SBI
-              value: "nngpub"
-            - name: RPE
-              value: "rmr"
-            - name: SDL
-              value: "file"
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.rtmgr" . }}-env
           ports:
-            - name: "rmr"
-              containerPort: {{ .Values.rtmgr.service.rmr.containerPort }}
+            - name: "rmrroute"
+              containerPort: {{ .Values.rtmgr.service.rmr.route.port }}
+            - name: "rmrdata"
+              containerPort: {{ .Values.rtmgr.service.rmr.data.port }}
diff --git a/ric-platform/50-RIC-Platform/helm/rtmgr/templates/env.yaml b/ric-platform/50-RIC-Platform/helm/rtmgr/templates/env.yaml
new file mode 100644 (file)
index 0000000..6ef54bc
--- /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.                                             #
+################################################################################
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.configmapname.rtmgr" . }}-env
+data:
+   DBAAS_SERVICE_HOST: {{ include "common.servicename.dbaas.tcp" . | quote }}
+   DBAAS_SERVICE_PORT: "6379"
+   DBAAS_PORT_6379_TCP_ADDR: {{ include "common.servicename.dbaas.tcp" . | quote }}
+   DBAAS_PORT_6379_TCP_PORT: "6379"
+   RMR_RTG_SVC: "{{ .Values.rtmgr.service.rmr.route.port }}"
+   XMURL: "http://{{ include "common.servicename.appmgr.http" . }}:8080/ric/v1/xapps"
+   SOCKET: "tcp://0.0.0.0:4560"
+   RTFILE: "/db/rt.json"
+   NBI: "httpGetter"
+   SBI: "nngpub"
+   RPE: "rmr"
+   SDL: "file"
index 0ded6af..7471204 100644 (file)
@@ -19,19 +19,23 @@ apiVersion: v1
 kind: Service
 metadata:
   name: {{ include "common.servicename.rtmgr.rmr" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    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: {{ .Values.rtmgr.service.rmr.port }}
+    - port: {{ .Values.rtmgr.service.rmr.route.port }}
       protocol: TCP
-      targetPort: "rmr"
-      name: "rmr"
+      targetPort: "rmrroute"
+      name: "rmrroute"
+    - port: {{ .Values.rtmgr.service.rmr.data.port }}
+      protocol: TCP
+      targetPort: "rmrdata"
+      name: "rmrdata"
   selector:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rtmgr" . }}
     release: {{ .Release.Name }}
index 74d479f..fd1b077 100644 (file)
@@ -41,5 +41,7 @@ rtmgr:
   
   service:
     rmr:
-      port: 4560
-      containerPort: 5656
+      route:
+        port: 4561
+      data:
+        port: 4560
index 6f6f6e9..68fb4dc 100755 (executable)
@@ -29,16 +29,38 @@ if [ -z "$RICAUX_RELEASE_NAME" ];then
 else
    RELEASE_NAME=$RICAUX_RELEASE_NAME
 fi
+# Namespace configuration
+if [ -z "$RICPLT_NAMESPACE" ];then
+   PLT_NAMESPACE=$plt_namespace
+else
+   PLT_NAMESPACE=$RICPLT_NAMESPACE
+fi
+if [ -z "$RICXAPP_NAMESPACE" ];then
+   XAPP_NAMESPACE=$xapp_namespace
+else
+   XAPP_NAMESPACE=$RICXAPP_NAMESPACE
+fi
 if [ -z "$RICAUX_NAMESPACE" ];then
-   NAMESPACE=$namespace
+   AUX_NAMESPACE=$aux_namespace
+else
+   AUX_NAMESPACE=$RICAUX_NAMESPACE
+fi
+if [ -z "$RICINFRA_NAMESPACE" ];then
+   INFRA_NAMESPACE=$infra_namespace
+else
+   INFRA_NAMESPACE=$RICINFRA_NAMESPACE
+fi
+
+
+if [ -z "$RIC_COMMON_OVERRIDE" ];then
+   COMMON_OVERRIDE="--set global.namespace.platform=$PLT_NAMESPACE --set global.namespace.xapp=$XAPP_NAMESPACE --set global.namespace.aux=$AUX_NAMESPACE --set global.namespace.infra=$INFRA_NAMESPACE"
 else
-   NAMESPACE=$RICAUX_NAMESPACE
+   COMMON_OVERRIDE=$RIC_COMMON_OVERRIDE
 fi
 
 RICAUX_COMPONENTS="ext"
 
 echo "Deploying RIC AUX components [$RICAUX_COMPONENTS]"
-echo "Platform Namespace: $NAMESPACE"
 echo "Helm Release Name: $RELEASE_NAME"
 
 
@@ -52,8 +74,8 @@ for component in $RICAUX_COMPONENTS; do
   mkdir -p  $DIR/../helm/$component/charts/
   cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/$component/charts/
   if [ -z $OVERRIDEYAML ]; then
-  helm install --debug --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component
+  helm install --debug --namespace "${PLT_NAMESPACE}" --name "${RELEASE_NAME}-$component" $COMMON_OVERRIDE $DIR/../helm/$component
   else
-  helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component
+  helm install -f $OVERRIDEYAML --namespace "${PLT_NAMESPACE}" --name "${RELEASE_NAME}-$component" $COMMON_OVERRIDE $DIR/../helm/$component
   fi
 done
index 5eb5b4a..92008b5 100644 (file)
 
 
 # helm_release_name defines the release name helm will use to deploy RIC
-# It will be overrided by RICAUX_RELEASE_NAME
-helm_release_name=r0
+# It will be overrided by RICPLT_RELEASE_NAME
+helm_release_name=r1
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICPLT_NAMESPACE
+plt_namespace=ricplt
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICXAPP_NAMESPACE
+xapp_namespace=ricxapp
 
 # namespace defines the namespace that helm will use to deploy RIC
 # It will be overrided by RICAUX_NAMESPACE
-namespace=ricplt
+aux_namespace=ricaux
+
+# namespace defines the namespace that helm will use to deploy RIC
+# It will be overrided by RICINFRA_NAMESPACE
+infra_namespace=ricinfra