# 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:
# 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:
# 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:
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"
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/
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
{{- 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 -}}
{{- 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 -}}
{{- 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 -}}
{{- 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 -}}
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
-name: kong-aux
+name: kong
version: 1.0.0
kong:
ingressController:
enabled: true
- installCRDs: false
postgresql:
enabled: false
# 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
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
readinessProbe:
httpGet:
path: "/healthcheck"
- port: {{ include "common.serviceport.ves.http.container" . }}
+ port: {{ include "common.serviceport.ves.http" . }}
scheme: HTTP
initialDelaySeconds: 5
timeoutSeconds: 1
failureThreshold: 1
terminationMessagePath: "/dev/termination-log"
terminationMessagePolicy: File
- restartPolicy: Always
\ No newline at end of file
+ restartPolicy: Always
ports:\r
- name: http\r
protocol: TCP\r
- port: {{ include "common.serviceport.ves.http.container" . }}\r
- targetPort: {{ include "common.serviceport.ves.http.container" . }}\r
- nodePort: {{ include "common.serviceport.ves.http" . }}\r
+ port: {{ include "common.serviceport.ves.http" . }}\r
+ targetPort: {{ include "common.serviceport.ves.http" . }}\r
- name: https\r
protocol: TCP\r
- port: {{ include "common.serviceport.ves.https.container" . }}\r
- targetPort: {{ include "common.serviceport.ves.https.container" . }}\r
- nodePort: {{ include "common.serviceport.ves.https" . }}\r
+ port: {{ include "common.serviceport.ves.https" . }}\r
+ targetPort: {{ include "common.serviceport.ves.https" . }}\r
selector:\r
app: {{ include "common.namespace.aux" . }}-{{ include "common.name.ves" . }}\r
release: {{ .Release.Name }}\r
- type: NodePort
\ No newline at end of file
+ type: ClusterIP\r
+++ /dev/null
-################################################################################
-# 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
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
---
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
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
---
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
+++ /dev/null
-################################################################################
-# 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
*/}}
####################### 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 -}}
{{- 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 -}}
-
-
## 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 -}}
-
{{- 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 -}}
+++ /dev/null
-#!/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
-
+++ /dev/null
-#!/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
-
+++ /dev/null
-#!/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
-
-
+++ /dev/null
-#!/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
-
-
-
-
+++ /dev/null
-#!/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"
+++ /dev/null
-# 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
-
+++ /dev/null
-################################################################################
-# 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
+++ /dev/null
-# 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
+++ /dev/null
-################################################################################
-# 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
+++ /dev/null
-################################################################################
-# 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
+++ /dev/null
-################################################################################
-# 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 -}}
+++ /dev/null
-################################################################################
-# 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" . }}
+++ /dev/null
-################################################################################
-# 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
+++ /dev/null
-################################################################################
-# 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: /
+++ /dev/null
-################################################################################
-# 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
+++ /dev/null
-################################################################################
-# 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
+++ /dev/null
-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
+++ /dev/null
-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 }}
+++ /dev/null
-################################################################################
-# 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 }}
+++ /dev/null
-################################################################################
-# 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 }}
+++ /dev/null
-################################################################################
-# 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 }}
+++ /dev/null
-################################################################################
-# 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 }}
+++ /dev/null
-kind: StorageClass
-apiVersion: storage.k8s.io/v1
-metadata:
- name: storageclass-{{ include "common.name.nexus" . }}
-provisioner: kubernetes.io/no-provisioner
-volumeBindingMode: WaitForFirstConsumer
+++ /dev/null
-################################################################################
-# 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/
*/}}
{{- 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 -}}
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:
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"
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
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/
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]"
+++ /dev/null
-apiVersion: v1
-appVersion: "1.0"
-description: A Helm chart for Kubernetes
-name: kong-platform
-version: 1.0.0
+++ /dev/null
-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
+++ /dev/null
-# 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.
+++ /dev/null
-# 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/
+++ /dev/null
-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
+++ /dev/null
-################################################################################
-# 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
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
-name: kong-xapp
+name: kong
version: 1.0.0
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
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
# 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
---
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 -}}
+++ /dev/null
-################################################################################
-# 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
# 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
---
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 -}}