New version of the common template. It unifies the naming convention between platform... 31/431/9
authorZhe Huang <zhehuang@research.att.com>
Fri, 28 Jun 2019 13:05:20 +0000 (09:05 -0400)
committerZhe Huang <zhehuang@research.att.com>
Sat, 29 Jun 2019 06:01:21 +0000 (02:01 -0400)
Signed-off-by: Zhe Huang <zhehuang@research.att.com>
Change-Id: I683f36a64512854dfb4c30c1df3e4204da7b708b

93 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/helm/dashboard/requirements.yaml
ric-aux/85-Ext-Services/bin/install
ric-aux/85-Ext-Services/helm/ext/requirements.yaml
ric-common/Common-Template/helm/ric-common/Chart.yaml [moved from ric-platform/50-RIC-Platform/helm/common/Chart.yaml with 97% similarity]
ric-common/Common-Template/helm/ric-common/templates/_chart.tpl [moved from ric-platform/50-RIC-Platform/helm/common/templates/_chart.tpl with 100% similarity]
ric-common/Common-Template/helm/ric-common/templates/_configmapname.tpl [moved from ric-platform/50-RIC-Platform/helm/common/templates/_configmapname.tpl with 93% similarity]
ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl [moved from ric-platform/50-RIC-Platform/helm/common/templates/_deploymentname.tpl with 93% similarity]
ric-common/Common-Template/helm/ric-common/templates/_docker_credential_name.tpl [moved from ric-platform/50-RIC-Platform/helm/ric/Chart.yaml with 92% similarity]
ric-common/Common-Template/helm/ric-common/templates/_dockerregistry.tpl [moved from ric-platform/50-RIC-Platform/helm/common/templates/_repository.tpl with 87% similarity]
ric-common/Common-Template/helm/ric-common/templates/_helm_credential_name.tpl [moved from ric-platform/50-RIC-Platform/helm/ric/values.yaml with 88% similarity]
ric-common/Common-Template/helm/ric-common/templates/_helmrepo.tpl [moved from ric-platform/50-RIC-Platform/helm/common/templates/_helmrepo.tpl with 100% similarity]
ric-common/Common-Template/helm/ric-common/templates/_ingresscontroller.tpl [new file with mode: 0644]
ric-common/Common-Template/helm/ric-common/templates/_ingressname.tpl [moved from ric-platform/50-RIC-Platform/helm/common/templates/_servicename.tpl with 62% similarity]
ric-common/Common-Template/helm/ric-common/templates/_name.tpl [moved from ric-platform/50-RIC-Platform/helm/common/templates/_name.tpl with 80% similarity]
ric-common/Common-Template/helm/ric-common/templates/_namespace.tpl [moved from ric-platform/50-RIC-Platform/helm/common/templates/_namespace.tpl with 100% similarity]
ric-common/Common-Template/helm/ric-common/templates/_resources.tpl [moved from ric-platform/50-RIC-Platform/helm/common/templates/_resources.tpl with 100% similarity]
ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl [new file with mode: 0644]
ric-common/Common-Template/helm/ric-common/values.yaml [moved from ric-platform/50-RIC-Platform/helm/common/values.yaml with 100% similarity]
ric-common/Docker-Credential/bin/install [new file with mode: 0755]
ric-common/Docker-Credential/bin/uninstall [new file with mode: 0755]
ric-common/Docker-Credential/etc/credential.conf [new file with mode: 0644]
ric-common/Docker-Credential/helm/Chart.yaml [new file with mode: 0644]
ric-common/Docker-Credential/helm/requirements.yaml [moved from ric-xapps/90-xApps/helm/xapp-admin/Chart.yaml with 92% similarity]
ric-common/Docker-Credential/helm/templates/_helper.tpl [new file with mode: 0644]
ric-common/Docker-Credential/helm/templates/secrets-docker-reg.yaml [moved from ric-xapps/90-xApps/helm/xapp-std/templates/secret.yaml with 91% similarity]
ric-common/Docker-Credential/helm/values.yaml [new file with mode: 0644]
ric-common/Helm-Credential/bin/install [new file with mode: 0755]
ric-common/Helm-Credential/bin/uninstall [new file with mode: 0755]
ric-common/Helm-Credential/etc/credential.conf [new file with mode: 0644]
ric-common/Helm-Credential/helm/Chart.yaml [new file with mode: 0644]
ric-common/Helm-Credential/helm/requirements.yaml [new file with mode: 0644]
ric-common/Helm-Credential/helm/templates/_helper.tpl [new file with mode: 0644]
ric-common/Helm-Credential/helm/templates/config-helm-cert.yaml [new file with mode: 0644]
ric-common/Helm-Credential/helm/templates/secrets-helm-xapp.yaml [new file with mode: 0644]
ric-common/Helm-Credential/helm/values.yaml [new file with mode: 0644]
ric-common/Initcontainer/docker/Dockerfile [moved from ric-infra/15-Initcontainer/docker/Dockerfile with 100% similarity]
ric-common/Initcontainer/docker/bin/ricplt-init.sh [moved from ric-infra/15-Initcontainer/docker/bin/ricplt-init.sh with 100% similarity]
ric-infra/10-Nexus/helm/requirements.yaml
ric-infra/40-Credential/bin/install
ric-infra/40-Credential/etc/credential.conf
ric-infra/40-Credential/helm/requirements.yaml
ric-infra/40-Credential/helm/resources/tls.crt
ric-platform/50-RIC-Platform/bin/install
ric-platform/50-RIC-Platform/bin/uninstall
ric-platform/50-RIC-Platform/helm/appmgr/requirements.yaml
ric-platform/50-RIC-Platform/helm/appmgr/templates/appconfig.yaml
ric-platform/50-RIC-Platform/helm/appmgr/templates/appenv.yaml
ric-platform/50-RIC-Platform/helm/appmgr/templates/deployment.yaml
ric-platform/50-RIC-Platform/helm/appmgr/templates/ingress-appmgr.yaml
ric-platform/50-RIC-Platform/helm/appmgr/templates/service-http.yaml [moved from ric-platform/50-RIC-Platform/helm/appmgr/templates/service.yaml with 82% similarity]
ric-platform/50-RIC-Platform/helm/appmgr/templates/service-rmr.yaml [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/appmgr/values.yaml
ric-platform/50-RIC-Platform/helm/common/templates/_ingresscontroller.tpl [deleted file]
ric-platform/50-RIC-Platform/helm/dbaas/requirements.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/Chart.yaml
ric-platform/50-RIC-Platform/helm/e2mgr/requirements.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/ingress-e2mgr.yaml
ric-platform/50-RIC-Platform/helm/e2mgr/templates/service-http.yaml [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/e2mgr/templates/service-rmr.yaml [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/e2mgr/templates/service.yaml [deleted file]
ric-platform/50-RIC-Platform/helm/e2mgr/values.yaml
ric-platform/50-RIC-Platform/helm/e2term/requirements.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/service-rmr.yaml [moved from ric-platform/50-RIC-Platform/helm/e2term/templates/service.yaml with 86% similarity]
ric-platform/50-RIC-Platform/helm/e2term/values.yaml
ric-platform/50-RIC-Platform/helm/kong-platform/requirements.lock [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/kong-xapp/requirements.lock [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/ric/.helmignore [deleted file]
ric-platform/50-RIC-Platform/helm/ric/requirements.yaml [deleted file]
ric-platform/50-RIC-Platform/helm/rtmgr/requirements.yaml
ric-platform/50-RIC-Platform/helm/rtmgr/templates/deployment.yaml
ric-platform/50-RIC-Platform/helm/rtmgr/templates/service-rmr.yaml [moved from ric-platform/50-RIC-Platform/helm/rtmgr/templates/service.yaml with 87% similarity]
ric-platform/50-RIC-Platform/helm/rtmgr/values.yaml
ric-platform/55-Ext-Services/bin/install
ric-platform/55-Ext-Services/helm/ext/requirements.yaml
ric-platform/55-Ext-Services/helm/ext/templates/services.yaml
ric-xapps/90-xApps/helm/xapp-admin/values.yaml [deleted file]
ric-xapps/90-xApps/helm/xapp-std/templates/_helpers.tpl
ric-xapps/90-xApps/helm/xapp-std/templates/deployment.yaml
ric-xapps/90-xApps/helm/xapp-std/templates/service-http.yaml [moved from ric-xapps/90-xApps/helm/xapp-std/templates/service.yaml with 74% similarity]
ric-xapps/90-xApps/helm/xapp-std/templates/service-rmr.yaml [new file with mode: 0644]
ric-xapps/90-xApps/helm/xapp-std/values.yaml

index ec0ccde..a245a23 100644 (file)
@@ -2,3 +2,4 @@
 *.log
 *.tar
 *.tgz
+*.swp
index 2aa79e0..52751af 100644 (file)
@@ -29,7 +29,7 @@ global:
   imagePullPolicy: Always
 
   # Helm repo that will be used by xApp manager
-  helmRepository: nexus.ricinfra.local
+  helmRepository: "https://ricaux-entry/helm"
 
   # Certificate of the helm repo
   helmRepositoryCert: xapp-mgr-certs
index 737526d..b97ef1c 100644 (file)
@@ -29,7 +29,7 @@ global:
   imagePullPolicy: Always
 
   # Helm repo that will be used by xApp manager
-  helmRepository: nexus.ricinfra.local
+  helmRepository: "https://ricaux-entry/helm"
 
   # Certificate of the helm repo
   helmRepositoryCert: xapp-mgr-certs
@@ -64,7 +64,7 @@ repositoryCredential:
 
 helmrepoCredential:
   user: "helm"
-  password: "docker"
+  password: "helm"
 
 
 adminPassword: admin123
index dd547cd..d12ae12 100644 (file)
@@ -29,7 +29,7 @@ global:
   imagePullPolicy: Always
 
   # Helm repo that will be used by xApp manager
-  helmRepository: helm.ricinfra.local
+  helmRepository: "https://ricaux-entry/helm"
 
   # Certificate of the helm repo
   helmRepositoryCert: xapp-mgr-certs
index e759f66..c44cfbb 100755 (executable)
@@ -43,15 +43,15 @@ echo "Platform Namespace: $NAMESPACE"
 echo "Helm Release Name: $RELEASE_NAME"
 
 
-COMMON_CHART_VERSION=$(cat $DIR/../../../ric-platform/50-RIC-Platform/helm/common/Chart.yaml | grep version | awk '{print $2}')
+COMMON_CHART_VERSION=$(cat $DIR/../../../ric-common/Common-Template/helm/ric-common/Chart.yaml | grep version | awk '{print $2}')
 
-helm package -d /tmp $DIR/../../../ric-platform/50-RIC-Platform/helm/common
+helm package -d /tmp $DIR/../../../ric-common/Common-Template/helm/ric-common/
 
 
 for component in $RICAUX_COMPONENTS; do
   echo "Preparing chart for comonent $component"
   mkdir -p  $DIR/../helm/$component/charts/
-  cp /tmp/common-$COMMON_CHART_VERSION.tgz $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
   else
index aa94575..2ab71b4 100644 (file)
@@ -16,5 +16,5 @@
 ################################################################################
 
 dependencies:
-  - name: common
-    version: ~1.1.0
+  - name: ric-common
+    version: ~2.0.0
index d4a538d..552c237 100755 (executable)
@@ -42,15 +42,15 @@ echo "Platform Namespace: $NAMESPACE"
 echo "Helm Release Name: $RELEASE_NAME"
 
 
-COMMON_CHART_VERSION=$(cat $DIR/../../../ric-platform/50-RIC-Platform/helm/common/Chart.yaml | grep version | awk '{print $2}')
+COMMON_CHART_VERSION=$(cat $DIR/../../../ric-common/Common-Template/helm/ric-common/Chart.yaml | grep version | awk '{print $2}')
 
-helm package -d /tmp $DIR/../../../ric-platform/50-RIC-Platform/helm/common
+helm package -d /tmp $DIR/../../../ric-common/Common-Template/helm/ric-common/
 
 
 for component in $RICAUX_COMPONENTS; do
   echo "Preparing chart for comonent $component"
   mkdir -p  $DIR/../helm/$component/charts/
-  cp /tmp/common-$COMMON_CHART_VERSION.tgz $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
   else
index aa94575..2ab71b4 100644 (file)
@@ -16,5 +16,5 @@
 ################################################################################
 
 dependencies:
-  - name: common
-    version: ~1.1.0
+  - name: ric-common
+    version: ~2.0.0
@@ -17,5 +17,5 @@
 
 apiVersion: v1
 description: Common templates for inclusion in other charts
-name: common
-version: 1.1.0
+name: ric-common
+version: 2.0.0
@@ -52,3 +52,7 @@
 {{- end -}}
 
 
+{{- define "common.configmapname.nexus" -}}
+  {{- $name := ( include "common.fullname.nexus" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
@@ -52,3 +52,7 @@
 
 
 
+{{- define "common.deploymentname.nexus" -}}
+  {{- $name := ( include "common.fullname.nexus" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
@@ -15,8 +15,9 @@
 #   limitations under the License.                                             #
 ################################################################################
 
-apiVersion: v1
-appVersion: "1.0"
-description: A Helm chart for full RIC deployment
-name: ric
-version: 1.1.0
+
+
+
+{{- define "common.dockercred.prefix" -}}
+  {{- printf "secret-docker" -}}
+{{- end -}}
   - .Values.repositoryCredOverride : override global and default docker registry credential
 */}}
 {{- define "common.repositoryCred" -}}
-  {{- if .Values.repositoryCredOverride -}}
-    {{- printf "%s" .Values.repositoryCredOverride -}}
+  {{- $componentname := .Chart.Name -}}
+  {{- $firsttier := (index .Values (printf "%s" $componentname)) -}}
+  {{- if $firsttier -}}
+    {{- $secondtier := (index .Values (printf "%s" $componentname) (printf "%s" "repositoryCredOverride")) -}}
+    {{- if $secondtier -}}
+      {{- printf "%s" $secondtier -}}
+    {{- else -}}
+      {{- if .Values.global -}}
+        {{- if .Values.global.repositoryCred -}}
+          {{- printf "%s" .Values.global.repositoryCred -}}
+        {{- else -}}
+          {{- printf "%s" .Values.repositoryCred -}}
+        {{- end -}}
+      {{- else -}}
+        {{- printf "%s" .Values.repositoryCred -}}
+      {{- end -}}
+    {{- end -}}
   {{- else -}}
-    {{- if  .Values.global -}}
+    {{- if .Values.global -}}
       {{- if .Values.global.repositoryCred -}}
         {{- printf "%s" .Values.global.repositoryCred -}}
       {{- else -}}
-       {{- printf "%s" .Values.repositoryCred -}}
+        {{- printf "%s" .Values.repositoryCred -}}
       {{- end -}}
     {{- else -}}
       {{- printf "%s" .Values.repositoryCred -}}
 {{- end -}}
 
 
+
+
+
+
+
+
+
+
+
+
+
+
 {{/*
   Define the golbal image pull policy.
   The value for .Values.imagePullPolicy is used by default,
 #   limitations under the License.                                             #
 ################################################################################
 
-# Enable/disable helm charts for RIC deployment
-dbaas:
-  enabled: true
-e2mgr:
-  enabled: true
-rtmgr:
-  enabled: true
-e2term:
-  enabled: true
-appmgr:
-  enabled: true
+
+
+
+{{- define "common.helmcred.prefix" -}}
+  {{- printf "secret-helm" -}}
+{{- end -}}
+
+{{- define "common.helmcert.prefix" -}}
+  {{- printf "configmap-helm" -}}
+{{- end -}}
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_ingresscontroller.tpl b/ric-common/Common-Template/helm/ric-common/templates/_ingresscontroller.tpl
new file mode 100644 (file)
index 0000000..5602418
--- /dev/null
@@ -0,0 +1,183 @@
+################################################################################
+#   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 ingress controller addresses.
+*/}}
+
+####################### Service URL #####################################
+{{- define "common.ingressurl.ricplt" -}}
+  {{- if .Values.global -}}
+    {{- if .Values.global.ingressurl -}}
+      {{- if .Values.global.ingressurl.platform -}}
+        {{- printf "%s" .Values.global.ingressurl.platform -}}
+      {{- else -}}
+        {{- printf "ricplt-entry" -}}
+      {{- end -}}
+    {{- else -}}
+      {{- printf "ricplt-entry" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "ricplt-entry" -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "common.ingressurl.ricxapp" -}}
+  {{- if .Values.global -}}
+    {{- if .Values.global.ingressurl -}}
+      {{- if .Values.global.ingressurl.xapp -}}
+        {{- printf "%s" .Values.global.ingressurl.xapp -}}
+      {{- else -}}
+        {{- printf "ricxapp-entry" -}}
+      {{- end -}}
+    {{- else -}}
+      {{- printf "ricxapp-entry" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "ricxapp-entry" -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "common.ingressurl.ricaux" -}}
+  {{- if .Values.global -}}
+    {{- if .Values.global.ingressurl -}}
+      {{- if .Values.global.ingressurl.aux -}}
+        {{- printf "%s" .Values.global.ingressurl.aux -}}
+      {{- else -}}
+        {{- printf "ricaux-entry" -}}
+      {{- end -}}
+    {{- else -}}
+      {{- printf "ricaux-entry" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "ricaux-entry" -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "common.ingressurl.ricinfra" -}}
+  {{- if .Values.global -}}
+    {{- if .Values.global.ingressurl -}}
+      {{- if .Values.global.ingressurl.infra -}}
+        {{- printf "%s" .Values.global.ingressurl.infra -}}
+      {{- else -}}
+        {{- printf "ricinfra-entry" -}}
+      {{- end -}}
+    {{- else -}}
+      {{- printf "ricinfra-entry" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "ricinfra-entry" -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "common.ingressurl.localdocker" -}}
+  {{- if .Values.global -}}
+    {{- if .Values.global.ingressurl -}}
+      {{- if .Values.global.ingressurl.localdocker -}}
+        {{- printf "%s" .Values.global.ingressurl.localdocker -}}
+      {{- else -}}
+        {{- printf "docker-entry" -}}
+      {{- end -}}
+    {{- else -}}
+      {{- printf "docker-entry" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "docker-entry" -}}
+  {{- end -}}
+{{- end -}}
+
+{{- define "common.ingressurl.localhelm" -}}
+  {{- if .Values.global -}}
+    {{- if .Values.global.ingressurl -}}
+      {{- if .Values.global.ingressurl.localhelm -}}
+        {{- printf "%s" .Values.global.ingressurl.localhelm -}}
+      {{- else -}}
+        {{- printf "helm-entry" -}}
+      {{- end -}}
+    {{- else -}}
+      {{- printf "helm-entry" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "helm-entry" -}}
+  {{- end -}}
+{{- end -}}
+
+
+{{- define "common.ingressurl.localnexus" -}}
+  {{- if .Values.global -}}
+    {{- if .Values.global.ingressurl -}}
+      {{- if .Values.global.ingressurl.localnexus -}}
+        {{- printf "%s" .Values.global.ingressurl.localnexus -}}
+      {{- else -}}
+        {{- printf "nexus-entry" -}}
+      {{- end -}}
+    {{- else -}}
+      {{- printf "nexus-entry" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "nexus-entry" -}}
+  {{- end -}}
+{{- end -}}
+
+
+
+
+
+
+####################### Ingress Controller Ports ###########################################
+## Currently the below values are hard-coded due to the fact that kong ingress controller  #
+## helm charts are not using this common template. We need to make sure that these values  #
+## agree with the values in the kong helm charts values.yaml files.                        #
+############################################################################################  
+{{- define "common.ingresshttpport.ricplt" -}}
+  {{- printf "30080" -}}
+{{- end -}}
+
+{{- define "common.ingresshttpsport.ricplt" -}}
+  {{- printf "30443" -}}
+{{- end -}}
+
+
+{{- define "common.ingresshttpport.ricxapp" -}}
+  {{- printf "31080" -}}
+{{- end -}}
+
+
+{{- define "common.ingresshttpsport.ricxapp" -}}
+  {{- printf "31443" -}}
+{{- end -}}
+
+
+{{- define "common.ingresshttpport.ricaux" -}}
+  {{- printf "32080" -}}
+{{- end -}}
+
+{{- define "common.ingresshttpsport.ricaux" -}}
+  {{- printf "32443" -}}
+{{- end -}}
+
+
+{{- define "common.ingresshttpport.ricinfra" -}}
+  {{- printf "33080" -}}
+{{- end -}}
+
+
+
+{{- define "common.ingresshttpsport.ricinfra" -}}
+  {{- printf "33443" -}}
+{{- end -}}
+
 #   limitations under the License.                                             #
 ################################################################################
 
-{{/*
-  Resolve the name of a chart's service.
 
-  The default will be the chart name (or .Values.nameOverride if set).
-  And the use of .Values.service.name overrides all.
 
-  - .Values.service.name  : override default service (ie. chart) name
-*/}}
-{{/*
-  Expand the service name for a chart.
-*/}}
-
-
-{{- define "common.servicename.appmgr" -}}
+{{- define "common.ingressname.appmgr" -}}
   {{- $name := ( include "common.fullname.appmgr" . ) -}}
-  {{- printf "service-%s" $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-
-{{- define "common.servicename.dbaas" -}}
-  {{- $name := ( include "common.name.dbaas" . ) -}}
-  {{- printf "service-%s" $name | trunc 63 | trimSuffix "-" -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-{{- define "common.servicename.e2mgr" -}}
+{{- define "common.ingressname.e2mgr" -}}
   {{- $name := ( include "common.fullname.e2mgr" . ) -}}
-  {{- printf "service-%s" $name | trunc 63 | trimSuffix "-" -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-{{- define "common.servicename.e2term" -}}
+{{- define "common.ingressname.e2term" -}}
   {{- $name := ( include "common.fullname.e2term" . ) -}}
-  {{- printf "service-%s" $name | trunc 63 | trimSuffix "-" -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-{{- define "common.servicename.rtmgr" -}}
+{{- define "common.ingressname.rtmgr" -}}
   {{- $name := ( include "common.fullname.rtmgr" . ) -}}
-  {{- printf "service-%s" $name | trunc 63 | trimSuffix "-" -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-{{- define "common.servicename.a1mediator" -}}
+{{- define "common.ingressname.a1mediator" -}}
   {{- $name := ( include "common.fullname.a1mediator" . ) -}}
-  {{- printf "service-%s" $name | trunc 63 | trimSuffix "-" -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-
-
+{{- define "common.ingressname.nexus" -}}
+  {{- $name := ( include "common.fullname.nexus" . ) -}}
+  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
@@ -35,7 +35,7 @@
 
 {{- define "common.fullname.appmgr" -}}
   {{- $name := ( include "common.name.appmgr" . ) -}}
-  {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 
@@ -53,7 +53,7 @@
 
 {{- define "common.fullname.dbaas" -}}
   {{- $name := ( include "common.name.dbaas" . ) -}}
-  {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 
@@ -81,7 +81,7 @@
 
 {{- define "common.fullname.e2mgr" -}}
   {{- $name := ( include "common.name.e2mgr" . ) -}}
-  {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 {{- define "common.name.e2term" -}}
@@ -99,7 +99,7 @@
 
 {{- define "common.fullname.e2term" -}}
   {{- $name := ( include "common.name.e2term" . ) -}}
-  {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 
 
 {{- define "common.fullname.rtmgr" -}}
   {{- $name := ( include "common.name.rtmgr" . ) -}}
-  {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 
 
 {{- define "common.fullname.a1mediator" -}}
   {{- $name := ( include "common.name.a1mediator" . ) -}}
-  {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
 
 
+{{- define "common.name.nexus" -}}
+  {{- if .Values.nexus -}}
+    {{- if .Values.nexus.nameOverride -}}
+      {{- printf "%s" .Values.nexus.nameOverride -}}
+    {{- else -}}
+      {{- printf "nexus" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "nexus" -}}
+  {{- end -}}
+{{- end -}}
+
+
+{{- define "common.fullname.nexus" -}}
+  {{- $name := ( include "common.name.nexus" . ) -}}
+  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
 
 
 
 */}}
 {{- define "common.fullname" -}}
   {{- $name := default .Chart.Name .Values.nameOverride -}}
-  {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+  {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl b/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl
new file mode 100644 (file)
index 0000000..c9804f5
--- /dev/null
@@ -0,0 +1,96 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{/*
+  Resolve the name of a chart's service.
+
+  The default will be the chart name (or .Values.nameOverride if set).
+  And the use of .Values.service.name overrides all.
+
+  - .Values.service.name  : override default service (ie. chart) name
+*/}}
+{{/*
+  Expand the service name for a chart.
+*/}}
+
+
+###################### RMR Service ##################################
+{{- define "common.servicename.appmgr.rmr" -}}
+  {{- $name := ( include "common.fullname.appmgr" . ) -}}
+  {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "common.servicename.e2mgr.rmr" -}}
+  {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+  {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.e2term.rmr" -}}
+  {{- $name := ( include "common.fullname.e2term" . ) -}}
+  {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.rtmgr.rmr" -}}
+  {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+  {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.a1mediator.rmr" -}}
+  {{- $name := ( include "common.fullname.a1mediator" . ) -}}
+  {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+###################### Http Service ##################################
+
+{{- define "common.servicename.appmgr.http" -}}
+  {{- $name := ( include "common.fullname.appmgr" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.e2mgr.http" -}}
+  {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.e2term.http" -}}
+  {{- $name := ( include "common.fullname.e2term" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.rtmgr.http" -}}
+  {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.a1mediator.http" -}}
+  {{- $name := ( include "common.fullname.a1mediator" . ) -}}
+  {{- 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 -}}
+###################### TCP Service ##################################
+
+{{- define "common.servicename.dbaas.tcp" -}}
+  {{- $name := ( include "common.fullname.dbaas" . ) -}}
+  {{- printf "service-%s-tcp" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/ric-common/Docker-Credential/bin/install b/ric-common/Docker-Credential/bin/install
new file mode 100755 (executable)
index 0000000..fadb3e6
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/bash
+################################################################################
+#   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.                                             #
+################################################################################
+
+
+
+NAMESPACE=$1
+
+DOCKERREG=$2
+
+DOCKERREG_NORMALIZED=${DOCKERREG/:/.}
+DOCKERREG_NORMALIZED=${DOCKERREG_NORMALIZED/\//.}
+
+DOCKERUSERNAME=$3
+
+DOCKERPASSWORD=$4
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+
+
+source $DIR/../etc/credential.conf
+
+if [ -z "$RICPLT_RELEASE_NAME" ];then
+   RELEASE_NAME=$helm_release_name
+else
+   RELEASE_NAME=$RICPLT_RELEASE_NAME
+fi
+
+COMMON_CHART_VERSION=$(cat $DIR/../../Common-Template/helm/ric-common/Chart.yaml | grep version | awk '{print $2}')
+helm package -d /tmp $DIR/../../Common-Template/helm/ric-common
+
+
+mkdir -p  $DIR/../helm/charts/
+cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/charts/
+
+
+helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-cred-${NAMESPACE}-${DOCKERREG_NORMALIZED}" --set repository="$DOCKERREG" --set repositoryCredential.user="$DOCKERUSERNAME" --set repositoryCredential.password="$DOCKERPASSWORD" $DIR/../helm
+
diff --git a/ric-common/Docker-Credential/bin/uninstall b/ric-common/Docker-Credential/bin/uninstall
new file mode 100755 (executable)
index 0000000..777f3ea
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash
+################################################################################
+#   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.                                             #
+################################################################################
+
+
+
+NAMESPACE=$1
+
+DOCKERREG=$2
+
+DOCKERREG_NORMALIZED=${DOCKERREG/:/.}
+DOCKERREG_NORMALIZED=${DOCKERREG_NORMALIZED/\//.}
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+
+
+source $DIR/../etc/credential.conf
+
+if [ -z "$RICPLT_RELEASE_NAME" ];then
+   RELEASE_NAME=$helm_release_name
+else
+   RELEASE_NAME=$RICPLT_RELEASE_NAME
+fi
+
+helm delete --purge "${RELEASE_NAME}-cred-${NAMESPACE}-${DOCKERREG_NORMALIZED}"
+
diff --git a/ric-common/Docker-Credential/etc/credential.conf b/ric-common/Docker-Credential/etc/credential.conf
new file mode 100644 (file)
index 0000000..8bee714
--- /dev/null
@@ -0,0 +1,23 @@
+################################################################################
+#   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.                                             #
+################################################################################
+
+
+# helm_release_name defines the release name helm will use to deploy the credential
+# It will be overrided by RICPLT_RELEASE_NAME
+helm_release_name=r0
+
+
diff --git a/ric-common/Docker-Credential/helm/Chart.yaml b/ric-common/Docker-Credential/helm/Chart.yaml
new file mode 100644 (file)
index 0000000..4624181
--- /dev/null
@@ -0,0 +1,22 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for setting up k8s resources for accessing external and infrastructure resources before RIC deployment"
+name: docker-credential
+version: 1.1.0
@@ -14,8 +14,7 @@
 #   See the License for the specific language governing permissions and        #
 #   limitations under the License.                                             #
 ################################################################################
-apiVersion: v1
-appVersion: "1.0"
-description: Admin Control xApp Helm Chart
-name: xapp-admin
-version: 0.0.1
+
+dependencies:
+  - name: ric-common
+    version: ~2.0.0
diff --git a/ric-common/Docker-Credential/helm/templates/_helper.tpl b/ric-common/Docker-Credential/helm/templates/_helper.tpl
new file mode 100644 (file)
index 0000000..b3dd35f
--- /dev/null
@@ -0,0 +1,35 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+{{/*
+  Resolve the image repository secret token.
+  The value for .Values.global.repositoryCred is used:
+  repositoryCred:
+    user: user
+    password: password
+    mail: email (optional)
+*/}}
+{{- define "repository.secret" -}}
+  {{- $repo := .Values.repository }}
+  {{- $cred := .Values.repositoryCredential }}
+  {{- $user := default "docker" $cred.user }}
+  {{- $password := default "docker" $cred.password }}
+  {{- $mail := default "@" $cred.mail }}
+  {{- $auth := printf "%s:%s" $user $password | b64enc }}
+  {{- printf "{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}" $repo $user $password $mail $auth | b64enc -}}
+{{- end -}}
+
@@ -17,7 +17,7 @@
 apiVersion: v1
 kind: Secret
 metadata:
-  name: {{ .Release.Name }}-docker-registry-key
+  name: {{ include "common.dockercred.prefix" . }}-{{ .Values.repository | replace "." "-" | replace ":" "-" | replace "/" "-" }}
 data:
   .dockercfg: {{ include "repository.secret" . }}
 type: kubernetes.io/dockercfg
diff --git a/ric-common/Docker-Credential/helm/values.yaml b/ric-common/Docker-Credential/helm/values.yaml
new file mode 100644 (file)
index 0000000..4b02dc9
--- /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.                                             #
+################################################################################
+
+# Values for setting up Kubernetes resources for accessing infrastructure such as docker registry
+# helm repo, etc.
+
+repository: "nexus3.o-ran-sc.org:10004"
+
+repositoryCredential:
+  user: "docker"
+  password: "docker"
+
+
diff --git a/ric-common/Helm-Credential/bin/install b/ric-common/Helm-Credential/bin/install
new file mode 100755 (executable)
index 0000000..00e11bc
--- /dev/null
@@ -0,0 +1,55 @@
+#!/bin/bash
+################################################################################
+#   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.                                             #
+################################################################################
+NAMESPACE=$1
+
+HELMREPO=$2
+
+HELMREPO_NORMALIZED=${HELMREPO/:/.}
+
+HELMREPO_NORMALIZED=${HELMREPO_NORMALIZED/\//.}
+
+HELMUSERNAME=$3
+
+HELMPASSWORD=$4
+
+HELMCERTPATH=$5
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+
+cp $HELMCERTPATH $DIR/../helm/cert/tls.crt
+
+
+source $DIR/../etc/credential.conf
+
+if [ -z "$RICPLT_RELEASE_NAME" ];then
+   RELEASE_NAME=$helm_release_name
+else
+   RELEASE_NAME=$RICPLT_RELEASE_NAME
+fi
+
+COMMON_CHART_VERSION=$(cat $DIR/../../Common-Template/helm/ric-common/Chart.yaml | grep version | awk '{print $2}')
+helm package -d /tmp $DIR/../../Common-Template/helm/ric-common
+
+
+mkdir -p  $DIR/../helm/charts/
+cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/charts/
+
+helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-cred-${NAMESPACE}-${HELMREPO_NORMALIZED}" --set helmrepo="$HELMREPO" --set helmrepoCredential.user="$DOCKERUSERNAME" --set helmrepoCredential.password="$DOCKERPASSWORD"  $DIR/../helm
+
+
+rm $DIR/../helm/cert/tls.crt
diff --git a/ric-common/Helm-Credential/bin/uninstall b/ric-common/Helm-Credential/bin/uninstall
new file mode 100755 (executable)
index 0000000..caee118
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/bash
+################################################################################
+#   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.                                             #
+################################################################################
+NAMESPACE=$1
+
+HELMREPO=$2
+
+HELMREPO_NORMALIZED=${HELMREPO/:/.}
+
+HELMREPO_NORMALIZED=${HELMREPO_NORMALIZED/\//.}
+
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+
+
+source $DIR/../etc/credential.conf
+
+if [ -z "$RICPLT_RELEASE_NAME" ];then
+   RELEASE_NAME=$helm_release_name
+else
+   RELEASE_NAME=$RICPLT_RELEASE_NAME
+fi
+
+
+helm delete --purge "${RELEASE_NAME}-cred-${NAMESPACE}-${HELMREPO_NORMALIZED}"
+
+
diff --git a/ric-common/Helm-Credential/etc/credential.conf b/ric-common/Helm-Credential/etc/credential.conf
new file mode 100644 (file)
index 0000000..8bee714
--- /dev/null
@@ -0,0 +1,23 @@
+################################################################################
+#   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.                                             #
+################################################################################
+
+
+# helm_release_name defines the release name helm will use to deploy the credential
+# It will be overrided by RICPLT_RELEASE_NAME
+helm_release_name=r0
+
+
diff --git a/ric-common/Helm-Credential/helm/Chart.yaml b/ric-common/Helm-Credential/helm/Chart.yaml
new file mode 100644 (file)
index 0000000..69bdcc4
--- /dev/null
@@ -0,0 +1,22 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for setting up k8s resources for accessing external and infrastructure resources before RIC deployment"
+name: credential
+version: 1.1.0
diff --git a/ric-common/Helm-Credential/helm/requirements.yaml b/ric-common/Helm-Credential/helm/requirements.yaml
new file mode 100644 (file)
index 0000000..2ab71b4
--- /dev/null
@@ -0,0 +1,20 @@
+################################################################################
+#   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.                                             #
+################################################################################
+
+dependencies:
+  - name: ric-common
+    version: ~2.0.0
diff --git a/ric-common/Helm-Credential/helm/templates/_helper.tpl b/ric-common/Helm-Credential/helm/templates/_helper.tpl
new file mode 100644 (file)
index 0000000..9666aa4
--- /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.                                             #
+################################################################################
+
+
+
+{{- define "helmrepo.secret.user" -}}
+  {{- $user := default "helm" .Values.helmrepoCredential.user -}}
+  {{- printf "%s" $user |b64enc }}
+{{- end -}}
+
+
+{{- define "helmrepo.secret.password" -}}
+  {{- $pass := default "helm" .Values.helmrepoCredential.password -}}
+  {{- printf "%s" $pass |b64enc }}
+{{- end -}}
diff --git a/ric-common/Helm-Credential/helm/templates/config-helm-cert.yaml b/ric-common/Helm-Credential/helm/templates/config-helm-cert.yaml
new file mode 100644 (file)
index 0000000..8485c3e
--- /dev/null
@@ -0,0 +1,23 @@
+################################################################################
+#   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.helmcert.prefix" . }}-{{ .Values.helmrepo | replace "." "-" | replace ":" "-" | replace "/" "-" }}
+data:
+  {{ (.Files.Glob "cert/tls.crt").AsConfig | nindent 2 }}
diff --git a/ric-common/Helm-Credential/helm/templates/secrets-helm-xapp.yaml b/ric-common/Helm-Credential/helm/templates/secrets-helm-xapp.yaml
new file mode 100644 (file)
index 0000000..2c7034b
--- /dev/null
@@ -0,0 +1,25 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ include "common.helmcred.prefix" . }}-{{ .Values.helmrepo | replace "." "-" | replace ":" "-" | replace "/" "-" }}
+type: Opaque
+data:
+  helm_repo_username: {{ include "helmrepo.secret.user" . }}
+  helm_repo_password: {{ include "helmrepo.secret.password" . }}
diff --git a/ric-common/Helm-Credential/helm/values.yaml b/ric-common/Helm-Credential/helm/values.yaml
new file mode 100644 (file)
index 0000000..dc1008d
--- /dev/null
@@ -0,0 +1,26 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+# Values for setting up Kubernetes resources for accessing infrastructure such as docker registry
+# helm repo, etc.
+
+helmrepo: "ricaux-entry/helm"
+
+
+helmrepoCredential:
+  user: "helm"
+  password: "helm"
index aa94575..2ab71b4 100644 (file)
@@ -16,5 +16,5 @@
 ################################################################################
 
 dependencies:
-  - name: common
-    version: ~1.1.0
+  - name: ric-common
+    version: ~2.0.0
index eb7bf21..1c38a86 100755 (executable)
@@ -36,12 +36,12 @@ else
    NAMESPACE=$RICPLT_NAMESPACE
 fi
 
-COMMON_CHART_VERSION=$(cat $DIR/../../../ric-platform/50-RIC-Platform/helm/common/Chart.yaml | grep version | awk '{print $2}')
-helm package -d /tmp $DIR/../../../ric-platform/50-RIC-Platform/helm/common
+COMMON_CHART_VERSION=$(cat $DIR/../../../ric-common/Common-Template/helm/ric-common/Chart.yaml | grep version | awk '{print $2}')
+helm package -d /tmp $DIR/../../../ric-common/Common-Template/helm/ric-common
 
 
 mkdir -p  $DIR/../helm/charts/
-cp /tmp/common-$COMMON_CHART_VERSION.tgz $DIR/../helm/charts/
+cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/charts/
 
 
 if [ -z $OVERRIDEYAML ]; then
index fc9b737..c4fc902 100644 (file)
@@ -24,3 +24,4 @@ helm_release_name=r0
 # It will be overrided by RICPLT_NAMESPACE
 namespace=ricplt
 
+
index aa94575..2ab71b4 100644 (file)
@@ -16,5 +16,5 @@
 ################################################################################
 
 dependencies:
-  - name: common
-    version: ~1.1.0
+  - name: ric-common
+    version: ~2.0.0
index 984701e..08bcca2 100644 (file)
@@ -1,19 +1,24 @@
 -----BEGIN CERTIFICATE-----
-MIIDFzCCAf+gAwIBAgIRAPqRsyJWFaoXjwzmI+uQ5GkwDQYJKoZIhvcNAQELBQAw
-HTEbMBkGA1UEAxMSaGVsbS1yZXBvc2l0b3J5LWNhMB4XDTE5MDYyMjAzMDYxNVoX
-DTIwMDYyMTAzMDYxNVowEDEOMAwGA1UEAxMFbmV4dXMwggEiMA0GCSqGSIb3DQEB
-AQUAA4IBDwAwggEKAoIBAQDBExs2W0HvXyinLL/LOkgM4Dobe1OVVntQzCGB8tqD
-xI4ZcXGh8G4b3GMLVe8vs0c0IUUbPhy23AkDxGUT7whLbo1UwGa41htxY51zok4S
-20NN706XVs6E0tKqA1L5kzyxLEAKgHE/EefWIf6MHtRt5GfwFVdjdfZP+9L/ZpUL
-u1HKmiWw7fv0m/MrcAQA7lILpB4xeaM8rYWtBj8TGeoMlWLOtOcFKGpY9Kuty1n7
-cebHcz++qY+Vsrf8RlG4lGlit2IY06FE+5ihK24Zt9Ttwf3lsTf6xDwAEGmDxOAp
-R61gY9wX8ClLO+ns+nkkEiJ90104a4U+qg115tZCGfBBAgMBAAGjXzBdMA4GA1Ud
-DwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0T
-AQH/BAIwADAeBgNVHREEFzAVghNoZWxtLnJpY2luZnJhLmxvY2FsMA0GCSqGSIb3
-DQEBCwUAA4IBAQA2Mt29tQ/3ACBpmZSKLPj3jTpPulXQKgtH9of9X0XBQ0ZdfqTN
-Evyu+K5gY/FF6RhnkaCML4XoOnvJHQQBydwMrK9f6mcC26U8PWZn9+usihw5GJHp
-Hu3pc0PDHb87ha+qCeie9ssKitz8pbJarTh6z1Ht8OT9/nktXkgPnIYI9ycAsdwy
-uBww45UxDu8OD8TT0/08RzH56ruPpRSYDNRbkcT8FZV8C6KgEKG55e/xNAITQwaD
-LD4xYkAZqK7lcPzuIM1kZUQAOJyw72TicMl94r0mL7pZ2NOJUCkkVvkYXo97TUKB
-zomEUpolyZnVpdl4HG3v3Lwd2K3bCs2X+HTc
+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 f50435e..e4c031e 100755 (executable)
@@ -38,18 +38,17 @@ fi
 
 
 RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator kong-platform kong-xapp"
-#RICPLT_COMPONENTS="kong-platform kong-xapp"
 
 echo "Deploying RIC Platform components [$RICPLT_COMPONENTS]"
 echo "Platform Namespace: $NAMESPACE"
 echo "Helm Release Name: $RELEASE_NAME"
 
 
-COMMON_CHART_VERSION=$(cat $DIR/../helm/common/Chart.yaml | grep version | awk '{print $2}')
+COMMON_CHART_VERSION=$(cat $DIR/../../../ric-common/Common-Template/helm/ric-common/Chart.yaml | grep version | awk '{print $2}')
 
 helm repo remove local
 
-helm package -d /tmp $DIR/../helm/common
+helm package -d /tmp $DIR/../../../ric-common/Common-Template/helm/ric-common
 
 
 for component in $RICPLT_COMPONENTS; do
@@ -72,10 +71,10 @@ for component in $RICPLT_COMPONENTS; do
   echo "not kong component"
      
   mkdir -p $DIR/../helm/$component/charts/
-  cp /tmp/common-$COMMON_CHART_VERSION.tgz $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
   else
   helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component
   fi
-done
\ No newline at end of file
+done
index a5ccd8c..d4d2c62 100755 (executable)
@@ -38,6 +38,7 @@ 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 aa94575..2ab71b4 100644 (file)
@@ -16,5 +16,5 @@
 ################################################################################
 
 dependencies:
-  - name: common
-    version: ~1.1.0
+  - name: ric-common
+    version: ~2.0.0
index 7c6efb8..02275f0 100644 (file)
@@ -20,7 +20,7 @@ kind: ConfigMap
 metadata:
   name: {{ include "common.configmapname.appmgr" . }}-appconfig
 data:
-    {{- $restport := default ":8080" (printf ":%.0f" .Values.appmgr.containerPort) | quote -}}
+    {{- $restport := default ":8080" (printf ":%.0f" .Values.appmgr.service.http.containerPort) | quote -}}
     {{- $helmrepo := include "common.helmrepository" . | quote -}}
     {{- $reponame := default "helm-repo" .Values.appmgr.reponame | quote -}}
     {{- $tiller := include "common.helmrepositorytiller" . | quote -}}
index c038264..07a2019 100644 (file)
@@ -20,5 +20,5 @@ kind: ConfigMap
 metadata:
   name: {{ include "common.configmapname.appmgr" . }}-appenv
 data:
-  {{- $dbaasservicehost := include "common.servicename.dbaas" . | quote -}}
+  {{- $dbaasservicehost := include "common.servicename.dbaas.tcp" . | quote -}}
   {{- (.Files.Get "resources/appenv.yaml") | replace "__DBAAS_SERVICE_HOST__" $dbaasservicehost | nindent 2 }}
index acce132..fafcb42 100644 (file)
@@ -38,10 +38,6 @@ spec:
         release: {{ .Release.Name }}
     spec:
       hostname: {{ .Chart.Name }}
-      hostAliases:
-        - ip: "137.135.91.204"
-          hostnames:
-            - "snapshot.helm.ranco-dev-tools.eastus.cloudapp.azure.com"
       imagePullSecrets:
         - name: {{ include "common.repositoryCred" . }}
       containers:
@@ -50,7 +46,10 @@ spec:
           imagePullPolicy: {{ include "common.pullPolicy" . }}
           ports:
             - name: http
-              containerPort: {{ .Values.appmgr.containerPort }}
+              containerPort: {{ .Values.appmgr.service.http.containerPort }}
+              protocol: TCP
+            - name: rmr
+              containerPort: {{ .Values.appmgr.service.rmr.containerPort }}
               protocol: TCP
           volumeMounts:
             - name: config-volume
index 1f3d49f..683b32b 100644 (file)
@@ -1,12 +1,12 @@
 apiVersion: extensions/v1beta1
 kind: Ingress
 metadata:
-  name: ric-ingress-appmgr
+  name: {{ include "common.ingressname.appmgr" . }}
 spec:
   rules:
   - http:
       paths:
       - path: /appmgr
         backend:
-          serviceName: {{ include "common.servicename.appmgr" . }}
-          servicePort: {{ .Values.appmgr.service.port }}
+          serviceName: {{ include "common.servicename.appmgr.http" . }}
+          servicePort: {{ .Values.appmgr.service.http.port }}
@@ -18,7 +18,7 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "common.servicename.appmgr" . }}
+  name: {{ include "common.servicename.appmgr.http" . }}
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
@@ -26,12 +26,12 @@ metadata:
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }} 
 spec:
-  type: {{ .Values.appmgr.service.type }}
+  type: ClusterIP
   ports:
-    - port: {{ .Values.appmgr.service.port }}
-      protocol: {{ .Values.appmgr.service.protocol }}
-      name: "{{ .Values.appmgr.service.name }}"
-      {{ if (eq .Values.appmgr.service.type "NodePort") }}nodePort: {{ .Values.appmgr.service.extport }} {{ end }}
+    - port: {{ .Values.appmgr.service.http.port }}
+      protocol: "TCP"
+      name: "http"
+      targetPort: "http"
   selector:
     app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
     release: {{ .Release.Name }}
diff --git a/ric-platform/50-RIC-Platform/helm/appmgr/templates/service-rmr.yaml b/ric-platform/50-RIC-Platform/helm/appmgr/templates/service-rmr.yaml
new file mode 100644 (file)
index 0000000..972a263
--- /dev/null
@@ -0,0 +1,38 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.appmgr.rmr" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }} 
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ .Values.appmgr.service.rmr.port }}
+      protocol: "TCP"
+      name: "rmr"
+      targetPort: "rmr"
+  selector:
+    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    release: {{ .Release.Name }}
+
index 3b20e64..58a6a20 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://helm.ricinfra.local:31000
+helmRepository: "https://ricaux-entry/helm
 
 # Default secret name for Helm Repo credential. .Value.golbal.helmRepositoryCred will
 # override the default value. You can further override uing
@@ -71,15 +71,15 @@ appmgr:
   # This section describes xAppManager
   replicaCount: 1
 
-  containerPort: 8080
   reponame: "helm-repo"
 
   service:
-    type: ClusterIP
-    port: 8080
-    name: appmgr-service
-    protocol: "TCP"
-    extport: 30020
+    http:
+      port: 8080
+      containerPort: 8080
+    rmr:
+      port: 4560
+      containerPort: 4560
 
 
   # config
diff --git a/ric-platform/50-RIC-Platform/helm/common/templates/_ingresscontroller.tpl b/ric-platform/50-RIC-Platform/helm/common/templates/_ingresscontroller.tpl
deleted file mode 100644 (file)
index 7ebbcd1..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-################################################################################
-#   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 ingress controller addresses.
-*/}}
-{{- define "common.ingressurl.ricplt" -}}
-  {{- if .Values.kongplatform -}}
-    {{- if .Values.kongplatform.ingressurlOverride -}}
-      {{- printf "%s" .Values.kongplatform.ingressurlOverride -}}
-    {{- else -}}
-      {{- printf "ricplt-entry" -}}
-    {{- end -}}
-  {{- else -}}
-    {{- printf "ricplt-entry" -}}
-  {{- end -}}
-{{- end -}}
-
-
-
-{{- define "common.ingresshttpport.ricplt" -}}
-  {{- if .Values.kongplatform -}}
-    {{- if .Values.kongplatform.ingresshttpportOverride -}}
-      {{- printf "%.0f" .Values.kongplatform.ingresshttpportOverride -}}
-    {{- else -}}
-      {{- printf "30080" -}}
-    {{- end -}}
-  {{- else -}}
-    {{- printf "30080" -}}
-  {{- end -}}
-{{- end -}}
-
-
-
-{{- define "common.ingresshttpsport.ricplt" -}}
-  {{- if .Values.kongplatform -}}
-    {{- if .Values.kongplatform.ingresshttpsportOverride -}}
-      {{- printf "%.0f" .Values.kongplatform.ingresshttpsportOverride -}}
-    {{- else -}}
-      {{- printf "30443" -}}
-    {{- end -}}
-  {{- else -}}
-    {{- printf "30443" -}}
-  {{- end -}}
-{{- end -}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-{{- define "common.ingressurl.ricxapp" -}}
-  {{- if .Values.kongxapp -}}
-    {{- if .Values.kongxapp.ingressurlOverride -}}
-      {{- printf "%s" .Values.kongxapp.ingressurlOverride -}}
-    {{- else -}}
-      {{- printf "ricxapp-entry" -}}
-    {{- end -}}
-  {{- else -}}
-    {{- printf "ricxapp-entry" -}}
-  {{- end -}}
-{{- end -}}
-
-
-
-{{- define "common.ingresshttpport.ricxapp" -}}
-  {{- if .Values.kongxapp -}}
-    {{- if .Values.kongxapp.ingresshttpportOverride -}}
-      {{- printf "%.0f" .Values.kongxapp.ingresshttpportOverride -}}
-    {{- else -}}
-      {{- printf "31080" -}}
-    {{- end -}}
-  {{- else -}}
-    {{- printf "31080" -}}
-  {{- end -}}
-{{- end -}}
-
-
-
-{{- define "common.ingresshttpsport.ricxapp" -}}
-  {{- if .Values.kongxapp -}}
-    {{- if .Values.kongxapp.ingresshttpsportOverride -}}
-      {{- printf "%.0f" .Values.kongxapp.ingresshttpsportOverride -}}
-    {{- else -}}
-      {{- printf "31443" -}}
-    {{- end -}}
-  {{- else -}}
-    {{- printf "31443" -}}
-  {{- end -}}
-{{- end -}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-{{- define "common.ingressurl.ricaux" -}}
-  {{- if .Values.kongaux -}}
-    {{- if .Values.kongaux.ingressurlOverride -}}
-      {{- printf "%s" .Values.kongaux.ingressurlOverride -}}
-    {{- else -}}
-      {{- printf "ricaux-entry" -}}
-    {{- end -}}
-  {{- else -}}
-    {{- printf "ricaux-entry" -}}
-  {{- end -}}
-{{- end -}}
-
-
-
-
-
-{{- define "common.ingresshttpport.ricaux" -}}
-  {{- if .Values.kongaux -}}
-    {{- if .Values.kongaux.ingresshttpportOverride -}}
-      {{- printf "%.0f" .Values.kongaux.ingresshttpportOverride -}}
-    {{- else -}}
-      {{- printf "32080" -}}
-    {{- end -}}
-  {{- else -}}
-    {{- printf "32080" -}}
-  {{- end -}}
-{{- end -}}
-
-
-
-{{- define "common.ingresshttpsport.ricaux" -}}
-  {{- if .Values.kongaux -}}
-    {{- if .Values.kongaux.ingresshttpsportOverride -}}
-      {{- printf "%.0f" .Values.kongaux.ingresshttpsportOverride -}}
-    {{- else -}}
-      {{- printf "32443" -}}
-    {{- end -}}
-  {{- else -}}
-    {{- printf "32443" -}}
-  {{- end -}}
-{{- end -}}
-
index aa94575..2ab71b4 100644 (file)
@@ -16,5 +16,5 @@
 ################################################################################
 
 dependencies:
-  - name: common
-    version: ~1.1.0
+  - name: ric-common
+    version: ~2.0.0
index 135b2c2..d4213b2 100644 (file)
@@ -44,6 +44,8 @@ spec:
       - image: {{ include "common.repository" . }}/{{ .Values.dbaas.backend.image.name }}:{{ .Values.dbaas.backend.image.tag }}
         imagePullPolicy: {{ include "common.pullPolicy" . }}
         ports:
-        - containerPort: {{ .Values.dbaas.backend.targetPort }}
+        - containerPort: {{ .Values.dbaas.backend.containerPort }}
+          name: sql
+          protocol: TCP
         name: {{ include "common.namespace" . }}-{{ include "common.name" . }}
       restartPolicy: Always
index c87ddf3..d9ef65e 100644 (file)
@@ -18,7 +18,7 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "common.servicename.dbaas" . }}
+  name: {{ include "common.servicename.dbaas.tcp" . }}
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
@@ -31,4 +31,6 @@ spec:
     release: {{ .Release.Name }}
   ports:
   - port: {{ .Values.dbaas.backend.port }}
-    targetPort: {{ .Values.dbaas.backend.targetPort }}
+    targetPort: "sql"
+    protocol: "TCP"
+    name: "sql"
index edf51f4..2950715 100644 (file)
@@ -39,7 +39,7 @@ dbaas:
     terminationGracePeriodSeconds: 0
     replicas: 1
     port: 6379
-    targetPort: 6379
+    containerPort: 6379
     image:
       name: redis-standalone
       tag: latest
index f33294a..3623833 100644 (file)
@@ -15,7 +15,7 @@
 #   limitations under the License.                                             #
 ################################################################################
 
-
+appVersion: "1.0"
 apiVersion: v1
 description: Oran e2mgr Helm charts
 name: e2mgr
index aa94575..2ab71b4 100644 (file)
@@ -16,5 +16,5 @@
 ################################################################################
 
 dependencies:
-  - name: common
-    version: ~1.1.0
+  - name: ric-common
+    version: ~2.0.0
index fcfe9a0..690f4f8 100644 (file)
@@ -24,6 +24,6 @@ metadata:
 data:
   router.txt: |
     newrt|start
-    rte|1001|{{ include "common.servicename.e2term" .}}:38000
-    rte|2002|{{ include "common.servicename.e2mgr" .}}:3801
+    rte|1001|{{ include "common.servicename.e2term.rmr" .}}:38000
+    rte|2002|{{ include "common.servicename.e2mgr.rmr" .}}:3801
     newrt|end
index 0836045..e62dfd4 100644 (file)
@@ -51,11 +51,13 @@ spec:
           env:
             - name: RMR_RTG_SVC
               value: "{{ .Values.e2mgr.env.RMR_RTG_SVC }}"
+            - name: RIC_ID
+              value: "{{ .Values.e2mgr.env.RIC_ID }}"
           ports:
-            - name: {{ .Values.e2mgr.service.http.name }}
-              containerPort: {{ .Values.e2mgr.service.http.port }}
-            - name: {{ .Values.e2mgr.service.nano.name }}
-              containerPort: {{ .Values.e2mgr.service.nano.port }}
+            - name: "http"
+              containerPort: {{ .Values.e2mgr.service.http.containerPort }}
+            - name: "rmr"
+              containerPort: {{ .Values.e2mgr.service.rmr.containerPort }}
           stdin: true
           tty: true
           securityContext:
index 0722928..d1c8faa 100644 (file)
@@ -1,12 +1,12 @@
 apiVersion: extensions/v1beta1
 kind: Ingress
 metadata:
-  name: ric-ingress-e2mgr
+  name: {{ include "common.ingressname.e2mgr" . }}
 spec:
   rules:
   - http:
       paths:
       - path: /e2mgr
         backend:
-          serviceName: {{ include "common.servicename.e2mgr" . }}
-          servicePort: {{ .Values.e2mgr.service.http.port }}
\ No newline at end of file
+          serviceName: {{ include "common.servicename.e2mgr.http" . }}
+          servicePort: {{ .Values.e2mgr.service.http.port }}
diff --git a/ric-platform/50-RIC-Platform/helm/e2mgr/templates/service-http.yaml b/ric-platform/50-RIC-Platform/helm/e2mgr/templates/service-http.yaml
new file mode 100644 (file)
index 0000000..95e0590
--- /dev/null
@@ -0,0 +1,37 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.e2mgr.http" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ .Values.e2mgr.service.http.port }}
+      protocol: "TCP"
+      name: "http"
+      targetPort: "http" 
+  selector:
+    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    release: {{ .Release.Name }}
diff --git a/ric-platform/50-RIC-Platform/helm/e2mgr/templates/service-rmr.yaml b/ric-platform/50-RIC-Platform/helm/e2mgr/templates/service-rmr.yaml
new file mode 100644 (file)
index 0000000..d7d39d9
--- /dev/null
@@ -0,0 +1,37 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename.e2mgr.rmr" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ .Values.e2mgr.service.rmr.port }}
+      protocol: "TCP"
+      name: "rmr"
+      targetPort: "rmr"
+  selector:
+    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    release: {{ .Release.Name }}
diff --git a/ric-platform/50-RIC-Platform/helm/e2mgr/templates/service.yaml b/ric-platform/50-RIC-Platform/helm/e2mgr/templates/service.yaml
deleted file mode 100644 (file)
index 2eb580f..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-################################################################################
-#   Copyright (c) 2019 AT&T Intellectual Property.                             #
-#   Copyright (c) 2019 Nokia.                                                  #
-#                                                                              #
-#   Licensed under the Apache License, Version 2.0 (the "License");            #
-#   you may not use this file except in compliance with the License.           #
-#   You may obtain a copy of the License at                                    #
-#                                                                              #
-#       http://www.apache.org/licenses/LICENSE-2.0                             #
-#                                                                              #
-#   Unless required by applicable law or agreed to in writing, software        #
-#   distributed under the License is distributed on an "AS IS" BASIS,          #
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
-#   See the License for the specific language governing permissions and        #
-#   limitations under the License.                                             #
-################################################################################
-
-apiVersion: v1
-kind: Service
-metadata:
-  name: {{ include "common.servicename.e2mgr" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }} 
-spec:
-  type: {{ .Values.e2mgr.service.type }}
-  ports:
-    - port: {{ .Values.e2mgr.service.http.port }}
-      protocol: TCP 
-      targetPort: {{ .Values.e2mgr.service.http.port }}
-      name: "{{ .Values.e2mgr.service.http.name }}"
-      {{ if (eq .Values.e2mgr.service.type "NodePort") }}nodePort: {{ .Values.e2mgr.service.http.extport }} {{ end }}
-    - port: {{ .Values.e2mgr.service.nano.port }}
-      protocol: TCP 
-      targetPort: {{ .Values.e2mgr.service.nano.port }}
-      name: "{{ .Values.e2mgr.service.nano.name }}"
-      {{ if (eq .Values.e2mgr.service.type "NodePort") }}nodePort: {{ .Values.e2mgr.service.nano.extport }} {{ end }}
-  selector:
-      app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
-      release: {{ .Release.Name }}
index a0bb1af..9a84755 100644 (file)
@@ -39,24 +39,19 @@ repositoryCred: docker-reg-cred
 e2mgr:
   image:
     name: e2mgr
-    tag: 1.0.0 
+    tag: 1.6.0 
   
   
   replicaCount: 1
   
   env:
     RMR_RTG_SVC: "ric-full-rtmgr"
-  
+    RIC_ID: "bbbccc-abcd0e/20"
+
   service:
-    type: ClusterIP
     http:
       port: 3800
-      target_port: 3800
-      protocol: "TCP"
-      name: "http"
-      extport: 30004
-    nano:
+      containerPort: 3800
+    rmr:
       port: 3801
-      target_port: 3801
-      protocol: "TCP"
-      name: "nano"
+      containerPort: 3801
index aa94575..2ab71b4 100644 (file)
@@ -16,5 +16,5 @@
 ################################################################################
 
 dependencies:
-  - name: common
-    version: ~1.1.0
+  - name: ric-common
+    version: ~2.0.0
index 832b263..68faf8e 100644 (file)
@@ -24,6 +24,6 @@ metadata:
 data:
   router.txt: |
     newrt|start
-    rte|1001|{{ include "common.configmapname.e2term" . }}:38000
-    rte|2002|{{ include "common.configmapname.e2mgr" . }}:3801
+    rte|1001|{{ include "common.servicename.e2term.rmr" . }}:38000
+    rte|2002|{{ include "common.servicename.e2mgr.rmr" . }}:3801
     newrt|end
index c090c36..f3b5ce2 100644 (file)
@@ -54,14 +54,14 @@ spec:
             - name: sctp
               value: "5577"
             - name: nano
-              value: "{{ .Values.e2term.service.nano.port }}"
+              value: "{{ .Values.e2term.service.rmr.port }}"
             - name: print
               value: "{{ .Values.e2term.env.print }}"
             - name: RMR_RTG_SVC
               value: "{{ .Values.e2term.env.RMR_RTG_SVC }}"
           ports:
-            - name: {{ .Values.e2term.service.nano.name }}
-              containerPort: {{ .Values.e2term.service.nano.port }}
+            - name: "rmr"
+              containerPort: {{ .Values.e2term.service.rmr.containerPort }}
           stdin: true
           tty: true
           securityContext:
@@ -18,7 +18,7 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "common.servicename.e2term" . }}
+  name: {{ include "common.servicename.e2term.rmr" . }}
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
@@ -26,12 +26,12 @@ metadata:
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }} 
 spec:
-  type: {{ .Values.e2term.service.type }}
+  type: ClusterIP
   ports:
-    - port: {{ .Values.e2term.service.nano.port }}
-      protocol: TCP
-      targetPort:  {{ .Values.e2term.service.nano.target_port }}
-      name: {{ .Values.e2term.service.nano.name }}
+    - port: {{ .Values.e2term.service.rmr.port }}
+      protocol: "TCP"
+      targetPort: "rmr"
+      name: "rmr"
   selector:
       app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
       release: {{ .Release.Name }}
index e92ba78..17d2c5c 100644 (file)
@@ -46,10 +46,6 @@ e2term:
     RMR_RTG_SVC: "ric-full-rtmgr"
   
   service:
-    type: ClusterIP
-    nano:
+    rmr:
       port: 38000
-      target_port: 38000 
-      protocol: "TCP"
-      name: "nano-port"
-  
+      containerPort: 38000
diff --git a/ric-platform/50-RIC-Platform/helm/kong-platform/requirements.lock b/ric-platform/50-RIC-Platform/helm/kong-platform/requirements.lock
new file mode 100644 (file)
index 0000000..925f156
--- /dev/null
@@ -0,0 +1,6 @@
+dependencies:
+- name: kong
+  repository: https://kubernetes-charts.storage.googleapis.com
+  version: 0.12.2
+digest: sha256:602faffeeb88bef70eccff8d135f1db6c524ca11eb90f6436a86c9866af57be9
+generated: 2019-06-27T15:22:13.009502618-04:00
diff --git a/ric-platform/50-RIC-Platform/helm/kong-xapp/requirements.lock b/ric-platform/50-RIC-Platform/helm/kong-xapp/requirements.lock
new file mode 100644 (file)
index 0000000..38ebd05
--- /dev/null
@@ -0,0 +1,6 @@
+dependencies:
+- name: kong
+  repository: https://kubernetes-charts.storage.googleapis.com
+  version: 0.12.2
+digest: sha256:602faffeeb88bef70eccff8d135f1db6c524ca11eb90f6436a86c9866af57be9
+generated: 2019-06-27T15:22:18.891920209-04:00
diff --git a/ric-platform/50-RIC-Platform/helm/ric/.helmignore b/ric-platform/50-RIC-Platform/helm/ric/.helmignore
deleted file mode 100644 (file)
index 50af031..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# Patterns to ignore when building packages.
-# This supports shell glob matching, relative path matching, and
-# negation (prefixed with !). Only one pattern per line.
-.DS_Store
-# Common VCS dirs
-.git/
-.gitignore
-.bzr/
-.bzrignore
-.hg/
-.hgignore
-.svn/
-# Common backup files
-*.swp
-*.bak
-*.tmp
-*~
-# Various IDEs
-.project
-.idea/
-*.tmproj
-.vscode/
diff --git a/ric-platform/50-RIC-Platform/helm/ric/requirements.yaml b/ric-platform/50-RIC-Platform/helm/ric/requirements.yaml
deleted file mode 100644 (file)
index c9f0c24..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-################################################################################
-#   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.                                             #
-################################################################################
-
-dependencies:
-  - name: e2mgr
-    version: 1.1.0
-    condition: e2mgr.enabled
-  - name: rtmgr
-    version: 1.1.0
-    condition: rtmgr.enabled
-  - name: e2term
-    version: 1.1.0
-    condition: e2term.enabled
-  - name: appmgr
-    version: 1.1.0
-    condition: appmgr.enabled
-  - name: dbaas
-    version: 1.1.0
-    condition: dbaas.enabled
index aa94575..2ab71b4 100644 (file)
@@ -16,5 +16,5 @@
 ################################################################################
 
 dependencies:
-  - name: common
-    version: ~1.1.0
+  - name: ric-common
+    version: ~2.0.0
index afeff19..d6f3259 100644 (file)
@@ -47,7 +47,7 @@ spec:
           command: ["/run_rtmgr.sh"]
           env:
             - name: XMURL
-              value: "http://ric-full-appmgr:8080/ric/v1/xapps"
+              value: "http://{{ include "common.servicename.appmgr.http" . }}:8080/ric/v1/xapps"
             - name: SOCKET
               value: "tcp://0.0.0.0:4560"
             - name: RTFILE
@@ -61,5 +61,5 @@ spec:
             - name: SDL
               value: "file"
           ports:
-            - name: {{ .Values.rtmgr.service.nano.name }}
-              containerPort: {{ .Values.rtmgr.service.nano.port }}
+            - name: "rmr"
+              containerPort: {{ .Values.rtmgr.service.rmr.containerPort }}
@@ -18,7 +18,7 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "common.servicename.rtmgr" . }}
+  name: {{ include "common.servicename.rtmgr.rmr" . }}
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
@@ -26,12 +26,12 @@ metadata:
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }} 
 spec:
-  type: {{ .Values.rtmgr.service.type }}
+  type: ClusterIP
   ports:
-    - port: {{ .Values.rtmgr.service.nano.port }}
+    - port: {{ .Values.rtmgr.service.rmr.port }}
       protocol: TCP
-      targetPort:  {{ .Values.rtmgr.service.nano.target_port }}
-      name: {{ .Values.rtmgr.service.nano.name }}
+      targetPort: "rmr"
+      name: "rmr"
   selector:
     app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
     release: {{ .Release.Name }}
index 299863c..74d479f 100644 (file)
@@ -40,10 +40,6 @@ rtmgr:
     tag: 0.0.2
   
   service:
-    type: ClusterIP
-    nano:
-      port: 5656
-      target_port: 4560
-      protocol: "TCP"
-      name: "nano-port"
-  
+    rmr:
+      port: 4560
+      containerPort: 5656
index d4a538d..6f6f6e9 100755 (executable)
@@ -42,15 +42,15 @@ echo "Platform Namespace: $NAMESPACE"
 echo "Helm Release Name: $RELEASE_NAME"
 
 
-COMMON_CHART_VERSION=$(cat $DIR/../../../ric-platform/50-RIC-Platform/helm/common/Chart.yaml | grep version | awk '{print $2}')
+COMMON_CHART_VERSION=$(cat $DIR/../../../ric-common/Common-Template/helm/ric-common/Chart.yaml | grep version | awk '{print $2}')
 
-helm package -d /tmp $DIR/../../../ric-platform/50-RIC-Platform/helm/common
+helm package -d /tmp $DIR/../../../ric-common/Common-Template/helm/ric-common
 
 
 for component in $RICAUX_COMPONENTS; do
   echo "Preparing chart for comonent $component"
   mkdir -p  $DIR/../helm/$component/charts/
-  cp /tmp/common-$COMMON_CHART_VERSION.tgz $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
   else
index aa94575..2ab71b4 100644 (file)
@@ -16,5 +16,5 @@
 ################################################################################
 
 dependencies:
-  - name: common
-    version: ~1.1.0
+  - name: ric-common
+    version: ~2.0.0
index fc6029a..ec524c1 100644 (file)
@@ -42,4 +42,33 @@ subsets:
       - port: {{ include "common.ingresshttpport.ricaux" . }}
         name: {{ include "common.ingressurl.ricaux" . }}-http-ingress-port
       - port: {{ include "common.ingresshttpport.ricaux" . }}
-        name: {{ include "common.ingressurl.ricaux" . }}-https-ingress-port
\ No newline at end of file
+        name: {{ include "common.ingressurl.ricaux" . }}-https-ingress-port
+---
+kind: "Service"
+apiVersion: "v1"
+metadata:
+  name: {{ include "common.ingressurl.ricinfra" . }}
+  namespace: {{ include "common.namespace" . }}
+spec:
+  ports:
+    - name: {{ include "common.ingressurl.ricinfra" . }}-http-ingress-port
+      protocol: "TCP"
+      port: 80
+    - name: {{ include "common.ingressurl.ricinfra" . }}-https-ingress-port
+      protocol: "TCP"
+      port: 443
+---
+kind: "Endpoints"
+apiVersion: "v1"
+metadata:
+  # match with the selector-less service
+  name: {{ include "common.ingressurl.ricinfra" . }}
+  namespace: {{ include "common.namespace" . }}
+subsets: 
+  - addresses:
+      - ip: "{{ .Values.ext.ip }}"
+    ports:
+      - port: {{ include "common.ingresshttpport.ricinfra" . }}
+        name: {{ include "common.ingressurl.ricinfra" . }}-http-ingress-port
+      - port: {{ include "common.ingresshttpport.ricinfra" . }}
+        name: {{ include "common.ingressurl.ricinfra" . }}-https-ingress-port
diff --git a/ric-xapps/90-xApps/helm/xapp-admin/values.yaml b/ric-xapps/90-xApps/helm/xapp-admin/values.yaml
deleted file mode 100644 (file)
index f63a7a7..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-################################################################################
-#   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.                                             #
-################################################################################
-
-# This is a YAML-formatted file.
-# Declare variables to be passed into your templates.
-
-global:
-  # modify this section to point to your local testing settings
-  repository: "${__RUNRICENV_DOCKER_HOST__}:${__RUNRICENV_DOCKER_PORT__}"
-  repositoryCred:
-    user: "${__RUNRICENV_DOCKER_USER__}"
-    password: "${__RUNRICENV_DOCKER_PASS__}"
-  image:
-    pullPolicy: IfNotPresent
-
-ricplt:
-  # This section is reserved for values imported from RIC Platform charts
-  
-
-ricapp:
-  # This section is for xapp.  Templates to be resolved from xApp descriptor
-  replicaCount: 1
-  xappname: &anchor-xappname xapp-admin
-
-  # # the name of the process that indicates the liveness of the component
-  livenessprocessname: adm-ctrl-xapp
-
-  image:
-    name: test/xapp-admin
-    tag: latest
-
-  nameOverride: ""
-  fullnameOverride: ""
-
-  service:
-    enabled: false
-
-  # to be provided as property file
-  appconfigpath: /opt/etc/xapp
-  appconfig:
-    # to be present as appconfigpath/propfile1
-    propfile1: |
-      prop1.v1="propvalue1.1"
-      prop1.v2="propvalue1.2"
-    propfile2: "propvalue2"
-
-  # to be provided as env variables
-  appenv:
-    NAME: *anchor-xappname
-    RMR_RTG_SVC: "127.0.0.2"
-    NAME: "ADM_CTRL_XAPP2"
-    THREADS: "2"
-    VERBOSE: "1"
-    PORT: "tcp:4561"
-
-  # secret
-  appsecretpath: /opt/etc/kube
-  appsecret:
-    username: myusername
-    password: mypassword
-
-  resources:
-    limits:
-      cpu: 100m
-      memory: 128Mi
-    requests:
-      cpu: 100m
-      memory: 128Mi
-
-  nodeSelector: {}
-
-  tolerations: []
-
-  affinity: {}
-
index e3ad5b2..e2309bf 100644 (file)
@@ -18,7 +18,7 @@
 {{/*
 Expand the name of the chart.
 */}}
-{{- define "ricapp.name" -}}
+{{- define "ricxapp.name" -}}
 {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
@@ -27,15 +27,15 @@ 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 "-" -}}
+{{- define "ricxapp.fullname" -}}
+{{- if .Values.ricxapp.fullnameOverride -}}
+{{- .Values.ricxapp.fullnameOverride | trunc 63 | trimSuffix "-" -}}
 {{- else -}}
-{{- $name := default .Chart.Name .Values.ricapp.nameOverride -}}
+{{- $name := default .Chart.Name .Values.ricxapp.nameOverride -}}
 {{- if contains $name .Release.Name -}}
 {{- .Release.Name | trunc 63 | trimSuffix "-" -}}
 {{- else -}}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 {{- end -}}
 {{- end -}}
@@ -43,32 +43,37 @@ If release name contains chart name it will be used as a full name.
 {{/*
 Create chart name and version as used by the chart label.
 */}}
-{{- define "ricapp.chart" -}}
+{{- define "ricxapp.chart" -}}
 {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
-{{- define "repository" -}}
-  {{if .Values.repositoryOverride }}
-    {{- printf "%s" .Values.repositoryOverride -}}
-  {{else}}
-    {{- default .Values.repository .Values.global.repository -}}
-  {{end}}
+{{- define "ricxapp.namespace" -}}
+  {{- default .Release.Namespace .Values.nsPrefix -}}
 {{- end -}}
 
-{{/*
-  Resolve the image repository secret token.
-  The value for .Values.global.repositoryCred is used:
-  repositoryCred:
-    user: user
-    password: password
-    mail: email (optional)
-*/}}
-{{- define "repository.secret" -}}
-  {{- $repo := include "repository" . }}
-  {{- $repo := default "${__RUNRICENV_DOCKER_HOST__}:${__RUNRICENV_DOCKER_PORT__}" $repo }}
-  {{- $cred := .Values.global.repositoryCred }}
-  {{- $mail := default "@" $cred.mail }}
-  {{- $auth := printf "%s:%s" $cred.user $cred.password | b64enc }}
-  {{- printf "{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}" $repo $cred.user $cred.password $mail $auth | b64enc -}}
+
+
+{{- define "ricxapp.servicename.rmr" -}}
+  {{- $name := ( include "ricxapp.fullname" . ) -}}
+  {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "ricxapp.servicename.http" -}}
+  {{- $name := ( include "ricxapp.fullname" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
+{{- define "ricxapp.configmapname" -}}
+  {{- $name := ( include "ricxapp.fullname" . ) -}}
+  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "ricxapp.deploymentname" -}}
+  {{- $name := ( include "ricxapp.fullname" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "ricxapp.imagepullsecret" -}}
+  {{- printf "docker-reg-cred" -}}
+{{- end -}}
index 1e82e94..e6fa26d 100644 (file)
@@ -26,16 +26,18 @@ spec:
         app.kubernetes.io/instance: {{ .Release.Name }}
     spec:
       hostname: {{ .Values.ricapp.hostname }}
+      imagePullSecrets:
+        - name: {{ include "ricxapp.imagepullsecret" . }}
       containers:
         - name: {{ .Chart.Name }}
           image: "{{ .Values.global.repository }}/{{ .Values.ricapp.image.name }}:{{ .Values.ricapp.image.tag }}"
           imagePullPolicy: {{ .Values.global.image.pullPolicy }}
           ports:
             - name: http
-              containerPort: {{ .Values.ricapp.service.port }}
+              containerPort: {{ .Values.ricapp.service.http.containerPort }}
               protocol: TCP
             - name: rmr
-              containerPort: {{ .Values.ricapp.service.rmrPort }}
+              containerPort: {{ .Values.ricapp.service.rmr.containerPort }}
               protocol: TCP
           volumeMounts:
             - name: config-volume
 #   limitations under the License.                                             #
 ################################################################################
 
-{{ if .Values.ricapp.service.enabled }}
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "ricapp.name" . }}
+  name: {{ include "ricxapp.servicename.http" . }}
+  namespace: {{ include "ricxapp.namespace" . }}
   labels:
-    app.kubernetes.io/name: {{ include "ricapp.name" . }}
-    helm.sh/chart: {{ include "ricapp.chart" . }}
-    app.kubernetes.io/instance: {{ .Release.Name }}
-    app.kubernetes.io/managed-by: {{ .Release.Service }}
+    app: {{ include "ricxapp.namespace" . }}-{{ include "ricxapp.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
 spec:
-  type: {{ .Values.ricapp.service.type }}
+  type: ClusterIP
   ports:
-    - port: {{ .Values.ricapp.service.port }}
+    - port: {{ .Values.ricxapp.service.http.port }}
       targetPort: http
       protocol: TCP
       name: http
   selector:
-    app.kubernetes.io/name: {{ include "ricapp.name" . }}
-    app.kubernetes.io/instance: {{ .Release.Name }}
-{{ end }}
\ No newline at end of file
+    app: {{ include "ricxapp.namespace" . }}-{{ include "ricxapp.name" . }}
+    release: {{ .Release.Name }}
diff --git a/ric-xapps/90-xApps/helm/xapp-std/templates/service-rmr.yaml b/ric-xapps/90-xApps/helm/xapp-std/templates/service-rmr.yaml
new file mode 100644 (file)
index 0000000..1d9ce92
--- /dev/null
@@ -0,0 +1,37 @@
+################################################################################
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #
+#   Copyright (c) 2019 Nokia.                                                  #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "ricxapp.servicename.rmr" . }}
+  namespace: {{ include "ricxapp.namespace" . }}
+  labels:
+    app: {{ include "ricxapp.namespace" . }}-{{ include "ricxapp.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ .Values.ricxapp.service.rmr.port }}
+      targetPort: rmr
+      protocol: TCP
+      name: rmr
+  selector:
+    app: {{ include "ricxapp.namespace" . }}-{{ include "ricxapp.name" . }}
+    release: {{ .Release.Name }}
index 4d95ef1..1eaa11a 100644 (file)
@@ -45,11 +45,12 @@ ricapp:
     tag: latest
 
   service:
-    enabled: true
-    type: ClusterIP
-    name: xapp-std-service
-    port: 8080
-    rmrPort: 4560
+    http:
+      port: 8080
+      containerPort: 8080
+    rmr:
+      port: 4560
+      containerPort: 4560
 
   probes:
     healthAliveCheckEndpoint: ric/v1/health/alive