--- /dev/null
+# ignore all logs
+*.log
+*.tar
+*.tgz
echo "Helm Release Name: $RELEASE_NAME"
-COMMON_CHART_VERSION=$(cat $DIR/../../50-RIC-Platform/charts/common/Chart.yaml | grep version | awk '{print $2}')
+COMMON_CHART_VERSION=$(cat $DIR/../../../ric-platform/50-RIC-Platform/helm/common/Chart.yaml | grep version | awk '{print $2}')
-helm package -d /tmp $DIR/../../50-RIC-Platform/charts/common
+helm package -d /tmp $DIR/../../../ric-platform/50-RIC-Platform/helm/common
for component in $RICAUX_COMPONENTS; do
echo "Preparing chart for comonent $component"
- cp /tmp/common-$COMMON_CHART_VERSION.tgz $DIR/../charts/$component/charts/
+ mkdir -p $DIR/../helm/$component/charts/
+ cp /tmp/common-$COMMON_CHART_VERSION.tgz $DIR/../helm/$component/charts/
if [ -z $OVERRIDEYAML ]; then
- helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../charts/$component
+ helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component
else
- helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../charts/$component
+ helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component
fi
done
echo "Name Space: $NAMESPACE"
echo "Helm Release: $RELEASE_NAME"
-HOSTPOSTFIX=$(cat $DIR/../charts/values.yaml | grep hostpostfix | awk '{print $2}')
+HOSTPOSTFIX=$(cat $DIR/../helm/values.yaml | grep hostpostfix | awk '{print $2}')
echo "****************************************************************************************************************"
echo "If nexus.$HOSTPOSTFIX is not resolved by your DNS server, please add an entry in your /etc/hosts file."
echo "****************************************************************************************************************"
-COMMON_CHART_VERSION=$(cat $DIR/../../50-RIC-Platform/charts/common/Chart.yaml | grep version | awk '{print $2}')
-helm package -d /tmp $DIR/../../50-RIC-Platform/charts/common
+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
-cp /tmp/common-$COMMON_CHART_VERSION.tgz $DIR/../charts/charts/
+
+mkdir -p $DIR/../helm/charts/
+cp /tmp/common-$COMMON_CHART_VERSION.tgz $DIR/../helm/charts/
if [ -z $OVERRIDEYAML ]; then
-helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-nexus" $DIR/../charts
+helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-nexus" $DIR/../helm
else
-helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-nexus" $DIR/../charts
+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}')
echo $IS_NEXUS_READY
-DOCKERPORT=$(cat $DIR/../charts/templates/deployment.yaml | awk '/.*- name: docker.*/{getline; print $2}')
+DOCKERPORT=$(cat $DIR/../helm/templates/deployment.yaml | awk '/.*- name: docker.*/{getline; print $2}')
DOCKERREPOSCRIPT="{\"name\":\"create_docker_repo\",\
--- /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
+
+
+
+echo "Undeploying nexus repo managers for local docker registry and helm repo."
+echo "Name Space: $NAMESPACE"
+echo "Helm Release: $RELEASE_NAME"
+helm delete --purge "${RELEASE_NAME}-nexus"
# See the License for the specific language governing permissions and #
# limitations under the License. #
################################################################################
-
-{{- $fullName := include "nexus.fullname" . -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
- name: {{ $fullName }}
+ name: {{ include "nexus.fullname" . }}
labels:
app: {{ template "nexus.name" . }}
chart: {{ template "nexus.chart" . }}
http:
paths:
- backend:
- serviceName: {{ $fullName }}
+ serviceName: {{ include "nexus.fullname" . }}
servicePort: nexus
- host: docker.{{ .Values.ingress.hostpostfix }}
http:
paths:
- backend:
- serviceName: {{ $fullName }}
+ serviceName: {{ include "nexus.fullname" . }}
servicePort: docker
fi
if [ -z $OVERRIDEYAML ]; then
- helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-credential" $DIR/../charts
+ helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-credential" $DIR/../helm
else
- helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-credential" $DIR/../charts
+ helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-credential" $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/credential.conf
+
+if [ -z "$RICPLT_RELEASE_NAME" ];then
+ RELEASE_NAME=$helm_release_name
+else
+ RELEASE_NAME=$RICPLT_RELEASE_NAME
+fi
+if [ -z "$RICPLT_NAMESPACE" ];then
+ NAMESPACE=$namespace
+else
+ NAMESPACE=$RICPLT_NAMESPACE
+fi
+
+ helm delete --purge "${RELEASE_NAME}-credential"
+
echo "Helm Release Name: $RELEASE_NAME"
-COMMON_CHART_VERSION=$(cat $DIR/../charts/common/Chart.yaml | grep version | awk '{print $2}')
+COMMON_CHART_VERSION=$(cat $DIR/../helm/common/Chart.yaml | grep version | awk '{print $2}')
-helm package -d /tmp $DIR/../charts/common
+helm package -d /tmp $DIR/../helm/common
for component in $RICPLT_COMPONENTS; do
echo "Preparing chart for comonent $component"
- cp /tmp/common-$COMMON_CHART_VERSION.tgz $DIR/../charts/$component/charts/
+ mkdir -p $DIR/../helm/$component/charts/
+ cp /tmp/common-$COMMON_CHART_VERSION.tgz $DIR/../helm/$component/charts/
if [ -z $OVERRIDEYAML ]; then
- helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../charts/$component
+ helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component
else
- helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../charts/$component
+ helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component
fi
done