From: rshacham Date: Fri, 9 Aug 2019 19:54:46 +0000 (+0000) Subject: Removed xapp kong; remove nexus; created xapp services; other changes to allow cross... X-Git-Tag: 0.0.2~34^2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=cf28a83dfa8e7803391c76347f24081bbf91b63b;p=it%2Fdep.git Removed xapp kong; remove nexus; created xapp services; other changes to allow cross-cluster routing Change-Id: Ia5f8b7dcc1b71053ed7d9372872f37c2236afb47 Signed-off-by: rshacham --- diff --git a/RECIPE_EXAMPLE/RIC_AUX_RECIPE_EXAMPLE b/RECIPE_EXAMPLE/RIC_AUX_RECIPE_EXAMPLE index bb79baf9..3b950064 100644 --- a/RECIPE_EXAMPLE/RIC_AUX_RECIPE_EXAMPLE +++ b/RECIPE_EXAMPLE/RIC_AUX_RECIPE_EXAMPLE @@ -39,13 +39,9 @@ global: # The ingress URL definitions for the ingress controller in four namespaces ingressurl: - platform: ricplt-entry - xapp: ricxapp-entry - aux: ricaux-entry - infra: ricinfra-entry - localnexus: nexus-entry - localhelm: helm-entry - localdocker: docker-entry + ric: ric-entry + aux: aux-entry + helm: helm-entry tillers: ricxapp: diff --git a/RECIPE_EXAMPLE/RIC_INFRA_RECIPE_EXAMPLE b/RECIPE_EXAMPLE/RIC_INFRA_RECIPE_EXAMPLE index 56a94010..81ed90bb 100644 --- a/RECIPE_EXAMPLE/RIC_INFRA_RECIPE_EXAMPLE +++ b/RECIPE_EXAMPLE/RIC_INFRA_RECIPE_EXAMPLE @@ -39,13 +39,9 @@ global: # The ingress URL definitions for the ingress controller in four namespaces ingressurl: - platform: ricplt-entry - xapp: ricxapp-entry - aux: ricaux-entry - infra: ricinfra-entry - localnexus: nexus-entry - localhelm: helm-entry - localdocker: docker-entry + ric: ric-entry + aux: aux-entry + helm: helm-entry tillers: ricxapp: diff --git a/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE b/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE index b6248d97..59f8d212 100644 --- a/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE +++ b/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE @@ -39,13 +39,9 @@ global: # The ingress URL definitions for the ingress controller in four namespaces ingressurl: - platform: ricplt-entry - xapp: ricxapp-entry - aux: ricaux-entry - infra: ricinfra-entry - localnexus: nexus-entry - localhelm: helm-entry - localdocker: docker-entry + ric: ric-entry + aux: aux-entry + helm: helm-entry tillers: ricxapp: diff --git a/ric-aux/80-Auxiliary-Functions/bin/install b/ric-aux/80-Auxiliary-Functions/bin/install index 2526b66a..aaa1bd48 100755 --- a/ric-aux/80-Auxiliary-Functions/bin/install +++ b/ric-aux/80-Auxiliary-Functions/bin/install @@ -59,7 +59,7 @@ else COMMON_OVERRIDE=$RIC_COMMON_OVERRIDE fi -RICAUX_COMPONENTS="dashboard ves message-router kong-aux" +RICAUX_COMPONENTS="dashboard ves message-router kong" echo "Deploying RIC AUX components [$RICAUX_COMPONENTS]" echo "Helm Release Name: $RELEASE_NAME" @@ -67,7 +67,6 @@ echo "Helm Release Name: $RELEASE_NAME" 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/../../../ric-common/Common-Template/helm/ric-common/ @@ -75,15 +74,6 @@ helm package -d /tmp $DIR/../../../ric-common/Common-Template/helm/ric-common/ for component in $RICAUX_COMPONENTS; do echo "Preparing chart for comonent $component" - if [ $component = "kong-aux" ]; then - mkdir -p $DIR/../helm/$component/charts - helm dep up $DIR/../helm/$component - helm install --namespace $AUX_NAMESPACE --name "${RELEASE_NAME}-$component" $DIR/../helm/$component --set postgresql.enabled=false --set env.database=off - continue - fi - - echo "not kong component" - mkdir -p $DIR/../helm/$component/charts/ cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/$component/charts/ if [ -z $OVERRIDEYAML ]; then diff --git a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl index 992518b2..3cd463e1 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl +++ b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl @@ -21,7 +21,7 @@ Generate the URLS of the endpoints. {{- define "dashboard.prefix.a1mediator" -}} - {{- $ingress := ( include "common.ingressurl.ricplt" . ) -}} + {{- $ingress := ( include "common.ingressurl.ric" . ) -}} {{- if .Values.dashboard.a1med.url.prefix -}} {{- printf "%s" .Values.dashboard.a1med.url.prefix -}} {{- else -}} @@ -30,7 +30,7 @@ Generate the URLS of the endpoints. {{- end -}} {{- define "dashboard.prefix.anrxapp" -}} - {{- $ingress := ( include "common.ingressurl.ricxapp" . ) -}} + {{- $ingress := ( include "common.ingressurl.ric" . ) -}} {{- if .Values.dashboard.anrxapp.url.prefix -}} {{- printf "%s" .Values.dashboard.anrxapp.url.prefix -}} {{- else -}} @@ -39,7 +39,7 @@ Generate the URLS of the endpoints. {{- end -}} {{- define "dashboard.prefix.e2mgr" -}} - {{- $ingress := ( include "common.ingressurl.ricplt" . ) -}} + {{- $ingress := ( include "common.ingressurl.ric" . ) -}} {{- if .Values.dashboard.e2mgr.url.prefix -}} {{- printf "%s" .Values.dashboard.e2mgr.url.prefix -}} {{- else -}} @@ -48,7 +48,7 @@ Generate the URLS of the endpoints. {{- end -}} {{- define "dashboard.prefix.appmgr" -}} - {{- $ingress := ( include "common.ingressurl.ricplt" . ) -}} + {{- $ingress := ( include "common.ingressurl.ric" . ) -}} {{- if .Values.dashboard.appmgr.url.prefix -}} {{- printf "%s" .Values.dashboard.appmgr.url.prefix -}} {{- else -}} diff --git a/ric-aux/80-Auxiliary-Functions/helm/kong-aux/.helmignore b/ric-aux/80-Auxiliary-Functions/helm/kong/.helmignore similarity index 100% rename from ric-aux/80-Auxiliary-Functions/helm/kong-aux/.helmignore rename to ric-aux/80-Auxiliary-Functions/helm/kong/.helmignore diff --git a/ric-aux/80-Auxiliary-Functions/helm/kong-aux/Chart.yaml b/ric-aux/80-Auxiliary-Functions/helm/kong/Chart.yaml similarity index 85% rename from ric-aux/80-Auxiliary-Functions/helm/kong-aux/Chart.yaml rename to ric-aux/80-Auxiliary-Functions/helm/kong/Chart.yaml index b1eb9550..592e8008 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/kong-aux/Chart.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/kong/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart for Kubernetes -name: kong-aux +name: kong version: 1.0.0 diff --git a/ric-aux/80-Auxiliary-Functions/helm/kong-aux/requirements.yaml b/ric-aux/80-Auxiliary-Functions/helm/kong/requirements.yaml similarity index 100% rename from ric-aux/80-Auxiliary-Functions/helm/kong-aux/requirements.yaml rename to ric-aux/80-Auxiliary-Functions/helm/kong/requirements.yaml diff --git a/ric-platform/50-RIC-Platform/helm/kong-xapp/values.yaml b/ric-aux/80-Auxiliary-Functions/helm/kong/values.yaml similarity index 91% rename from ric-platform/50-RIC-Platform/helm/kong-xapp/values.yaml rename to ric-aux/80-Auxiliary-Functions/helm/kong/values.yaml index 80a2d3f3..25469ebb 100644 --- a/ric-platform/50-RIC-Platform/helm/kong-xapp/values.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/kong/values.yaml @@ -5,7 +5,6 @@ kong: ingressController: enabled: true - installCRDs: false postgresql: enabled: false @@ -23,3 +22,9 @@ kong: # If need to change a proxy port here, do not forget to update the # _ingresscontroller.tpl file with the new port number. + +postgresql: + enabled: false + +env: + database: off diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml index 41751f34..287642eb 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml @@ -55,9 +55,9 @@ spec: image: {{ .Values.ves.onapRepository }}/{{ .Values.ves.image.name }}:{{ .Values.ves.image.tag }} imagePullPolicy: {{ include "common.pullPolicy" . }} ports: - - containerPort: {{ include "common.serviceport.ves.http.container" . }} + - containerPort: {{ include "common.serviceport.ves.http" . }} protocol: TCP - - containerPort: {{ include "common.serviceport.ves.https.container" . }} + - containerPort: {{ include "common.serviceport.ves.https" . }} protocol: TCP volumeMounts: - name: component-log @@ -68,7 +68,7 @@ spec: readinessProbe: httpGet: path: "/healthcheck" - port: {{ include "common.serviceport.ves.http.container" . }} + port: {{ include "common.serviceport.ves.http" . }} scheme: HTTP initialDelaySeconds: 5 timeoutSeconds: 1 @@ -77,4 +77,4 @@ spec: failureThreshold: 1 terminationMessagePath: "/dev/termination-log" terminationMessagePolicy: File - restartPolicy: Always \ No newline at end of file + restartPolicy: Always diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml index c2e137c9..34769ea0 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml @@ -29,15 +29,13 @@ spec: ports: - name: http protocol: TCP - port: {{ include "common.serviceport.ves.http.container" . }} - targetPort: {{ include "common.serviceport.ves.http.container" . }} - nodePort: {{ include "common.serviceport.ves.http" . }} + port: {{ include "common.serviceport.ves.http" . }} + targetPort: {{ include "common.serviceport.ves.http" . }} - name: https protocol: TCP - port: {{ include "common.serviceport.ves.https.container" . }} - targetPort: {{ include "common.serviceport.ves.https.container" . }} - nodePort: {{ include "common.serviceport.ves.https" . }} + port: {{ include "common.serviceport.ves.https" . }} + targetPort: {{ include "common.serviceport.ves.https" . }} selector: app: {{ include "common.namespace.aux" . }}-{{ include "common.name.ves" . }} release: {{ .Release.Name }} - type: NodePort \ No newline at end of file + type: ClusterIP diff --git a/ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-docker.yaml b/ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-docker.yaml deleted file mode 100644 index b7a67535..00000000 --- a/ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-docker.yaml +++ /dev/null @@ -1,45 +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. # -################################################################################ - -kind: "Service" -apiVersion: "v1" -metadata: - name: {{ include "common.ingressurl.localdocker" . }} - namespace: {{ include "common.namespace" . }} -spec: - ports: - - name: {{ include "common.ingressurl.localdocker" . }}-http-ingress-port - protocol: "TCP" - port: 80 - - name: {{ include "common.ingressurl.localdocker" . }}-https-ingress-port - protocol: "TCP" - port: 443 ---- -kind: "Endpoints" -apiVersion: "v1" -metadata: - # match with the selector-less service - name: {{ include "common.ingressurl.localdocker" . }} - namespace: {{ include "common.namespace" . }} -subsets: - - addresses: - - ip: "{{ .Values.extsvcaux.auxip }}" - ports: - - port: {{ include "common.ingresshttpport.ricinfra" . }} - name: {{ include "common.ingressurl.localdocker" . }}-http-ingress-port - - port: {{ include "common.ingresshttpsport.ricinfra" . }} - name: {{ include "common.ingressurl.localdocker" . }}-https-ingress-port diff --git a/ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-helm.yaml b/ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-helm.yaml index 6ce4f2f4..e1a24b45 100644 --- a/ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-helm.yaml +++ b/ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-helm.yaml @@ -18,14 +18,14 @@ kind: "Service" apiVersion: "v1" metadata: - name: {{ include "common.ingressurl.localhelm" . }} - namespace: {{ include "common.namespace" . }} + name: {{ include "common.ingressurl.helm" . }} + namespace: {{ include "common.namespace.aux" . }} spec: ports: - - name: {{ include "common.ingressurl.localhelm" . }}-http-ingress-port + - name: {{ include "common.ingressurl.helm" . }}-http-ingress-port protocol: "TCP" port: 80 - - name: {{ include "common.ingressurl.localhelm" . }}-https-ingress-port + - name: {{ include "common.ingressurl.helm" . }}-https-ingress-port protocol: "TCP" port: 443 --- @@ -33,13 +33,13 @@ kind: "Endpoints" apiVersion: "v1" metadata: # match with the selector-less service - name: {{ include "common.ingressurl.localhelm" . }} - namespace: {{ include "common.namespace" . }} + name: {{ include "common.ingressurl.helm" . }} + namespace: {{ include "common.namespace.aux" . }} subsets: - addresses: - ip: "{{ .Values.extsvcaux.auxip }}" ports: - - port: {{ include "common.ingresshttpport.ricinfra" . }} - name: {{ include "common.ingressurl.localhelm" . }}-http-ingress-port - - port: {{ include "common.ingresshttpsport.ricinfra" . }} - name: {{ include "common.ingressurl.localhelm" . }}-https-ingress-port + - port: {{ include "common.ingresshttpport.aux" . }} + name: {{ include "common.ingressurl.helm" . }}-http-ingress-port + - port: {{ include "common.ingresshttpsport.aux" . }} + name: {{ include "common.ingressurl.helm" . }}-https-ingress-port diff --git a/ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-platform.yaml b/ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-ric.yaml similarity index 72% rename from ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-platform.yaml rename to ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-ric.yaml index 36eaf052..243853f1 100644 --- a/ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-platform.yaml +++ b/ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-ric.yaml @@ -18,14 +18,14 @@ kind: "Service" apiVersion: "v1" metadata: - name: {{ include "common.ingressurl.ricplt" . }} - namespace: {{ include "common.namespace" . }} + name: {{ include "common.ingressurl.ric" . }} + namespace: {{ include "common.namespace.aux" . }} spec: ports: - - name: {{ include "common.ingressurl.ricplt" . }}-http-ingress-port + - name: {{ include "common.ingressurl.ric" . }}-http-ingress-port protocol: "TCP" port: 80 - - name: {{ include "common.ingressurl.ricplt" . }}-https-ingress-port + - name: {{ include "common.ingressurl.ric" . }}-https-ingress-port protocol: "TCP" port: 443 --- @@ -33,13 +33,13 @@ kind: "Endpoints" apiVersion: "v1" metadata: # match with the selector-less service - name: {{ include "common.ingressurl.ricplt" . }} - namespace: {{ include "common.namespace" . }} + name: {{ include "common.ingressurl.ric" . }} + namespace: {{ include "common.namespace.aux" . }} subsets: - addresses: - ip: "{{ .Values.extsvcaux.ricip }}" ports: - - port: {{ include "common.ingresshttpport.ricplt" . }} - name: {{ include "common.ingressurl.ricplt" . }}-http-ingress-port - - port: {{ include "common.ingresshttpsport.ricplt" . }} - name: {{ include "common.ingressurl.ricplt" . }}-https-ingress-port + - port: {{ include "common.ingresshttpport.ric" . }} + name: {{ include "common.ingressurl.ric" . }}-http-ingress-port + - port: {{ include "common.ingresshttpsport.ric" . }} + name: {{ include "common.ingressurl.ric" . }}-https-ingress-port diff --git a/ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-xapp.yaml b/ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-xapp.yaml deleted file mode 100644 index 1c9d2edc..00000000 --- a/ric-aux/85-Ext-Services/helm/extsvcaux/templates/services-xapp.yaml +++ /dev/null @@ -1,45 +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. # -################################################################################ - -kind: "Service" -apiVersion: "v1" -metadata: - name: {{ include "common.ingressurl.ricxapp" . }} - namespace: {{ include "common.namespace" . }} -spec: - ports: - - name: {{ include "common.ingressurl.ricxapp" . }}-http-ingress-port - protocol: "TCP" - port: 80 - - name: {{ include "common.ingressurl.ricxapp" . }}-https-ingress-port - protocol: "TCP" - port: 443 ---- -kind: "Endpoints" -apiVersion: "v1" -metadata: - # match with the selector-less service - name: {{ include "common.ingressurl.ricxapp" . }} - namespace: {{ include "common.namespace" . }} -subsets: - - addresses: - - ip: "{{ .Values.extsvcaux.ricip }}" - ports: - - port: {{ include "common.ingresshttpport.ricxapp" . }} - name: {{ include "common.ingressurl.ricxapp" . }}-http-ingress-port - - port: {{ include "common.ingresshttpsport.ricxapp" . }} - name: {{ include "common.ingressurl.ricxapp" . }}-https-ingress-port diff --git a/ric-common/Common-Template/helm/ric-common/templates/_ingresscontroller.tpl b/ric-common/Common-Template/helm/ric-common/templates/_ingresscontroller.tpl index af110ab7..2106fa4d 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_ingresscontroller.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_ingresscontroller.tpl @@ -20,91 +20,45 @@ */}} ####################### Service URL ##################################### -{{- define "common.ingressurl.ricplt" -}} +{{- define "common.ingressurl.ric" -}} {{- if .Values.global -}} {{- if .Values.global.ingressurl -}} - {{- if .Values.global.ingressurl.platform -}} - {{- printf "%s" .Values.global.ingressurl.platform -}} + {{- if .Values.global.ingressurl.ric -}} + {{- printf "%s" .Values.global.ingressurl.ric -}} {{- else -}} - {{- printf "ricplt-entry" -}} + {{- printf "ric-entry" -}} {{- end -}} {{- else -}} - {{- printf "ricplt-entry" -}} + {{- printf "ric-entry" -}} {{- end -}} {{- else -}} - {{- printf "ricplt-entry" -}} + {{- printf "ric-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" -}} +{{- define "common.ingressurl.aux" -}} {{- 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" -}} + {{- printf "aux-entry" -}} {{- end -}} {{- else -}} - {{- printf "ricinfra-entry" -}} + {{- printf "aux-entry" -}} {{- end -}} {{- else -}} - {{- printf "ricinfra-entry" -}} + {{- printf "aux-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" -}} +{{- define "common.ingressurl.helm" -}} {{- if .Values.global -}} {{- if .Values.global.ingressurl -}} - {{- if .Values.global.ingressurl.localhelm -}} - {{- printf "%s" .Values.global.ingressurl.localhelm -}} + {{- if .Values.global.ingressurl.helm -}} + {{- printf "%s" .Values.global.ingressurl.helm -}} {{- else -}} {{- printf "helm-entry" -}} {{- end -}} @@ -117,23 +71,6 @@ {{- 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 -}} - - @@ -143,41 +80,20 @@ ## 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 "30180" -}} -{{- end -}} - -{{- define "common.ingresshttpsport.ricplt" -}} - {{- printf "30543" -}} -{{- end -}} - - -{{- define "common.ingresshttpport.ricxapp" -}} +{{- define "common.ingresshttpport.ric" -}} {{- printf "31080" -}} {{- end -}} - -{{- define "common.ingresshttpsport.ricxapp" -}} +{{- define "common.ingresshttpsport.ric" -}} {{- printf "31443" -}} {{- end -}} -{{- define "common.ingresshttpport.ricaux" -}} +{{- define "common.ingresshttpport.aux" -}} {{- printf "32080" -}} {{- end -}} -{{- define "common.ingresshttpsport.ricaux" -}} +{{- define "common.ingresshttpsport.aux" -}} {{- printf "32443" -}} {{- end -}} - -{{- define "common.ingresshttpport.ricinfra" -}} - {{- printf "32180" -}} -{{- end -}} - - - -{{- define "common.ingresshttpsport.ricinfra" -}} - {{- printf "32543" -}} -{{- end -}} - diff --git a/ric-common/Common-Template/helm/ric-common/templates/_ports.tpl b/ric-common/Common-Template/helm/ric-common/templates/_ports.tpl index 36f91c42..c5db0658 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_ports.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_ports.tpl @@ -67,7 +67,5 @@ {{- define "common.serviceport.messagerouter.kafka" -}}9092{{- end -}} {{- define "common.serviceport.messagerouter.zookeeper" -}}2181{{- end -}} -{{- define "common.serviceport.ves.http" -}}30235{{- end -}} -{{- define "common.serviceport.ves.http.container" -}}8080{{- end -}} -{{- define "common.serviceport.ves.https" -}}30417{{- end -}} -{{- define "common.serviceport.ves.https.container" -}}8443{{- end -}} +{{- define "common.serviceport.ves.http" -}}8080{{- end -}} +{{- define "common.serviceport.ves.https" -}}8443{{- end -}} diff --git a/ric-infra/10-Nexus/bin/change_password b/ric-infra/10-Nexus/bin/change_password deleted file mode 100755 index 1a727d3f..00000000 --- a/ric-infra/10-Nexus/bin/change_password +++ /dev/null @@ -1,225 +0,0 @@ -#!/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. # -################################################################################ - -OVERRIDEYAML=$1 - - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" -source $DIR/../etc/nexus.conf - -if [ -z "$RICINFRA_RELEASE_NAME" ];then - RELEASE_NAME=$helm_release_name -else - RELEASE_NAME=$RICINFRA_RELEASE_NAME -fi -if [ -z "$RICINFRA_NAMESPACE" ];then - NAMESPACE=$namespace -else - NAMESPACE=$RICINFRA_NAMESPACE -fi -if [ -z "$INGRESS_PORT" ];then - INGRESS_PORT_NEXUS=$ingress_port -else - INGRESS_PORT_NEXUS=$INGRESS_PORT -fi - -if [ -z "$DEFAULT_NEXUS_ADMIN_PASSWORD" ];then - NEXUS_ADMIN_PASSWORD=$default_admin_password -else - NEXUS_ADMIN_PASSWORD=$DEFAULT_NEXUS_ADMIN_PASSWORD -fi - - - -HOSTPOSTFIX=$(cat $DIR/../helm/values.yaml | grep hostpostfix | awk '{print $2}') - - - - - - - - - -NEXUS_URL="http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS" - - - - - - -if [ -z $OVERRIDEYAML ]; then - - DOCKERPASSWORD=$(cat $DIR/../../20-Credential/helm/values.yaml | awk '/^.*repositoryCredential:.*/{getline; getline; print substr($2, 2, length($2)-2);}') - HELMPASSWORD=$(cat $DIR/../../20-Credential/helm/values.yaml | awk '/^.*helmrepoCredential:.*/{getline; getline; print substr($2, 2, length($2)-2);}') - ADMINPASSWORD=$(cat $DIR/../helm/values.yaml | awk '/^.*adminPassword:.*/{print $2}') - -else - - - - DOCKERPASSWORD=$(cat $OVERRIDEYAML | awk '/^.*repositoryCredential:.*/{getline; getline; print substr($2, 2, length($2)-2);}') - - - - if [ -z $DOCKERPASSWORD ]; then - DOCKERPASSWORD=$(cat $DIR/../../20-Credential/helm/values.yaml | awk '/^.*repositoryCredential:.*/{getline; getline; print substr($2, 2, length($2)-2);}') - fi - - HELMPASSWORD=$(cat $OVERRIDEYAML | awk '/^.*helmrepoCredential:.*/{getline; getline; print substr($2, 2, length($2)-2);}') - - if [ -z $HELMPASSWORD ]; then - HELMPASSWORD=$(cat $DIR/../../20-Credential/helm/values.yaml | awk '/^.*helmrepoCredential:.*/{getline; getline; print substr($2, 2, length($2)-2);}') - fi - - ADMINPASSWORD=$(cat $OVERRIDEYAML | awk '/^.*adminPassword:.*/{print $2;}') - if [ -z $ADMINPASSWORD ]; then - ADMINPASSWORD=$(cat $DIR/../helm/values.yaml | awk '/^.*adminPassword:.*/{print $2;}') - fi - -fi - - - - -#echo $DOCKERPASSWORD, $HELMPASSWORD, $ADMINPASSWORD - - - - -DOCKERPORT=$(cat $DIR/../helm/templates/deployment.yaml | awk '/.*- name: docker.*/{getline; print $2}') - - -DOCKERREPOSCRIPT="{\"name\":\"docker_changepassword\",\ - \"type\":\"groovy\",\ - \"content\":\"security.securitySystem.changePassword('docker', '$DOCKERPASSWORD')\"}" - - - - -# This line uses the default admin password -STATUS=$(curl -s -o /dev/null -w "%{http_code}" -u admin:$NEXUS_ADMIN_PASSWORD -X POST -H "Content-Type: application/json" --data "$DOCKERREPOSCRIPT" http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS/service/rest/v1/script) - - -if [ "${STATUS}" != "204" ];then - echo "> script upload failed!" -fi - -STATUS=$(curl -s -o /dev/null -w "%{http_code}" -u admin:$NEXUS_ADMIN_PASSWORD -X POST -H 'Content-Type: text/plain' -H 'Accept: application/json' http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS/service/rest/v1/script/docker_changepassword/run) - - -if [ "${STATUS}" == "200" ];then - echo "> docker password change succeeded!" -else - echo "> docker password change failed!" -fi - - -STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X DELETE -u admin:$NEXUS_ADMIN_PASSWORD http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS/service/rest/v1/script/docker_changepassword) - - -if [ "${STATUS}" != "204" ];then - echo "> script deletion failed!" -fi - - - - - - - - - - - - - -HELMREPOSCRIPT="{\"name\":\"helm_changepassword\",\ - \"type\":\"groovy\",\ - \"content\":\"security.securitySystem.changePassword('helm', '$HELMPASSWORD')\"}" - - - -# This line uses the default admin password -STATUS=$(curl -s -o /dev/null -w "%{http_code}" -u admin:$NEXUS_ADMIN_PASSWORD -X POST -H "Content-Type: application/json" --data "$HELMREPOSCRIPT" http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS/service/rest/v1/script) - - -if [ "${STATUS}" != "204" ];then - echo "> script upload failed!" -fi - -STATUS=$(curl -s -o /dev/null -w "%{http_code}" -u admin:$NEXUS_ADMIN_PASSWORD -X POST -H 'Content-Type: text/plain' -H 'Accept: application/json' http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS/service/rest/v1/script/helm_changepassword/run) - - -if [ "${STATUS}" == "200" ];then - echo "> helm password change succeeded!" -else - echo "> helm password change failed!" -fi - - -STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X DELETE -u admin:$NEXUS_ADMIN_PASSWORD http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS/service/rest/v1/script/helm_changepassword) - - -if [ "${STATUS}" != "204" ];then - echo "> script deletion failed!" -fi - - - - - - - - - - - - - -ADMINSCRIPT="{\"name\":\"admin_changepassword\",\ - \"type\":\"groovy\",\ - \"content\":\"security.securitySystem.changePassword('admin', '$ADMINPASSWORD')\"}" - - - -# This line uses the default admin password -STATUS=$(curl -s -o /dev/null -w "%{http_code}" -u admin:$NEXUS_ADMIN_PASSWORD -X POST -H "Content-Type: application/json" --data "$ADMINSCRIPT" http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS/service/rest/v1/script) - - -if [ "${STATUS}" != "204" ];then - echo "> script upload failed!" -fi - -STATUS=$(curl -s -o /dev/null -w "%{http_code}" -u admin:$NEXUS_ADMIN_PASSWORD -X POST -H 'Content-Type: text/plain' -H 'Accept: application/json' http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS/service/rest/v1/script/admin_changepassword/run) - - -if [ "${STATUS}" == "200" ];then - echo "> admin password change succeeded!" -else - echo "> admin password change failed!" -fi - -NEXUS_ADMIN_PASSWORD=$ADMINPASSWORD -STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X DELETE -u admin:$NEXUS_ADMIN_PASSWORD http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS/service/rest/v1/script/admin_changepassword) - - -if [ "${STATUS}" != "204" ];then - echo "> script deletion failed!" -fi - diff --git a/ric-infra/10-Nexus/bin/clear_nexus_data_path b/ric-infra/10-Nexus/bin/clear_nexus_data_path deleted file mode 100755 index cd3684e2..00000000 --- a/ric-infra/10-Nexus/bin/clear_nexus_data_path +++ /dev/null @@ -1,48 +0,0 @@ -#!/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. # -################################################################################ - -OVERRIDEYAML=$1 -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" - - - - - - -if [ -z $OVERRIDEYAML ]; then - - DATAPATH=$(cat $DIR/../helm/values.yaml | awk '/^.*datapath:.*/{ print $2;}') - -else - - DATAPATH=$(cat $OVERRIDEYAML | awk '/^.*datapath:.*/{ print $2;}') - - - if [ -z $DATAPATH ]; then - DATAPATH=$(cat $DIR/../helm/values.yaml | awk '/^.*datapath:.*/{ print $2;}') - fi - -fi - - rm -rf $DATAPATH - - mkdir -p $DATAPATH - - - chmod -R a+rwx $DATAPATH - diff --git a/ric-infra/10-Nexus/bin/deploy_nexus_data b/ric-infra/10-Nexus/bin/deploy_nexus_data deleted file mode 100755 index 8c630f08..00000000 --- a/ric-infra/10-Nexus/bin/deploy_nexus_data +++ /dev/null @@ -1,70 +0,0 @@ -#!/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. # -################################################################################ - -OVERRIDEYAML=$1 -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" - - - - - - -if [ -z $OVERRIDEYAML ]; then - - DATAPATH=$(cat $DIR/../helm/values.yaml | awk '/^.*datapath:.*/{ print $2;}') - -else - - DATAPATH=$(cat $OVERRIDEYAML | awk '/^.*datapath:.*/{ print $2;}') - - - if [ -z $DATAPATH ]; then - DATAPATH=$(cat $DIR/../helm/values.yaml | awk '/^.*datapath:.*/{ print $2;}') - fi - -fi - -if [ -e $DATAPATH ]; then - if [ ! -w $DATAPATH ]; then - echo "Error: you don't have write permission to directory $DATAPATH" - echo "Deployment terminated." - exit 1 - fi - - rm -rf $DATAPATH - - mkdir -p $DATAPATH - - tar -xf $DIR/../etc/conf.tar -C $DATAPATH - - chmod -R a+rwx $DATAPATH -else - mkdir -p $DATAPATH - if [ $? -eq 0 ]; then - tar -xf $DIR/../etc/conf.tar -C $DATAPATH - chmod -R a+rwx $DATAPATH - else - echo "Error: you don't have write permission to directory $DATAPATH" - echo "Deployment terminated." - exit 1 - fi - - -fi - - diff --git a/ric-infra/10-Nexus/bin/install b/ric-infra/10-Nexus/bin/install deleted file mode 100755 index cacb3a91..00000000 --- a/ric-infra/10-Nexus/bin/install +++ /dev/null @@ -1,89 +0,0 @@ -#!/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. # -################################################################################ - -OVERRIDEYAML=$1 - - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" -source $DIR/../etc/nexus.conf - -if [ -z "$RICINFRA_RELEASE_NAME" ];then - RELEASE_NAME=$helm_release_name -else - RELEASE_NAME=$RICINFRA_RELEASE_NAME -fi - -# Namespace configuration -if [ -z "$RICPLT_NAMESPACE" ];then - PLT_NAMESPACE=$plt_namespace -else - PLT_NAMESPACE=$RICPLT_NAMESPACE -fi -if [ -z "$RICXAPP_NAMESPACE" ];then - XAPP_NAMESPACE=$xapp_namespace -else - XAPP_NAMESPACE=$RICXAPP_NAMESPACE -fi -if [ -z "$RICAUX_NAMESPACE" ];then - AUX_NAMESPACE=$aux_namespace -else - AUX_NAMESPACE=$RICAUX_NAMESPACE -fi -if [ -z "$RICINFRA_NAMESPACE" ];then - INFRA_NAMESPACE=$infra_namespace -else - INFRA_NAMESPACE=$RICINFRA_NAMESPACE -fi - -if [ -z "$RIC_COMMON_OVERRIDE" ];then - COMMON_OVERRIDE="--set global.namespace.platform=$PLT_NAMESPACE --set global.namespace.xapp=$XAPP_NAMESPACE --set global.namespace.aux=$AUX_NAMESPACE --set global.namespace.infra=$INFRA_NAMESPACE" -else - COMMON_OVERRIDE=$RIC_COMMON_OVERRIDE -fi - -echo "Deploying nexus repo managers for local docker registry and helm repo." -echo "Helm Release: $RELEASE_NAME" - - - - -NODENAME=$(kubectl get node | awk 'NR==2{print $1}') -kubectl label --overwrite nodes $NODENAME nexus-node=enable - -. "$DIR/clear_nexus_data_path" - - - -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/ -mkdir -p /tmp/nexus3-data - -cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/charts/ - -if [ -z $OVERRIDEYAML ]; then -helm install --namespace $INFRA_NAMESPACE --name "${RELEASE_NAME}-nexus" $COMMON_OVERRIDE $DIR/../helm -else -helm install -f $OVERRIDEYAML --namespace $INFRA_NAMESPACE --name "${RELEASE_NAME}-nexus" $COMMON_OVERRIDE $DIR/../helm -fi - - - - diff --git a/ric-infra/10-Nexus/bin/uninstall b/ric-infra/10-Nexus/bin/uninstall deleted file mode 100755 index 0f965dee..00000000 --- a/ric-infra/10-Nexus/bin/uninstall +++ /dev/null @@ -1,36 +0,0 @@ -#!/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. # -################################################################################ - -OVERRIDEYAML=$1 - - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" -source $DIR/../etc/nexus.conf - -if [ -z "$RICINFRA_RELEASE_NAME" ];then - RELEASE_NAME=$helm_release_name -else - RELEASE_NAME=$RICINFRA_RELEASE_NAME -fi - - - - -echo "Undeploying nexus repo managers for local docker registry and helm repo." -echo "Helm Release: $RELEASE_NAME" -helm delete --purge "${RELEASE_NAME}-nexus" diff --git a/ric-infra/10-Nexus/docker/container-tag.yaml b/ric-infra/10-Nexus/docker/container-tag.yaml deleted file mode 100644 index 5721e22c..00000000 --- a/ric-infra/10-Nexus/docker/container-tag.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# The Jenkins job requires a tag to build the Docker image. -# Global-JJB script assumes this file is in the repo root. ---- -tag: 0.0.1 - diff --git a/ric-infra/10-Nexus/etc/nexus.conf b/ric-infra/10-Nexus/etc/nexus.conf deleted file mode 100644 index 038dbe76..00000000 --- a/ric-infra/10-Nexus/etc/nexus.conf +++ /dev/null @@ -1,40 +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. # -################################################################################ - - -# helm_release_name defines the release name helm will use to deploy RIC -# It will be overrided by RICPLT_RELEASE_NAME -helm_release_name=r1 - -# namespace defines the namespace that helm will use to deploy RIC -# It will be overrided by RICPLT_NAMESPACE -plt_namespace=ricplt - -# namespace defines the namespace that helm will use to deploy RIC -# It will be overrided by RICXAPP_NAMESPACE -xapp_namespace=ricxapp - -# namespace defines the namespace that helm will use to deploy RIC -# It will be overrided by RICAUX_NAMESPACE -aux_namespace=ricaux - -# namespace defines the namespace that helm will use to deploy RIC -# It will be overrided by RICINFRA_NAMESPACE -infra_namespace=ricinfra - - -default_admin_password=admin123 diff --git a/ric-infra/10-Nexus/helm/.helmignore b/ric-infra/10-Nexus/helm/.helmignore deleted file mode 100644 index f0c13194..00000000 --- a/ric-infra/10-Nexus/helm/.helmignore +++ /dev/null @@ -1,21 +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 diff --git a/ric-infra/10-Nexus/helm/nexus/Chart.yaml b/ric-infra/10-Nexus/helm/nexus/Chart.yaml deleted file mode 100644 index 0f3fb98e..00000000 --- a/ric-infra/10-Nexus/helm/nexus/Chart.yaml +++ /dev/null @@ -1,22 +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 -appVersion: "1.0" -description: RIC Aux Nexus Helm Chart -name: nexus -version: 1.1.0 diff --git a/ric-infra/10-Nexus/helm/nexus/requirements.yaml b/ric-infra/10-Nexus/helm/nexus/requirements.yaml deleted file mode 100644 index 2ab71b4e..00000000 --- a/ric-infra/10-Nexus/helm/nexus/requirements.yaml +++ /dev/null @@ -1,20 +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: ric-common - version: ~2.0.0 diff --git a/ric-infra/10-Nexus/helm/nexus/templates/_gen-cert.tpl b/ric-infra/10-Nexus/helm/nexus/templates/_gen-cert.tpl deleted file mode 100644 index c2755bbb..00000000 --- a/ric-infra/10-Nexus/helm/nexus/templates/_gen-cert.tpl +++ /dev/null @@ -1,44 +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. # -################################################################################i - -{{/* -Generate certificates for the docker registry -*/}} -{{- define "nexus.gen-docker-cert" -}} -{{- $altNames := list ( include "common.ingressurl.localdocker" . ) -}} -{{- $ca := genCA "docker-registry-ca" 365 -}} -{{- $cert := genSignedCert ( include "common.ingressurl.localdocker" . ) nil $altNames 365 $ca -}} -tls.crt: {{ $cert.Cert | b64enc }} -tls.key: {{ $cert.Key | b64enc }} -{{- end -}} - -{{- define "nexus.gen-helm-cert" -}} -{{- $altNames := list ( include "common.ingressurl.localhelm" . ) -}} -{{- $ca := genCA "docker-registry-ca" 365 -}} -{{- $cert := genSignedCert ( include "common.ingressurl.localhelm" . ) nil $altNames 365 $ca -}} -tls.crt: {{ $cert.Cert | b64enc }} -tls.key: {{ $cert.Key | b64enc }} -{{- end -}} - - -{{- define "nexus.gen-nexus-cert" -}} -{{- $altNames := list ( include "common.ingressurl.localnexus" . ) -}} -{{- $ca := genCA "docker-registry-ca" 365 -}} -{{- $cert := genSignedCert ( include "common.ingressurl.localnexus" . ) nil $altNames 365 $ca -}} -tls.crt: {{ $cert.Cert | b64enc }} -tls.key: {{ $cert.Key | b64enc }} -{{- end -}} diff --git a/ric-infra/10-Nexus/helm/nexus/templates/deployment.yaml b/ric-infra/10-Nexus/helm/nexus/templates/deployment.yaml deleted file mode 100644 index f76899f2..00000000 --- a/ric-infra/10-Nexus/helm/nexus/templates/deployment.yaml +++ /dev/null @@ -1,65 +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: apps/v1beta2 -kind: Deployment -metadata: - name: {{ include "common.deploymentname.nexus" .}} - labels: - app: {{ include "common.namespace" . }}-{{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.nexus.replicaCount }} - selector: - matchLabels: - app: {{ include "common.namespace" . }}-{{ include "common.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ include "common.namespace" . }}-{{ include "common.name" . }} - release: {{ .Release.Name }} - spec: - hostname: {{ .Chart.Name }} - imagePullSecrets: - - name: {{ include "common.repositoryCred" . }} - containers: - - name: {{ include "common.namespace" . }}-{{ include "common.name" . }} - image: {{ include "common.repository" . }}/{{ .Values.nexus.image.name }}:{{ .Values.nexus.image.tag }} - imagePullPolicy: {{ include "common.pullPolicy" . }} - # volumeMounts: - #- name: certs - # mountPath: /var/run/certs - # readOnly: true - ports: - - name: nexus - containerPort: {{ .Values.nexus.service.nexus.containerPort }} - #containerPort: 8081 - protocol: TCP - - name: docker - containerPort: {{ .Values.nexus.service.docker.containerPort }} - #containerPort: 10001 - protocol: TCP - volumeMounts: - - name: nexus-config - mountPath: /nexus-data - volumes: - - name: nexus-config - persistentVolumeClaim: - claimName: pvc-{{ include "common.name.nexus" . }} diff --git a/ric-infra/10-Nexus/helm/nexus/templates/docker-ingress.yaml b/ric-infra/10-Nexus/helm/nexus/templates/docker-ingress.yaml deleted file mode 100644 index eda06639..00000000 --- a/ric-infra/10-Nexus/helm/nexus/templates/docker-ingress.yaml +++ /dev/null @@ -1,32 +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: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ include "common.ingressname.nexus" . }}-docker -spec: - tls: - - hosts: - - {{ include "common.ingressurl.localdocker" . }} - secretName: secret-{{ include "common.name.nexus" . }}-docker - rules: - - host: {{ include "common.ingressurl.localdocker" . }} - http: - paths: - - backend: - serviceName: {{ include "common.servicename.nexus.http" . }} - servicePort: docker diff --git a/ric-infra/10-Nexus/helm/nexus/templates/helm-ingress.yaml b/ric-infra/10-Nexus/helm/nexus/templates/helm-ingress.yaml deleted file mode 100644 index 22e19380..00000000 --- a/ric-infra/10-Nexus/helm/nexus/templates/helm-ingress.yaml +++ /dev/null @@ -1,35 +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: extensions/v1beta1 -kind: Ingress -metadata: - annotations: - nginx.ingress.kubernetes.io/rewrite-target: /repository/helm.local/ - name: {{ include "common.ingressname.nexus" . }}-helm -spec: - tls: - - hosts: - - {{ include "common.ingressurl.localhelm" . }} - secretName: secret-{{ include "common.name.nexus" . }}-helm - rules: - - host: {{ include "common.ingressurl.localhelm" . }} - http: - paths: - - backend: - serviceName: {{ include "common.servicename.nexus.http" . }} - servicePort: helm - path: / diff --git a/ric-infra/10-Nexus/helm/nexus/templates/job-save-certs.yaml b/ric-infra/10-Nexus/helm/nexus/templates/job-save-certs.yaml deleted file mode 100644 index 91f72efe..00000000 --- a/ric-infra/10-Nexus/helm/nexus/templates/job-save-certs.yaml +++ /dev/null @@ -1,56 +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: batch/v1 -kind: Job -metadata: - name: job-{{ include "common.fullname.nexus" . }}-save-certs -spec: - template: - spec: - containers: - - name: cert-copy - image: alpine - command: [ "/bin/sh","-c","cp -rL /var/run/dockercerts/..data/tls.crt /var/run/certs-copy/dockertls.crt && cp -rL /var/run/helmcerts/..data/tls.crt /var/run/certs-copy/helmtls.crt && cp -rL /var/run/nexuscerts/..data/tls.crt /var/run/certs-copy/nexustls.crt"] - # command: ["tail", "-f", "/dev/null"] - volumeMounts: - - name: dockercerts - mountPath: /var/run/dockercerts - readOnly: true - - name: helmcerts - mountPath: /var/run/helmcerts - readOnly: true - - name: nexuscerts - mountPath: /var/run/nexuscerts - readOnly: true - - name: write-to-volume - mountPath: /var/run/certs-copy - volumes: - - name: dockercerts - secret: - secretName: secret-{{ include "common.name.nexus" . }}-docker - - name: helmcerts - secret: - secretName: secret-{{ include "common.name.nexus" . }}-helm - - name: nexuscerts - secret: - secretName: secret-{{ include "common.name.nexus" . }}-nexus - - name: write-to-volume - hostPath: - path: /tmp - restartPolicy: Never - backoffLimit: 4 diff --git a/ric-infra/10-Nexus/helm/nexus/templates/nexus-ingress.yaml b/ric-infra/10-Nexus/helm/nexus/templates/nexus-ingress.yaml deleted file mode 100644 index b109c068..00000000 --- a/ric-infra/10-Nexus/helm/nexus/templates/nexus-ingress.yaml +++ /dev/null @@ -1,32 +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: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ include "common.ingressname.nexus" . }}-nexus -spec: - tls: - - hosts: - - {{ include "common.ingressurl.localnexus" . }} - secretName: secret-{{ include "common.name.nexus" . }}-nexus - rules: - - host: {{ include "common.ingressurl.localnexus" . }} - http: - paths: - - backend: - serviceName: {{ include "common.servicename.nexus.http" . }} - servicePort: nexus diff --git a/ric-infra/10-Nexus/helm/nexus/templates/persistentVolume.yaml b/ric-infra/10-Nexus/helm/nexus/templates/persistentVolume.yaml deleted file mode 100644 index 08861a74..00000000 --- a/ric-infra/10-Nexus/helm/nexus/templates/persistentVolume.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: PersistentVolume -metadata: - name: pv-{{ include "common.name.nexus" . }} -spec: - capacity: - storage: {{ .Values.nexus.storagesize }} - accessModes: - - ReadWriteOnce - persistentVolumeReclaimPolicy: Retain - storageClassName: storageclass-{{ include "common.name.nexus" . }} - local: - path: {{ .Values.nexus.datapath }} - nodeAffinity: - required: - nodeSelectorTerms: - - matchExpressions: - - key: nexus-node - operator: In - values: - - enable diff --git a/ric-infra/10-Nexus/helm/nexus/templates/persistentVolumeClaim.yaml b/ric-infra/10-Nexus/helm/nexus/templates/persistentVolumeClaim.yaml deleted file mode 100644 index 0133e09f..00000000 --- a/ric-infra/10-Nexus/helm/nexus/templates/persistentVolumeClaim.yaml +++ /dev/null @@ -1,11 +0,0 @@ -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: pvc-{{ include "common.name.nexus" . }} -spec: - accessModes: - - ReadWriteOnce - storageClassName: storageclass-{{ include "common.name.nexus" . }} - resources: - requests: - storage: {{ .Values.nexus.storagesize }} diff --git a/ric-infra/10-Nexus/helm/nexus/templates/secret-docker.yaml b/ric-infra/10-Nexus/helm/nexus/templates/secret-docker.yaml deleted file mode 100644 index 0dec66ca..00000000 --- a/ric-infra/10-Nexus/helm/nexus/templates/secret-docker.yaml +++ /dev/null @@ -1,27 +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: Secret -type: kubernetes.io/tls -metadata: - name: secret-{{ include "common.name.nexus" . }}-docker - annotations: - "helm.sh/hook": "pre-install" - "helm.sh/hook-delete-policy": "before-hook-creation" -data: -{{ ( include "nexus.gen-docker-cert" . ) | indent 2 }} diff --git a/ric-infra/10-Nexus/helm/nexus/templates/secret-helm.yaml b/ric-infra/10-Nexus/helm/nexus/templates/secret-helm.yaml deleted file mode 100644 index ce7bec62..00000000 --- a/ric-infra/10-Nexus/helm/nexus/templates/secret-helm.yaml +++ /dev/null @@ -1,27 +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: Secret -type: kubernetes.io/tls -metadata: - name: secret-{{ include "common.name.nexus" . }}-helm - annotations: - "helm.sh/hook": "pre-install" - "helm.sh/hook-delete-policy": "before-hook-creation" -data: -{{ ( include "nexus.gen-helm-cert" . ) | indent 2 }} diff --git a/ric-infra/10-Nexus/helm/nexus/templates/secret-nexus.yaml b/ric-infra/10-Nexus/helm/nexus/templates/secret-nexus.yaml deleted file mode 100644 index 680e1235..00000000 --- a/ric-infra/10-Nexus/helm/nexus/templates/secret-nexus.yaml +++ /dev/null @@ -1,27 +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: Secret -type: kubernetes.io/tls -metadata: - name: secret-{{ include "common.name.nexus" . }}-nexus - annotations: - "helm.sh/hook": "pre-install" - "helm.sh/hook-delete-policy": "before-hook-creation" -data: -{{ ( include "nexus.gen-nexus-cert" . ) | indent 2 }} diff --git a/ric-infra/10-Nexus/helm/nexus/templates/service.yaml b/ric-infra/10-Nexus/helm/nexus/templates/service.yaml deleted file mode 100644 index 75afbb94..00000000 --- a/ric-infra/10-Nexus/helm/nexus/templates/service.yaml +++ /dev/null @@ -1,41 +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.nexus.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.nexus.service.nexus.port }} - targetPort: nexus - protocol: TCP - name: nexus - - port: {{ .Values.nexus.service.docker.port }} - targetPort: docker - protocol: TCP - name: docker - selector: - app: {{ include "common.namespace" . }}-{{ include "common.name" . }} - release: {{ .Release.Name }} diff --git a/ric-infra/10-Nexus/helm/nexus/templates/storageClass.yaml b/ric-infra/10-Nexus/helm/nexus/templates/storageClass.yaml deleted file mode 100644 index 7a5b988d..00000000 --- a/ric-infra/10-Nexus/helm/nexus/templates/storageClass.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: StorageClass -apiVersion: storage.k8s.io/v1 -metadata: - name: storageclass-{{ include "common.name.nexus" . }} -provisioner: kubernetes.io/no-provisioner -volumeBindingMode: WaitForFirstConsumer diff --git a/ric-infra/10-Nexus/helm/nexus/values.yaml b/ric-infra/10-Nexus/helm/nexus/values.yaml deleted file mode 100644 index 91ba957c..00000000 --- a/ric-infra/10-Nexus/helm/nexus/values.yaml +++ /dev/null @@ -1,47 +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. # -################################################################################ - -# Default values for nexus. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -repository: "nexus3.o-ran-sc.org:10004" -imagePullPolicy: IfNotPresent -repositoryCred: docker-reg-cred -helmRepositoryCert: xapp-mgr-certs - -nexus: - replicaCount: 1 - - # This is the admin password - adminPassword: admin123 - -# This is designed to be deployed using local image - image: - name: nexus-repository-helm-apt - tag: 1.0.0 - - service: - nexus: - port: 80 - containerPort: 8081 - docker: - port: 10001 - containerPort: 10001 - - - storagesize: 20Gi - datapath: /tmp/nexus3-data/ diff --git a/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/_gen-cert.tpl b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/_gen-cert.tpl index 9dcbdb94..fa34a0a7 100644 --- a/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/_gen-cert.tpl +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/_gen-cert.tpl @@ -20,9 +20,9 @@ Generate certificates for the docker registry */}} {{- define "chartmuseum.gen-cert" -}} -{{- $altNames := list ( include "common.ingressurl.localhelm" . ) -}} +{{- $altNames := list ( include "common.ingressurl.helm" . ) -}} {{- $ca := genCA "docker-registry-ca" 365 -}} -{{- $cert := genSignedCert ( include "common.ingressurl.localhelm" . ) nil $altNames 365 $ca -}} +{{- $cert := genSignedCert ( include "common.ingressurl.helm" . ) nil $altNames 365 $ca -}} tls.crt: {{ $cert.Cert | b64enc }} tls.key: {{ $cert.Key | b64enc }} {{- end -}} diff --git a/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/ingress.yaml b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/ingress.yaml index 8ecd7e19..1a4876bc 100644 --- a/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/ingress.yaml +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/ingress.yaml @@ -21,10 +21,10 @@ metadata: spec: tls: - hosts: - - {{ include "common.ingressurl.localhelm" . }} + - {{ include "common.ingressurl.helm" . }} secretName: secret-{{ include "common.name.chartmuseum" . }} rules: - - host: {{ include "common.ingressurl.localhelm" . }} + - host: {{ include "common.ingressurl.helm" . }} http: paths: - backend: diff --git a/ric-platform/50-RIC-Platform/bin/install b/ric-platform/50-RIC-Platform/bin/install index fde899c6..4632ec00 100755 --- a/ric-platform/50-RIC-Platform/bin/install +++ b/ric-platform/50-RIC-Platform/bin/install @@ -60,7 +60,7 @@ else fi -RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator kong-platform kong-xapp submgr" +RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator submgr kong" echo "Deploying RIC Platform components [$RICPLT_COMPONENTS]" echo "Helm Release Name: $RELEASE_NAME" @@ -68,7 +68,6 @@ echo "Helm Release Name: $RELEASE_NAME" 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/../../../ric-common/Common-Template/helm/ric-common @@ -76,20 +75,6 @@ helm package -d /tmp $DIR/../../../ric-common/Common-Template/helm/ric-common for component in $RICPLT_COMPONENTS; do echo "Preparing chart for comonent $component" - if [ $component = "kong-platform" ]; then - mkdir -p $DIR/../helm/$component/charts - helm dep up $DIR/../helm/$component - helm install --namespace $PLT_NAMESPACE --name "${RELEASE_NAME}-$component" $DIR/../helm/$component --set postgresql.enabled=false --set env.database=off - continue - fi - - if [ $component = "kong-xapp" ]; then - mkdir -p $DIR/../helm/$component/charts - helm dep up $DIR/../helm/$component - helm install --namespace $XAPP_NAMESPACE --name "${RELEASE_NAME}-$component" $DIR/../helm/$component --set postgresql.enabled=false --set env.database=off - continue - fi - mkdir -p $DIR/../helm/$component/charts/ cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/$component/charts/ diff --git a/ric-platform/50-RIC-Platform/bin/uninstall b/ric-platform/50-RIC-Platform/bin/uninstall index 153e350b..38f48f52 100755 --- a/ric-platform/50-RIC-Platform/bin/uninstall +++ b/ric-platform/50-RIC-Platform/bin/uninstall @@ -30,7 +30,7 @@ else RELEASE_NAME=$RICPLT_RELEASE_NAME fi -RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator kong-platform kong-xapp submgr" +RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator submgr kong" echo "Undeploying RIC Platform components [$RICPLT_COMPONENTS]" diff --git a/ric-platform/50-RIC-Platform/helm/kong-platform/Chart.yaml b/ric-platform/50-RIC-Platform/helm/kong-platform/Chart.yaml deleted file mode 100644 index f00a2cdc..00000000 --- a/ric-platform/50-RIC-Platform/helm/kong-platform/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: kong-platform -version: 1.0.0 diff --git a/ric-platform/50-RIC-Platform/helm/kong-platform/requirements.lock b/ric-platform/50-RIC-Platform/helm/kong-platform/requirements.lock deleted file mode 100644 index 925f1563..00000000 --- a/ric-platform/50-RIC-Platform/helm/kong-platform/requirements.lock +++ /dev/null @@ -1,6 +0,0 @@ -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-platform/values.yaml b/ric-platform/50-RIC-Platform/helm/kong-platform/values.yaml deleted file mode 100644 index cd658c4b..00000000 --- a/ric-platform/50-RIC-Platform/helm/kong-platform/values.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# Default values for kong_platform. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -kong: - ingressController: - enabled: true - - postgresql: - enabled: false - - env: - database: "off" - - proxy: - http: - nodePort: 30180 - tls: - nodePort: 30543 - # These port numbers MUST matche with what's in - # ric-common/Common-Template/helm/ric-common/templates/_ingresscontroller.tpl file. - # If need to change a proxy port here, do not forget to update the - # _ingresscontroller.tpl file with the new port number. diff --git a/ric-platform/50-RIC-Platform/helm/kong-xapp/.helmignore b/ric-platform/50-RIC-Platform/helm/kong-xapp/.helmignore deleted file mode 100644 index 50af0317..00000000 --- a/ric-platform/50-RIC-Platform/helm/kong-xapp/.helmignore +++ /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/kong-xapp/requirements.lock b/ric-platform/50-RIC-Platform/helm/kong-xapp/requirements.lock deleted file mode 100644 index 38ebd052..00000000 --- a/ric-platform/50-RIC-Platform/helm/kong-xapp/requirements.lock +++ /dev/null @@ -1,6 +0,0 @@ -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/kong-xapp/requirements.yaml b/ric-platform/50-RIC-Platform/helm/kong-xapp/requirements.yaml deleted file mode 100644 index 2587ea7e..00000000 --- a/ric-platform/50-RIC-Platform/helm/kong-xapp/requirements.yaml +++ /dev/null @@ -1,21 +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: kong - repository: '@stable' - version: ~0.12.2 \ No newline at end of file diff --git a/ric-platform/50-RIC-Platform/helm/kong-platform/.helmignore b/ric-platform/50-RIC-Platform/helm/kong/.helmignore similarity index 100% rename from ric-platform/50-RIC-Platform/helm/kong-platform/.helmignore rename to ric-platform/50-RIC-Platform/helm/kong/.helmignore diff --git a/ric-platform/50-RIC-Platform/helm/kong-xapp/Chart.yaml b/ric-platform/50-RIC-Platform/helm/kong/Chart.yaml similarity index 84% rename from ric-platform/50-RIC-Platform/helm/kong-xapp/Chart.yaml rename to ric-platform/50-RIC-Platform/helm/kong/Chart.yaml index 15b32a09..592e8008 100644 --- a/ric-platform/50-RIC-Platform/helm/kong-xapp/Chart.yaml +++ b/ric-platform/50-RIC-Platform/helm/kong/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart for Kubernetes -name: kong-xapp +name: kong version: 1.0.0 diff --git a/ric-platform/50-RIC-Platform/helm/kong-platform/requirements.yaml b/ric-platform/50-RIC-Platform/helm/kong/requirements.yaml similarity index 100% rename from ric-platform/50-RIC-Platform/helm/kong-platform/requirements.yaml rename to ric-platform/50-RIC-Platform/helm/kong/requirements.yaml diff --git a/ric-aux/80-Auxiliary-Functions/helm/kong-aux/values.yaml b/ric-platform/50-RIC-Platform/helm/kong/values.yaml similarity index 84% rename from ric-aux/80-Auxiliary-Functions/helm/kong-aux/values.yaml rename to ric-platform/50-RIC-Platform/helm/kong/values.yaml index 02d97197..25469ebb 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/kong-aux/values.yaml +++ b/ric-platform/50-RIC-Platform/helm/kong/values.yaml @@ -14,11 +14,17 @@ kong: proxy: http: - nodePort: 32080 + nodePort: 31080 tls: - nodePort: 32443 + nodePort: 31443 # These port numbers MUST matche with what's in # ric-common/Common-Template/helm/ric-common/templates/_ingresscontroller.tpl file. # If need to change a proxy port here, do not forget to update the # _ingresscontroller.tpl file with the new port number. + +postgresql: + enabled: false + +env: + database: off diff --git a/ric-platform/55-Ext-Services/bin/install b/ric-platform/55-Ext-Services/bin/install index cf5a6db4..e6fd714f 100755 --- a/ric-platform/55-Ext-Services/bin/install +++ b/ric-platform/55-Ext-Services/bin/install @@ -71,6 +71,8 @@ helm package -d /tmp $DIR/../../../ric-common/Common-Template/helm/ric-common for component in $RICPLT_COMPONENTS; do echo "Preparing chart for comonent $component" + + mkdir -p $DIR/../helm/$component/charts/ cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/$component/charts/ if [ -z $OVERRIDEYAML ]; then diff --git a/ric-platform/55-Ext-Services/helm/extsvcplt/templates/services-aux.yaml b/ric-platform/55-Ext-Services/helm/extsvcplt/templates/services-aux.yaml index 13313e4b..0605a749 100644 --- a/ric-platform/55-Ext-Services/helm/extsvcplt/templates/services-aux.yaml +++ b/ric-platform/55-Ext-Services/helm/extsvcplt/templates/services-aux.yaml @@ -14,47 +14,22 @@ # See the License for the specific language governing permissions and # # limitations under the License. # ################################################################################ - -kind: "Service" -apiVersion: "v1" -metadata: - name: {{ include "common.ingressurl.ricaux" . }} - namespace: {{ include "common.namespace" . }} -spec: - ports: - - name: {{ include "common.ingressurl.ricaux" . }}-http-ingress-port - protocol: "TCP" - port: 80 - - name: {{ include "common.ingressurl.ricaux" . }}-https-ingress-port - protocol: "TCP" - port: 443 ---- -kind: "Endpoints" -apiVersion: "v1" -metadata: - # match with the selector-less service - name: {{ include "common.ingressurl.ricaux" . }} - namespace: {{ include "common.namespace" . }} -subsets: - - addresses: - - ip: "{{ .Values.extsvcplt.auxip }}" - ports: - - port: {{ include "common.ingresshttpport.ricaux" . }} - name: {{ include "common.ingressurl.ricaux" . }}-http-ingress-port - - port: {{ include "common.ingresshttpsport.ricaux" . }} - name: {{ include "common.ingressurl.ricaux" . }}-https-ingress-port +{{ $platformNameSpace := include "common.namespace.platform" . }} +{{ $xAppNameSpace := include "common.namespace.xapp" . }} +{{ $nameSpaceList := list $platformNameSpace $xAppNameSpace }} +{{- range $nameSpaceList }} --- kind: "Service" apiVersion: "v1" metadata: - name: {{ include "common.ingressurl.ricinfra" . }} - namespace: {{ include "common.namespace" . }} + name: {{ include "common.ingressurl.aux" $ }} + namespace: {{ . }} spec: ports: - - name: {{ include "common.ingressurl.ricinfra" . }}-http-ingress-port + - name: {{ include "common.ingressurl.aux" $ }}-http-ingress-port protocol: "TCP" port: 80 - - name: {{ include "common.ingressurl.ricinfra" . }}-https-ingress-port + - name: {{ include "common.ingressurl.aux" $ }}-https-ingress-port protocol: "TCP" port: 443 --- @@ -62,13 +37,14 @@ kind: "Endpoints" apiVersion: "v1" metadata: # match with the selector-less service - name: {{ include "common.ingressurl.ricinfra" . }} - namespace: {{ include "common.namespace" . }} + name: {{ include "common.ingressurl.aux" $ }} + namespace: {{ . }} subsets: - addresses: - - ip: "{{ .Values.extsvcplt.auxip }}" + - ip: "{{ $.Values.extsvcplt.auxip }}" ports: - - port: {{ include "common.ingresshttpport.ricinfra" . }} - name: {{ include "common.ingressurl.ricinfra" . }}-http-ingress-port - - port: {{ include "common.ingresshttpsport.ricinfra" . }} - name: {{ include "common.ingressurl.ricinfra" . }}-https-ingress-port + - port: {{ include "common.ingresshttpport.aux" $ }} + name: {{ include "common.ingressurl.aux" $ }}-http-ingress-port + - port: {{ include "common.ingresshttpsport.aux" $ }} + name: {{ include "common.ingressurl.aux" $ }}-https-ingress-port +{{- end -}} diff --git a/ric-platform/55-Ext-Services/helm/extsvcplt/templates/services-docker.yaml b/ric-platform/55-Ext-Services/helm/extsvcplt/templates/services-docker.yaml deleted file mode 100644 index d8900641..00000000 --- a/ric-platform/55-Ext-Services/helm/extsvcplt/templates/services-docker.yaml +++ /dev/null @@ -1,45 +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. # -################################################################################ - -kind: "Service" -apiVersion: "v1" -metadata: - name: {{ include "common.ingressurl.localdocker" . }} - namespace: {{ include "common.namespace" . }} -spec: - ports: - - name: {{ include "common.ingressurl.localdocker" . }}-http-ingress-port - protocol: "TCP" - port: 80 - - name: {{ include "common.ingressurl.localdocker" . }}-https-ingress-port - protocol: "TCP" - port: 443 ---- -kind: "Endpoints" -apiVersion: "v1" -metadata: - # match with the selector-less service - name: {{ include "common.ingressurl.localdocker" . }} - namespace: {{ include "common.namespace" . }} -subsets: - - addresses: - - ip: "{{ .Values.extsvcplt.auxip }}" - ports: - - port: {{ include "common.ingresshttpport.ricinfra" . }} - name: {{ include "common.ingressurl.localdocker" . }}-http-ingress-port - - port: {{ include "common.ingresshttpsport.ricinfra" . }} - name: {{ include "common.ingressurl.localdocker" . }}-https-ingress-port diff --git a/ric-platform/55-Ext-Services/helm/extsvcplt/templates/services-helm.yaml b/ric-platform/55-Ext-Services/helm/extsvcplt/templates/services-helm.yaml index f05f3c37..99a44c12 100644 --- a/ric-platform/55-Ext-Services/helm/extsvcplt/templates/services-helm.yaml +++ b/ric-platform/55-Ext-Services/helm/extsvcplt/templates/services-helm.yaml @@ -14,18 +14,23 @@ # See the License for the specific language governing permissions and # # limitations under the License. # ################################################################################ +{{ $platformNameSpace := include "common.namespace.platform" . }} +{{ $xAppNameSpace := include "common.namespace.xapp" . }} +{{ $nameSpaceList := list $platformNameSpace $xAppNameSpace }} +{{- range $nameSpaceList }} +--- kind: "Service" apiVersion: "v1" metadata: - name: {{ include "common.ingressurl.localhelm" . }} - namespace: {{ include "common.namespace" . }} + name: {{ include "common.ingressurl.helm" $ }} + namespace: {{ . }} spec: ports: - - name: {{ include "common.ingressurl.localhelm" . }}-http-ingress-port + - name: {{ include "common.ingressurl.helm" $ }}-http-ingress-port protocol: "TCP" port: 80 - - name: {{ include "common.ingressurl.localhelm" . }}-https-ingress-port + - name: {{ include "common.ingressurl.helm" $ }}-https-ingress-port protocol: "TCP" port: 443 --- @@ -33,13 +38,15 @@ kind: "Endpoints" apiVersion: "v1" metadata: # match with the selector-less service - name: {{ include "common.ingressurl.localhelm" . }} - namespace: {{ include "common.namespace" . }} + name: {{ include "common.ingressurl.helm" $ }} + namespace: {{ . }} subsets: - addresses: - - ip: "{{ .Values.extsvcplt.auxip }}" + - ip: "{{ $.Values.extsvcplt.auxip }}" ports: - - port: {{ include "common.ingresshttpport.ricinfra" . }} - name: {{ include "common.ingressurl.localhelm" . }}-http-ingress-port - - port: {{ include "common.ingresshttpsport.ricinfra" . }} - name: {{ include "common.ingressurl.localhelm" . }}-https-ingress-port + - port: {{ include "common.ingresshttpport.aux" $ }} + name: {{ include "common.ingressurl.helm" $ }}-http-ingress-port + - port: {{ include "common.ingresshttpsport.aux" $ }} + name: {{ include "common.ingressurl.helm" $ }}-https-ingress-port + +{{- end -}}