--- /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.ext.ip }}"
+ 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
--- /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.localhelm" . }}
+ namespace: {{ include "common.namespace" . }}
+spec:
+ ports:
+ - name: {{ include "common.ingressurl.localhelm" . }}-http-ingress-port
+ protocol: "TCP"
+ port: 80
+ - name: {{ include "common.ingressurl.localhelm" . }}-https-ingress-port
+ protocol: "TCP"
+ port: 443
+---
+kind: "Endpoints"
+apiVersion: "v1"
+metadata:
+ # match with the selector-less service
+ name: {{ include "common.ingressurl.localhelm" . }}
+ namespace: {{ include "common.namespace" . }}
+subsets:
+ - addresses:
+ - ip: "{{ .Values.ext.ip }}"
+ 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
name: {{ include "common.ingressurl.ricplt" . }}-http-ingress-port
- port: {{ include "common.ingresshttpsport.ricplt" . }}
name: {{ include "common.ingressurl.ricplt" . }}-https-ingress-port
----
-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.ext.ip }}"
- 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
\ No newline at end of file
--- /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.ext.ip }}"
+ 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
--- /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
+
else
NAMESPACE=$RICINFRA_NAMESPACE
fi
-if [ -z "$INGRESS_PORT" ];then
- INGRESS_PORT_NEXUS=$ingress_port
-else
- INGRESS_PORT_NEXUS=$INGRESS_PORT
-fi
echo "Name Space: $NAMESPACE"
echo "Helm Release: $RELEASE_NAME"
-HOSTPOSTFIX=$(cat $DIR/../helm/values.yaml | grep hostpostfix | awk '{print $2}')
-
-
-echo "****************************************************************************************************************"
-echo " WARNING "
-echo "****************************************************************************************************************"
-
-echo "Nexus is deployed using default admin password. It is not for production deployment."
-echo "If you want to secure the repositories, you should change the admin password immediately."
-echo "You can access this nexus here: http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS"
-echo "If nexus.$HOSTPOSTFIX is not resolved by your DNS server, please add an entry in your /etc/hosts file."
-echo "****************************************************************************************************************"
-
-. ./deploy_nexus_data $OVERRIDEYAML
NODENAME=$(kubectl get node | awk 'NR==2{print $1}')
kubectl label --overwrite nodes $NODENAME nexus-node=enable
+. ./clear_nexus_data_path
-
-
-COMMON_CHART_VERSION=$(cat $DIR/../../../ric-platform/50-RIC-Platform/helm/common/Chart.yaml | grep version | awk '{print $2}')
-helm package -d /tmp $DIR/../../../ric-platform/50-RIC-Platform/helm/common
+COMMON_CHART_VERSION=$(cat $DIR/../../../ric-common/Common-Template/helm/ric-common/Chart.yaml | grep version | awk '{print $2}')
+helm package -d /tmp $DIR/../../../ric-common/Common-Template/helm/ric-common
mkdir -p $DIR/../helm/charts/
-cp /tmp/common-$COMMON_CHART_VERSION.tgz $DIR/../helm/charts/
+cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/charts/
if [ -z $OVERRIDEYAML ]; then
helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-nexus" $DIR/../helm
-NEXUS_POD_NAME=$(kubectl get pod -n $NAMESPACE | grep nexus | grep -v "Terminating" | awk '{print $1}')
-
-
-echo "Waiting Nexus to be ready."
-echo " "
-
-sleep 10
-
-IS_NEXUS_READY=$(kubectl logs -n $NAMESPACE $NEXUS_POD_NAME | grep "Started Sonatype Nexus OSS")
-
-COUNTER=1
-while [[ -z $IS_NEXUS_READY ]]; do
- echo -e "\033[2AWaiting Nexus to be ready."
- echo -e "\033[2K"
- PROGRESS=$(printf "%0.s-" $(seq 1 $COUNTER))
- echo -e "\033[1A$PROGRESS"
-
-
- COUNTER=$((COUNTER+1))
- if [ $COUNTER -gt 5 ]; then
- COUNTER=1
- fi
-
- IS_NEXUS_READY=$(kubectl logs -n $NAMESPACE $NEXUS_POD_NAME | grep "Started Sonatype Nexus OSS")
-
- sleep 5
-done
-
-echo $IS_NEXUS_READY
-
-
-. ./change_password $OVERRIDEYAML
-
-
# namespace defines the namespace that helm will use to deploy nexus
# It will be overrided by RICINFRA_NAMESPACE
-namespace=ric-infra
-
-# ingress port number of the K8S cluster
-# It will be overrided by INGRESS_PORT
-ingress_port=30000
+namespace=ricinfra
default_admin_password=admin123
# 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
-{{/* vim: set filetype=mustache: */}}
{{/*
-Expand the name of the chart.
+Generate certificates for the docker registry
*/}}
-{{- define "ext.name" -}}
-{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- 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 -}}
-{{/*
-Create a default fully qualified app name.
-We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec)
-.
-If release name contains chart name it will be used as a full name.
-*/}}
-{{- define "ext.fullname" -}}
-{{- if .Values.fullnameOverride -}}
-{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- $name := default .Chart.Name .Values.nameOverride -}}
-{{- if contains $name .Release.Name -}}
-{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-{{- end -}}
+{{- 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 -}}
-{{/*
-Create chart name and version as used by the chart label.
-*/}}
-{{- define "ext.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
-{{- 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. #
-################################################################################
-
-{{/* vim: set filetype=mustache: */}}
-{{/*
-Expand the name of the chart.
-*/}}
-{{- define "nexus.name" -}}
-{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-
-{{/*
-Create a default fully qualified app name.
-We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
-If release name contains chart name it will be used as a full name.
-*/}}
-{{- define "nexus.fullname" -}}
-{{- if .Values.fullnameOverride -}}
-{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- $name := default .Chart.Name .Values.nameOverride -}}
-{{- if contains $name .Release.Name -}}
-{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-{{- end -}}
-{{- end -}}
-
-{{/*
-Create chart name and version as used by the chart label.
-*/}}
-{{- define "nexus.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
apiVersion: apps/v1beta2
kind: Deployment
metadata:
- name: {{ template "nexus.fullname" . }}
+ name: {{ include "common.deploymentname.nexus" .}}
labels:
- app: {{ template "nexus.name" . }}
- chart: {{ template "nexus.chart" . }}
+ app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
- replicas: {{ .Values.replicaCount }}
+ replicas: {{ .Values.nexus.replicaCount }}
selector:
matchLabels:
- app: {{ template "nexus.name" . }}
+ app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
- app: {{ template "nexus.name" . }}
+ app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
release: {{ .Release.Name }}
spec:
+ hostname: {{ .Chart.Name }}
+ imagePullSecrets:
+ - name: {{ include "common.repositoryCred" . }}
containers:
- - name: {{ .Chart.Name }}
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
- imagePullPolicy: {{ .Values.image.pullPolicy }}
+ - 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: 8081
+ containerPort: {{ .Values.nexus.service.nexus.containerPort }}
+ #containerPort: 8081
protocol: TCP
- name: docker
- containerPort: 10001
+ containerPort: {{ .Values.nexus.service.docker.containerPort }}
+ #containerPort: 10001
protocol: TCP
volumeMounts:
- name: nexus-config
volumes:
- name: nexus-config
persistentVolumeClaim:
- claimName: nexus-claim
-
-
- # livenessProbe:
- # httpGet:
- # path: /
- # port: nexus
-# readinessProbe:
-# httpGet:
-# path: /
-# port: http
-# volumes:
-# - name: certs
-# secret:
-# secretName: {{ template "nexus.name" . }}-certs
+ claimName: pvc-{{ include "common.name.nexus" . }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
- name: {{ include "nexus.fullname" . }}
- labels:
- app: {{ template "nexus.name" . }}
- chart: {{ template "nexus.chart" . }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
+ name: {{ include "common.ingressname.nexus" . }}-docker
spec:
tls:
- hosts:
- - docker.{{ .Values.ingress.hostpostfix }}
- secretName: {{ include "common.repositorycert" . }}
+ - {{ include "common.ingressurl.localdocker" . }}
+ secretName: secret-{{ include "common.name.nexus" . }}-docker
rules:
- - host: nexus.{{ .Values.ingress.hostpostfix }}
+ - host: {{ include "common.ingressurl.localdocker" . }}
http:
paths:
- backend:
- serviceName: {{ include "nexus.fullname" . }}
- servicePort: nexus
- - host: docker.{{ .Values.ingress.hostpostfix }}
- http:
- paths:
- - backend:
- serviceName: {{ include "nexus.fullname" . }}
+ serviceName: {{ include "common.servicename.nexus.http" . }}
servicePort: docker
metadata:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /repository/helm.local/
- name: {{ include "nexus.fullname" . }}-helm
- labels:
- app: {{ template "nexus.name" . }}
- chart: {{ template "nexus.chart" . }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
+ name: {{ include "common.ingressname.nexus" . }}-helm
spec:
tls:
- hosts:
- - helm.{{ .Values.ingress.hostpostfix }}
- secretName: {{ include "common.helmrepositorycert" . }}
+ - {{ include "common.ingressurl.localhelm" . }}
+ secretName: secret-{{ include "common.name.nexus" . }}-helm
rules:
- - host: helm.{{ .Values.ingress.hostpostfix }}
+ - host: {{ include "common.ingressurl.localhelm" . }}
http:
paths:
- backend:
- serviceName: {{ include "nexus.fullname" . }}
- servicePort: nexus
+ serviceName: {{ include "common.servicename.nexus.http" . }}
+ servicePort: helm
path: /
apiVersion: batch/v1
kind: Job
metadata:
- name: cert-copy
+ name: job-{{ include "common.name.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"]
+ 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
- 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: {{ include "common.repositorycert" . }}
+ secretName: secret-{{ include "common.name.nexus" . }}-docker
- name: helmcerts
secret:
- secretName: {{ include "common.helmrepositorycert" . }}
+ secretName: secret-{{ include "common.name.nexus" . }}-helm
+ - name: nexuscerts
+ secret:
+ secretName: secret-{{ include "common.name.nexus" . }}-nexus
- name: write-to-volume
hostPath:
path: /tmp
--- /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
apiVersion: v1
kind: PersistentVolume
metadata:
- name: nexus3-configuration
+ name: pv-{{ include "common.name.nexus" . }}
spec:
capacity:
- storage: {{ .Values.storagesize }}
+ storage: {{ .Values.nexus.storagesize }}
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
- storageClassName: nexus3-storage
+ storageClassName: storageclass-{{ include "common.name.nexus" . }}
local:
- path: {{ .Values.datapath }}
+ path: {{ .Values.nexus.datapath }}
nodeAffinity:
required:
nodeSelectorTerms:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
- name: nexus-claim
+ name: pvc-{{ include "common.name.nexus" . }}
spec:
accessModes:
- ReadWriteOnce
- storageClassName: nexus3-storage
+ storageClassName: storageclass-{{ include "common.name.nexus" . }}
resources:
requests:
- storage: {{ .Values.storagesize }}
+ storage: {{ .Values.nexus.storagesize }}
kind: Secret
type: kubernetes.io/tls
metadata:
- name: {{ include "common.repositorycert" . }}
- labels:
- app: {{ template "nexus.name" . }}
- chart: {{ template "nexus.chart" . }}
- heritage: {{ .Release.Service }}
- release: {{ .Release.Name }}
+ name: secret-{{ include "common.name.nexus" . }}-docker
annotations:
"helm.sh/hook": "pre-install"
"helm.sh/hook-delete-policy": "before-hook-creation"
data:
-{{ ( include "common.repository.gen-certs" . ) | indent 2 }}
+{{ ( include "nexus.gen-docker-cert" . ) | indent 2 }}
kind: Secret
type: kubernetes.io/tls
metadata:
- name: {{ include "common.helmrepositorycert" . }}
- labels:
- app: {{ template "nexus.name" . }}
- chart: {{ template "nexus.chart" . }}
- heritage: {{ .Release.Service }}
- release: {{ .Release.Name }}
+ name: secret-{{ include "common.name.nexus" . }}-helm
annotations:
"helm.sh/hook": "pre-install"
"helm.sh/hook-delete-policy": "before-hook-creation"
data:
-{{ ( include "common.helmrepository.gen-certs" . ) | indent 2 }}
+{{ ( 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 }}
apiVersion: v1
kind: Service
metadata:
- name: {{ include "nexus.fullname" . }}
+ name: {{ include "common.servicename.nexus.http" . }}
+ namespace: {{ include "common.namespace" . }}
labels:
- app: {{ template "nexus.name" . }}
- chart: {{ template "nexus.chart" . }}
+ 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.service.port.nexus }}
+ - port: {{ .Values.nexus.service.nexus.port }}
targetPort: nexus
protocol: TCP
name: nexus
- - port: {{ .Values.service.port.docker }}
+ - port: {{ .Values.nexus.service.docker.port }}
targetPort: docker
protocol: TCP
name: docker
selector:
- app: {{ template "nexus.name" . }}
+ app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
release: {{ .Release.Name }}
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
- name: nexus3-storage
+ name: storageclass-{{ include "common.name.nexus" . }}
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
# Default values for nexus.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
-
-replicaCount: 1
-
-# This is the name of K8S secret that contains the docker registry cert
-# You can override this by using
-# repositoryCertOverride: ""
-repositoryCert: docker-reg-certs
-
-# This is the name of K8S secret that contains the helm repository cert
-# You can override this by using
-# helmRepositoryCertOverride: ""
+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 the admin password
+ adminPassword: admin123
# This is designed to be deployed using local image
-image:
- repository: nexus-repository-helm-apt
- tag: 1.0.0
- pullPolicy: Never
+ image:
+ name: nexus-repository-helm-apt
+ tag: 1.0.0
-service:
- port:
- nexus: 80
- docker: 10001
-ingress:
- hostpostfix: ricinfra.local
+ service:
+ nexus:
+ port: 80
+ containerPort: 8081
+ docker:
+ port: 10001
+ containerPort: 10001
-storagesize: 20Gi
-datapath: /tmp/nexus3-data/
+ storagesize: 20Gi
+ datapath: /tmp/nexus3-data/
# helm_release_name defines the release name helm will use to deploy RIC
# It will be overrided by RICAUX_RELEASE_NAME
-helm_release_name=ttt
+helm_release_name=r0
# namespace defines the namespace that helm will use to deploy RIC
# It will be overrided by RICAUX_NAMESPACE
-namespace=ricmon
+namespace=ricinfra
+++ /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. #
-################################################################################
-
-{{/* vim: set filetype=mustache: */}}
-{{/*
-Expand the name of the chart.
-*/}}
-{{- define "ext.name" -}}
-{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-
-{{/*
-Create a default fully qualified app name.
-We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec)
-.
-If release name contains chart name it will be used as a full name.
-*/}}
-{{- define "ext.fullname" -}}
-{{- if .Values.fullnameOverride -}}
-{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- $name := default .Chart.Name .Values.nameOverride -}}
-{{- if contains $name .Release.Name -}}
-{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-{{- end -}}
-{{- end -}}
-
-{{/*
-Create chart name and version as used by the chart label.
-*/}}
-{{- define "ext.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
-{{- 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.ext.ip }}"
+ ports:
+ - port: {{ include "common.ingresshttpport.ricinfra" . }}
+ name: {{ include "common.ingressurl.localdocker" . }}-http-ingress-port
+ - port: {{ include "common.ingresshttpport.ricinfra" . }}
+ name: {{ include "common.ingressurl.localdocker" . }}-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.localhelm" . }}
+ namespace: {{ include "common.namespace" . }}
+spec:
+ ports:
+ - name: {{ include "common.ingressurl.localhelm" . }}-http-ingress-port
+ protocol: "TCP"
+ port: 80
+ - name: {{ include "common.ingressurl.localhelm" . }}-https-ingress-port
+ protocol: "TCP"
+ port: 443
+---
+kind: "Endpoints"
+apiVersion: "v1"
+metadata:
+ # match with the selector-less service
+ name: {{ include "common.ingressurl.localhelm" . }}
+ namespace: {{ include "common.namespace" . }}
+subsets:
+ - addresses:
+ - ip: "{{ .Values.ext.ip }}"
+ ports:
+ - port: {{ include "common.ingresshttpport.ricinfra" . }}
+ name: {{ include "common.ingressurl.localhelm" . }}-http-ingress-port
+ - port: {{ include "common.ingresshttpport.ricinfra" . }}
+ name: {{ include "common.ingressurl.localhelm" . }}-https-ingress-port