--- /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. #
+###############################################################################
+
+#-------------------------------------------------------------------------
+# Global common setting
+#-------------------------------------------------------------------------
+global:
+ # Docker registry from which RIC platform components pull the images
+ repository: nexus3.o-ran-sc.org:10004
+
+ # Name of the K8S docker credential that is onboarded by 20-credential
+ repositoryCred: docker-reg-cred
+
+ # Docker image pull policy
+ imagePullPolicy: Always
+
+ # Helm repo that will be used by xApp manager
+ helmRepository: nexus.ricinfra.local
+
+ # Certificate of the helm repo
+ helmRepositoryCert: xapp-mgr-certs
+
+ # Name of the K8S secret that contains the credential of the helm repo
+ helmRepositoryCred: xapp-mgr-creds
+
+ # The name of the tiller that xApp helm client talks to
+ helmRepositoryTiller: tiller-deploy
+
+ # The namespace of the xApp helm tiller
+ helmRepositoryTillerNamespace: kube-system
+
+ # The port the xApp helm tiller is listening to
+ helmRepositoryTillerPort: 44134
+
+
+
+
+#-------------------------------------------------------------------------
+# Auxiliary Functions
+#-------------------------------------------------------------------------
+dashboard:
+ image:
+ name:: ric-dash-be
+ tag: 1.0.0-SNAPSHOT
+
--- /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. #
+###############################################################################
+
+#-------------------------------------------------------------------------
+# Global common setting
+#-------------------------------------------------------------------------
+global:
+ # Docker registry from which RIC platform components pull the images
+ repository: nexus3.o-ran-sc.org:10004
+
+ # Name of the K8S docker credential that is onboarded by 20-credential
+ repositoryCred: docker-reg-cred
+
+ # Docker image pull policy
+ imagePullPolicy: Always
+
+ # Helm repo that will be used by xApp manager
+ helmRepository: nexus.ricinfra.local
+
+ # Certificate of the helm repo
+ helmRepositoryCert: xapp-mgr-certs
+
+ # Name of the K8S secret that contains the credential of the helm repo
+ helmRepositoryCred: xapp-mgr-creds
+
+ # The name of the tiller that xApp helm client talks to
+ helmRepositoryTiller: tiller-deploy
+
+ # The namespace of the xApp helm tiller
+ helmRepositoryTillerNamespace: kube-system
+
+ # The port the xApp helm tiller is listening to
+ helmRepositoryTillerPort: 44134
+
+#-------------------------------------------------------------------------
+# Infrastructure
+#-------------------------------------------------------------------------
+
+cluster:
+ deployK8S: false
+ deployNexus: false
+ useLocalHelmRepo: false
+ useLocalDockerRegistry: false
+
+
+repositoryCredential:
+ user: "docker"
+ password: "docker"
+
+
+helmrepoCredential:
+ user: "helm"
+ password: "docker"
+
+
+adminPassword: admin123
+
+datapath: /tmp/nexus3-data/
imagePullPolicy: Always
# Helm repo that will be used by xApp manager
- helmRepository: nexus.ricinfra.local
+ helmRepository: helm.ricinfra.local
# Certificate of the helm repo
helmRepositoryCert: xapp-mgr-certs
# The port the xApp helm tiller is listening to
helmRepositoryTillerPort: 44134
-#-------------------------------------------------------------------------
-# Infrastructure
-#-------------------------------------------------------------------------
-
-
-
-
-#-------------------------------------------------------------------------
-# Auxiliary Functions
-#-------------------------------------------------------------------------
-dashboard:
- image:
- name:: ric-dash-be
- tag: 1.0.0-SNAPSHOT
#-------------------------------------------------------------------------
# Platform Components
# xApp Manager
appmgr:
image:
- name: xapp-manager
- tag: latest
+ name: ric-plt-appmgr
+ tag: 0.1.3
# DBAAS
dbaas:
backend:
image:
- name: redis-standalone
- tag: latest
+ name: ric-plt-dbaas
+ tag: 0.1.0
# E2 Manager
e2mgr:
--- /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. #
+################################################################################
+
+# This script deploys RIC auxiliary function components automatically
+
+OVERRIDEYAML=$1
+
+
+
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+
+source $DIR/../etc/ric-infra.conf
+
+export RICINFRA_RELEASE_NAME=$ric_infra_helm_release_name
+
+export RICINFRA_NAMESPACE=$ric_infra_namespace
+
+export DEPLOY_K8S=$deployK8S
+
+export DEPLOY_NEXUS=$deployNexus
+
+export USE_LOCAL_HELM_REPO=$useLocalHelmRepo
+
+export USE_LOCAL_DOCKER_REGISTRY=$useLocalDockerRegistry
+
+
+
+
+
+source $DIR/../etc/ric-platform.conf
+
+export RICPLT_RELEASE_NAME=$ric_platform_helm_release_name
+
+export RICPLT_NAMESPACE=$ric_platform_namespace
+
+
+
+
+if [ -z "$OVERRIDEYAML" ];then
+ echo "****************************************************************************************************************"
+ echo " WARNING "
+ echo "****************************************************************************************************************"
+ echo "Deploying RIC infrastructure components without deployment recipe. Default configurations are used."
+ echo "****************************************************************************************************************"
+
+else
+
+ export DEPLOY_K8S=$(cat $OVERRIDEYAML | grep deployK8S | awk '{print $2}')
+ export DEPLOY_NEXUS=$(cat $OVERRIDEYAML | grep deployNexus | awk '{print $2}')
+ export USE_LOCAL_HELM_REPO=$(cat $OVERRIDEYAML | grep useLocalHelmRepo | awk '{print $2}')
+ export USE_LOCAL_DOCKER_REGISTRY=$(cat $OVERRIDEYAML | grep useLocalDockerRegistry | awk '{print $2}')
+fi
+
+
+
+if $USE_LOCAL_HELM_REPO && [ "$DEPLOY_NEXUS" != "true" ];then
+ echo "****************************************************************************************************************"
+ echo " ERROR "
+ echo "****************************************************************************************************************"
+ echo "Local helm repo cannot be used if Nexus is not installed. Please change your configurations in the deployment recipe."
+ echo "****************************************************************************************************************"
+ exit 1
+fi
+
+
+if $USE_LOCAL_DOCKER_REGISTRY && [ "$DEPLOY_NEXUS" != "true" ];then
+ echo "****************************************************************************************************************"
+ echo " ERROR "
+ echo "****************************************************************************************************************"
+ echo "Local docker registry cannot be used if Nexus is not installed. Please change your configurations in the deployment recipe."
+ echo "****************************************************************************************************************"
+ exit 1
+fi
+
+
+if $DEPLOY_K8S; then
+ echo "Deploying K8S. Please make sure that you configure files in ./ric-infra/00-Kubernetes/etc correctly."
+ . ../ric-infra/00-Kubernetes/bin/install
+fi
+
+
+if $DEPLOY_NEXUS; then
+ echo "Deploying Nexus."
+ . ../ric-infra/10-Nexus/bin/install $OVERRIDEYAML
+fi
+
+
+
--- /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. #
+################################################################################
+
+# ------------------- RIC AUX ---------------------------------------
+
+# release name helm will use to deploy RIC infrastructure componenets
+ric_infra_helm_release_name=r0
+
+# namespace that helm will use to deploy RIC infrastructure componenets
+ric_infra_namespace=ricinfra
+
+# deploy the kubernete cluster
+deployK8S=false
+
+# deploy a nexus repository manager
+deployNexus=true
+
+# use the local helm repo
+useLocalHelmRepo=true
+
+# use the local docker registry
+useLocalDockerRegistry=false
apiVersion: v1
appVersion: "1.0"
-description: Helm chart for the RIC Dashboard web app
+description: Helm Chart for RIC Dashboard
name: dashboard
version: 1.1.0
+icon: https://gerrit.o-ran-sc.org/r/gitweb?p=portal/ric-dashboard.git;a=blob;f=webapp-frontend/src/assets/at_t.png;h=3cced1d5ce4668fbf3b33064aaaa6920bc8130b6;hb=HEAD
--- /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. #
+################################################################################
+
+# Defines a config map for mounting as file application.properties
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "dashboard.fullname" . }}-appconfig
+data:
+ # this key becomes the filename when mounted
+ application.properties: |
+ # appconfig.yaml
+ server.port = {{ .Values.dashboard.server.port }}
+ a1med.url = {{ .Values.dashboard.properties.a1med.url }}
+ anrxapp.url = {{ .Values.dashboard.properties.anrxapp.url }}
+ e2mgr.url = {{ .Values.dashboard.properties.e2mgr.url }}
+ xappmgr.url = {{ .Values.dashboard.properties.xappmgr.url }}
imagePullPolicy: {{ include "common.pullPolicy" . }}
ports:
- name: http
- containerPort: 8080
+ containerPort: {{ .Values.dashboard.server.port }}
protocol: TCP
- env:
- - name: SPRING_APPLICATION_JSON
- valueFrom:
- configMapKeyRef:
- name: dashboard-configmap
- key: springApplication.json
+ volumeMounts:
+ - name: application-config
+ mountPath: /maven/application.properties
+ subPath: application.properties
+ readOnly: true
livenessProbe:
httpGet:
path: /
httpGet:
path: /
port: http
+ volumes:
+ - name: application-config
+ configMap:
+ name: {{ include "dashboard.fullname" . }}-appconfig
spec:
type: {{ .Values.dashboard.service.type }}
ports:
- - port: {{ .Values.dashboard.service.port }}
+ - port: {{ .Values.dashboard.server.port }}
+ nodePort: {{ .Values.dashboard.service.port }}
targetPort: http
protocol: TCP
selector:
# limitations under the License. #
################################################################################
-# Default values for dashboard.
-# This is a YAML-formatted file.
-# Declare variables to be passed into your templates.
+# Deployment values for dashboard.
-replicaCount: 1
repository: "nexus3.o-ran-sc.org:10004"
imagePullPolicy: IfNotPresent
repositoryCred: docker-reg-cred
dashboard:
image:
name: ric-dash-be
- tag: 1.0.0-SNAPSHOT
-
-
+ tag: 1.0.4
+ replicaCount: 1
+ server:
+ # Tomcat listens here
+ port: 8080
service:
type: NodePort
- port: 80
-
+ port: 30080
+ name: dashboard-service
+ # config URLs must be specified at deployment
+ properties:
+ a1med:
+ url: http://values-yaml-default-A1-URL
+ anrxapp:
+ url: http://values-yaml-default-ANR-URL
+ e2mgr:
+ url: http://values-yaml-default-E2-URL
+ xappmgr:
+ url: http://values-yaml-default-MGR-URL
sed -e "s/__helm_version__/${INFRA_HELM_VERSION}/g" "$filename" > tmp && mv tmp "$filename"
sed -e "s/__k8s_mst_private_ip_addr__/\$(hostname -I)/g" "$filename" > tmp && mv tmp "$filename"
sed -e "s/__host_private_ip_addr__/\$(hostname -I)/g" "$filename" > tmp && mv tmp "$filename"
-sed -e "s/__k8s_mst_floating_ip_addr__/\$(ec2metadata --public-ipv4)/g" "$filename" > tmp && mv tmp "$filename"
+#sed -e "s/__k8s_mst_floating_ip_addr__/\$(ec2metadata --public-ipv4)/g" "$filename" > tmp && mv tmp "$filename"
+sed -e "s/__k8s_mst_floating_ip_addr__/\$(curl ifconfig.co)/g" "$filename" > tmp && mv tmp "$filename"
sed -e "s/__stack_name__/\$(hostname)/g" "$filename" > tmp && mv tmp "$filename"
#echo "__mtu__" > /opt/config/mtu.txt
#echo "__cinder_volume_id__" > /opt/config/cinder_volume_id.txt
sleep 15
done
- # install ingress controller db-less kong
- helm install stable/kong --set ingressController.enabled=true --set postgresql.enabled=false --set env.database=off
-
echo "Starting an NC TCP server on port 29999 to indicate we are ready"
nc -l -p 29999 &
--- /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
+
+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
+
+
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
+
+
+
+
+
+
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
helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-nexus" $DIR/../helm
fi
-NEXUS_POD_NAME=$(kubectl get pod -n $NAMESPACE | grep nexus | grep ContainerCreating | awk '{print $1}')
+NEXUS_POD_NAME=$(kubectl get pod -n $NAMESPACE | grep nexus | grep -v "Terminating" | awk '{print $1}')
+
echo "Waiting Nexus to be ready."
echo " "
echo $IS_NEXUS_READY
-DOCKERPORT=$(cat $DIR/../helm/templates/deployment.yaml | awk '/.*- name: docker.*/{getline; print $2}')
-
-
-DOCKERREPOSCRIPT="{\"name\":\"create_docker_repo\",\
- \"type\":\"groovy\",\
- \"content\":\"repository.createDockerHosted('docker.snapshot',\
- $DOCKERPORT, null, 'default', false, true)\"}"
-
-echo $DOCKERREPOSCRIPT
-
-# This line uses the default admin password
-curl -u admin:admin123 -X POST -H "Content-Type: application/json" --data "$DOCKERREPOSCRIPT" http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS/service/rest/v1/script
-
-curl -u admin:admin123 -X POST -H 'Content-Type: text/plain' -H 'Accept: application/json' http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS/service/rest/v1/script/create_docker_repo/run
-
-
-
+. ./change_password $OVERRIDEYAML
# ingress port number of the K8S cluster
# It will be overrided by INGRESS_PORT
ingress_port=30000
+
+
+default_admin_password=admin123
- name: docker
containerPort: 10001
protocol: TCP
+ volumeMounts:
+ - name: nexus-config
+ mountPath: /nexus-data
+ volumes:
+ - name: nexus-config
+ persistentVolumeClaim:
+ claimName: nexus-claim
+
+
# livenessProbe:
# httpGet:
# 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: extensions/v1beta1
+kind: Ingress
+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 }}
+spec:
+ tls:
+ - hosts:
+ - helm.{{ .Values.ingress.hostpostfix }}
+ secretName: {{ include "common.helmrepositorycert" . }}
+ rules:
+ - host: helm.{{ .Values.ingress.hostpostfix }}
+ http:
+ paths:
+ - backend:
+ serviceName: {{ include "nexus.fullname" . }}
+ servicePort: nexus
+ path: /
heritage: {{ .Release.Service }}
spec:
tls:
- - hosts:
- - docker.{{ .Values.ingress.hostpostfix }}
- secretName: {{ include "common.repositorycert" . }}
+ - hosts:
+ - docker.{{ .Values.ingress.hostpostfix }}
+ secretName: {{ include "common.repositorycert" . }}
rules:
- host: nexus.{{ .Values.ingress.hostpostfix }}
http:
--- /dev/null
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+ name: nexus3-configuration
+spec:
+ capacity:
+ storage: {{ .Values.storagesize }}
+ accessModes:
+ - ReadWriteOnce
+ persistentVolumeReclaimPolicy: Retain
+ storageClassName: nexus3-storage
+ local:
+ path: {{ .Values.datapath }}
+ nodeAffinity:
+ required:
+ nodeSelectorTerms:
+ - matchExpressions:
+ - key: nexus-node
+ operator: In
+ values:
+ - enable
--- /dev/null
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+ name: nexus-claim
+spec:
+ accessModes:
+ - ReadWriteOnce
+ storageClassName: nexus3-storage
+ resources:
+ requests:
+ storage: {{ .Values.storagesize }}
containers:
- name: cert-copy
image: alpine
- command: ["cp", "-rL", "/var/run/certs/..data/tls.crt", "/var/run/certs-copy/"]
+ 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: ["tail", "-f", "/dev/null"]
volumeMounts:
- - name: certs
- mountPath: /var/run/certs
+ - name: dockercerts
+ mountPath: /var/run/dockercerts
+ readOnly: true
+ - name: helmcerts
+ mountPath: /var/run/helmcerts
readOnly: true
- name: write-to-volume
mountPath: /var/run/certs-copy
volumes:
- - name: certs
+ - name: dockercerts
secret:
secretName: {{ include "common.repositorycert" . }}
+ - name: helmcerts
+ secret:
+ secretName: {{ include "common.helmrepositorycert" . }}
- name: write-to-volume
hostPath:
path: /tmp
# limitations under the License. #
################################################################################
-# Provides configuration parameters which spring expects as a JSON string
-
apiVersion: v1
-kind: ConfigMap
+kind: Secret
+type: kubernetes.io/tls
metadata:
- name: dashboard-configmap
+ name: {{ include "common.helmrepositorycert" . }}
+ labels:
+ app: {{ template "nexus.name" . }}
+ chart: {{ template "nexus.chart" . }}
+ heritage: {{ .Release.Service }}
+ release: {{ .Release.Name }}
+ annotations:
+ "helm.sh/hook": "pre-install"
+ "helm.sh/hook-delete-policy": "before-hook-creation"
data:
- springApplication.json: |
- {
- "a1med": {
- "basepath": "http://0.1.2.3:45"
- },
- "e2mgr": {
- "basepath": "http://1.2.3.4:56"
- },
- "xappmgr": {
- "basepath": "http://2.3.4.5:67"
- }
- }
+{{ ( include "common.helmrepository.gen-certs" . ) | indent 2 }}
--- /dev/null
+kind: StorageClass
+apiVersion: storage.k8s.io/v1
+metadata:
+ name: nexus3-storage
+provisioner: kubernetes.io/no-provisioner
+volumeBindingMode: WaitForFirstConsumer
# 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: ""
+helmRepositoryCert: xapp-mgr-certs
+
+
+# This is the admin password
+adminPassword: admin123
+
# This is designed to be deployed using local image
image:
repository: nexus-repository-helm-apt
ingress:
hostpostfix: ricinfra.local
+
+storagesize: 20Gi
+datapath: /tmp/nexus3-data/
--- /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.
+FROM alpine
+
+MAINTAINER "RIC"
+
+LABEL name="Generic initcontainer image for RIC Platform components"
+
+RUN apk update
+
+# iproute2: required for e2 termination
+RUN apk add iproute2
+# kubectl: required for xapp/ricplt helm installers
+RUN apk add openssl
+# kubectl: required for xapp/ricplt helm installers
+ADD https://storage.googleapis.com/kubernetes-release/release/v1.14.1/bin/linux/amd64/kubectl /bin/kubectl
+RUN chmod +x /bin/kubectl
+
+COPY bin/ricplt-init.sh /ricplt-init.sh
+
+#
+CMD /ricplt-init.sh
--- /dev/null
+#!/bin/sh
+# Copyright (c) 2019 AT&T Intellectual Property.
+# Copyright (c) 2019 Nokia.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# this is placeholder script, intended
+# to be overridden by individual RIC
+# component charts.
+exit 0
if [ -z $OVERRIDEYAML ]; then
- helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-credential" $DIR/../helm
+ helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-${NAMESPACE}-credential" $DIR/../helm
else
- helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-credential" $DIR/../helm
+ helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-${NAMESPACE}-credential" $DIR/../helm
fi
NAMESPACE=$RICPLT_NAMESPACE
fi
- helm delete --purge "${RELEASE_NAME}-credential"
+helm delete --purge "${RELEASE_NAME}-${NAMESPACE}-credential"
-----BEGIN CERTIFICATE-----
-MIIDCTCCAfGgAwIBAgIBATANBgkqhkiG9w0BAQsFADAdMRswGQYDVQQDExJkb2Nr
-ZXItcmVnaXN0cnktY2EwHhcNMTkwNTE1MTQ1NzQzWhcNMjAwNTE0MTQ1NzQzWjAQ
-MQ4wDAYDVQQDEwVuZXh1czCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
-AKNNbC8/cil64YXmPYpN7mRaT5biVsZrOrFkXfX2AXcJAsLUL7E4t7keK4Ba/VwO
-pJKmgdjI4NxlTxe+zoOJVVz3+sMYz77UZTd1h/KDn1eBfozbqHcQ5lQksNDsL46d
-yG/JfYpEEzRha/QxEEdaaQLWMyOcf/SjWnscqMQ2cGvTaEiO8F1re2qrwfnrbqQm
-JYkIrmBbcGKMdg33edZpl3xbFc9eMfJGWuhaoC+Tk7Hj1EtV/O9KdPrvDYzO+h7P
-HVExKXU04h1f9ThAoeU9/o7EN266iuUiCVE6M0zekYSV4BuAkXqbUtmpbnYziAYo
-Cq2puiNUSirqXc6Bno12QykCAwEAAaNhMF8wDgYDVR0PAQH/BAQDAgWgMB0GA1Ud
-JQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMCAGA1UdEQQZ
-MBeCFWRvY2tlci5yaWNpbmZyYS5sb2NhbDANBgkqhkiG9w0BAQsFAAOCAQEAg5aE
-yicj1VnG4G3JeCszj2hFFmg2eTnwkPsIlpeIMJY8zI/IZ2aQP5e0KPAM8IaKMnqq
-RPPusL2DF7Dl4A+ZBTkvfKtxIzwc7wnQGCfonMyM/MxyoBxXIJw+Qek42CpVbYYt
-qVZ3fz6VpCvF/QL6eGmVpMlvLIu15C9pxzEHPcUKpkM1mvKLRcxn2tt5daqjh9ao
-EvZHJt8kOh53c/FZHgA2+73I8Gx6BLUZPO0E+E1vC5K1FwtCl+Cmt6nX5jZEw1LK
-eNcb3oZhXrVnUoQ72HTJEWuPjydB7w1hxnzB5RYGZalM7XwDmOHwdGHlNxpmMbJa
-UZ4yL0N+nAUbLeUS2w==
+MIIDFzCCAf+gAwIBAgIRAPqRsyJWFaoXjwzmI+uQ5GkwDQYJKoZIhvcNAQELBQAw
+HTEbMBkGA1UEAxMSaGVsbS1yZXBvc2l0b3J5LWNhMB4XDTE5MDYyMjAzMDYxNVoX
+DTIwMDYyMTAzMDYxNVowEDEOMAwGA1UEAxMFbmV4dXMwggEiMA0GCSqGSIb3DQEB
+AQUAA4IBDwAwggEKAoIBAQDBExs2W0HvXyinLL/LOkgM4Dobe1OVVntQzCGB8tqD
+xI4ZcXGh8G4b3GMLVe8vs0c0IUUbPhy23AkDxGUT7whLbo1UwGa41htxY51zok4S
+20NN706XVs6E0tKqA1L5kzyxLEAKgHE/EefWIf6MHtRt5GfwFVdjdfZP+9L/ZpUL
+u1HKmiWw7fv0m/MrcAQA7lILpB4xeaM8rYWtBj8TGeoMlWLOtOcFKGpY9Kuty1n7
+cebHcz++qY+Vsrf8RlG4lGlit2IY06FE+5ihK24Zt9Ttwf3lsTf6xDwAEGmDxOAp
+R61gY9wX8ClLO+ns+nkkEiJ90104a4U+qg115tZCGfBBAgMBAAGjXzBdMA4GA1Ud
+DwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0T
+AQH/BAIwADAeBgNVHREEFzAVghNoZWxtLnJpY2luZnJhLmxvY2FsMA0GCSqGSIb3
+DQEBCwUAA4IBAQA2Mt29tQ/3ACBpmZSKLPj3jTpPulXQKgtH9of9X0XBQ0ZdfqTN
+Evyu+K5gY/FF6RhnkaCML4XoOnvJHQQBydwMrK9f6mcC26U8PWZn9+usihw5GJHp
+Hu3pc0PDHb87ha+qCeie9ssKitz8pbJarTh6z1Ht8OT9/nktXkgPnIYI9ycAsdwy
+uBww45UxDu8OD8TT0/08RzH56ruPpRSYDNRbkcT8FZV8C6KgEKG55e/xNAITQwaD
+LD4xYkAZqK7lcPzuIM1kZUQAOJyw72TicMl94r0mL7pZ2NOJUCkkVvkYXo97TUKB
+zomEUpolyZnVpdl4HG3v3Lwd2K3bCs2X+HTc
-----END CERTIFICATE-----
*/}}
{{- define "repository.secret" -}}
{{- $repo := include "common.repository" . }}
- {{- $cred := .Values.repositoryCred }}
+ {{- $cred := .Values.repositoryCredential }}
{{- $user := default "docker" $cred.user }}
{{- $password := default "docker" $cred.password }}
{{- $mail := default "@" $cred.mail }}
{{- define "helmrepo.secret.user" -}}
- {{- $user := default "helm" .Values.helmrepoCred.user -}}
+ {{- $user := default "helm" .Values.helmrepoCredential.user -}}
{{- printf "%s" $user |b64enc }}
{{- end -}}
{{- define "helmrepo.secret.password" -}}
- {{- $pass := default "helm" .Values.helmrepoCred.password -}}
+ {{- $pass := default "helm" .Values.helmrepoCredential.password -}}
{{- printf "%s" $pass |b64enc }}
{{- end -}}
# Values for setting up Kubernetes resources for accessing infrastructure such as docker registry
# helm repo, etc.
+repository: "nexus3.o-ran-sc.org:10004"
-repositoryCred:
+repositoryCredential:
user: "docker"
password: "docker"
-helmrepoCred:
+helmrepoCredential:
user: "helm"
password: "helm"
--- /dev/null
+NAME: xappmgr
+DBAAS_SERVICE_HOST: "r0-dbaas-redis-standalone"
+DBAAS_SERVICE_PORT: "6379"
+DBAAS_PORT_6379_TCP_ADDR: "r0-dbaas-redis-standalone"
+DBAAS_PORT_6379_TCP_PORT: "6379"
--- /dev/null
+"local":
+ # Port on which the xapp-manager REST services are provided
+ "host": __REST_PORT__
+"helm":
+ # Remote helm repo URL. UPDATE this as required.
+ "repo": __HELM_REPO__
+
+ # Repo name referred within the xapp-manager
+ "repo-name": __REPO_NAME__
+
+ # Tiller service details in the cluster. UPDATE this as required.
+ "tiller-service": __TILLER_SERVICE__
+ "tiller-namespace": __TILLER_NAMESPACE__
+ "tiller-port": __TILLER_PORT__
+ # helm username and password files
+ "helm-username-file": "/opt/ric/secret/helm_repo_username"
+ "helm-password-file": "/opt/ric/secret/helm_repo_password"
+ "retry": 1
+"xapp":
+ #Namespace to install xAPPs
+ "namespace": "ricxapp"
+ "tarDir": "/tmp"
+ "schema": "descriptors/schema.json"
+ "config": "config/config-file.json"
+ "tmpConfig": "/tmp/config-file.json"
+++ /dev/null
-"local":
- # Port on which the xapp-manager REST services are provided
- "host": __REST_PORT__
-"helm":
- # Remote helm repo URL. UPDATE this as required.
- "repo": __HELM_REPO__
-
- # Repo name referred within the xapp-manager
- "repo-name": __REPO_NAME__
-
- # Tiller service details in the cluster. UPDATE this as required.
- "tiller-service": __TILLER_SERVICE__
- "tiller-namespace": __TILLER_SERVICE__
- "tiller-port": __TILLER_PORT__
metadata:
name: {{ include "appmgr.fullname" . }}-appconfig
data:
- {{- $restport := default ":8080" (printf ":%.0f" .Values.appmgr.containerPort) | quote -}}
- {{- $helmrepo := include "common.helmrepository" . | quote -}}
- {{- $reponame := default "helm-repo" .Values.appmgr.reponame | quote -}}
- {{- $tiller := include "common.helmrepositorytiller" . | quote -}}
- {{- $tillernamespace := include "common.helmrepositorytillernamespace" . | quote -}}
- {{- $tillerport := include "common.helmrepositorytillerport" . | quote -}}
- {{- (.Files.Glob "resources/xapp-manager.yaml").AsConfig | replace "__HELM_REPO__" $helmrepo | replace "__REST_PORT__" $restport | replace "__REPO_NAME__" $reponame | replace "__TILLER_SERVICE__" $tiller | replace "__TILLER_NAMESPACE__" $tillernamespace | replace "__TILLER_PORT__" $tillerport | nindent 2 }}
+ appmgr.yaml: |
+ {{- $restport := default ":8080" (printf ":%.0f" .Values.appmgr.containerPort) | quote -}}
+ {{- $helmrepo := include "common.helmrepository" . | quote -}}
+ {{- $reponame := default "helm-repo" .Values.appmgr.reponame | quote -}}
+ {{- $tiller := include "common.helmrepositorytiller" . | quote -}}
+ {{- $tillernamespace := include "common.helmrepositorytillernamespace" . | quote -}}
+ {{- $tillerport := include "common.helmrepositorytillerport" . | quote -}}
+ {{- (.Files.Glob "resources/appmgr.yaml").AsConfig | replace "__HELM_REPO__" $helmrepo | replace "__REST_PORT__" $restport | replace "__REPO_NAME__" $reponame | replace "__TILLER_SERVICE__" $tiller | replace "__TILLER_NAMESPACE__" $tillernamespace | replace "__TILLER_PORT__" $tillerport | nindent 2 }}
metadata:
name: {{ include "appmgr.fullname" . }}-appenv
data:
- {{- with .Values.appmgr.appenv }}
- {{- toYaml . | nindent 2 }}
- {{- end }}
+ {{- (.Files.Get "resources/appenv.yaml") | nindent 2 }}
+
release: {{ .Release.Name }}
spec:
hostname: {{ .Chart.Name }}
+ hostAliases:
+ - ip: "135.207.143.86"
+ hostnames:
+ - "helm.ricinfra.local"
imagePullSecrets:
- name: {{ include "common.repositoryCred" . }}
containers:
protocol: TCP
volumeMounts:
- name: config-volume
- mountPath: {{ .Values.appmgr.appconfigpath }}
+ mountPath: {{ .Values.appmgr.appconfigpath }}/appmgr.yaml
+ subPath: appmgr.yaml
- name: secret-volume
mountPath: {{ .Values.appmgr.appsecretpath }}
- name: cert-volume
################################################################################
repository: "nexus3.o-ran-sc.org:10004"
+#repositoryOverride: "nexus3.o-ran-sc.org:10004"
imagePullPolicy: IfNotPresent
repositoryCred: docker-reg-cred
-
# Helm Repo for xApp
# By default a local helm repo is used. The global setting will override
# the default value. You can further override using
#helmRepositoryOverride: ""
-helmRepository: "snapshot.helm.local.ric.org"
+helmRepository: "https://helm.ricinfra.local:31000"
# Default secret name for Helm Repo credential. .Value.golbal.helmRepositoryCred will
# override the default value. You can further override uing
appmgr:
image:
# xAppmanager Docker image name and tag
- name: xapp-manager
- tag: latest
+ name: ric-plt-appmgr
+ tag: 0.1.3
# This section describes xAppManager
replicaCount: 1
port: 8080
name: appmgr-service
protocol: "TCP"
- export: 30020
+ extport: 30020
# config
# Path referred in xapp-manager for retrieving configuration details
appconfigpath: /opt/ric/config
- # To be provided as env variables
- appenv:
- NAME: xappmgr
- #ENV1: "envvalue1"
- #ENV2: "envvalue2"
# secret
# Path referred in xapp-manager for retrieving helm repo secrets
*/}}
{{- define "common.helmrepositorytillerport" -}}
{{- if .Values.helmRepositoryTillerPortOverride -}}
- {{- printf "%s" .Values.helmRepositoryTillerPortOverride -}}
+ {{- printf "%.0f" .Values.helmRepositoryTillerPortOverride -}}
{{- else -}}
{{- if .Values.global -}}
{{- if .Values.global.helmRepositoryTillerPort -}}
- {{- printf "%s" .Values.global.helmRepositoryTillerPort -}}
+ {{- printf "%.0f" .Values.global.helmRepositoryTillerPort -}}
{{- else -}}
- {{- printf "%s" .Values.helmRepositoryTillerPort -}}
+ {{- printf "%.0f" .Values.helmRepositoryTillerPort -}}
{{- end -}}
{{- else -}}
- {{- printf "%s" .Values.helmRepositoryTillerPort -}}
+ {{- printf "%.0f" .Values.helmRepositoryTillerPort -}}
{{- end -}}
{{- end -}}
{{- end -}}
+
+{{/*
+Generate certificates for the helm repo
+*/}}
+{{- define "common.helmrepository.gen-certs" -}}
+{{- $altNames := list ( printf "helm.%s" .Values.ingress.hostpostfix ) -}}
+{{- $ca := genCA "helm-repository-ca" 365 -}}
+{{- $cert := genSignedCert ( include "nexus.name" . ) nil $altNames 365 $ca -}}
+tls.crt: {{ $cert.Cert | b64enc }}
+tls.key: {{ $cert.Key | b64enc }}
+{{- end -}}
+