1 opyright (c) 2019 AT&T Intellectual Property. #
2 # Copyright (c) 2019 Nokia. #
4 # Licensed under the Apache License, Version 2.0 (the "License"); #
5 # you may not use this file except in compliance with the License. #
6 # You may obtain a copy of the License at #
8 # http://www.apache.org/licenses/LICENSE-2.0 #
10 # Unless required by applicable law or agreed to in writing, software #
11 # distributed under the License is distributed on an "AS IS" BASIS, #
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
13 # See the License for the specific language governing permissions and #
14 # limitations under the License. #
15 ################################################################################
21 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
23 #/root/test/ric_robot_suite/helm
24 # extract the base to find root to dep
28 # /data/ORAN-OSC/it/dep/ric-platform/50-RIC-Platform/bin/install
29 BASEDIR50=$BASE/dep/ric-platform/50-RIC-Platform/
30 BASEDIRCOMMON=$BASE/dep/ric-common/Common-Template/helm/ric-common
32 echo "Using etc/ric.conf from $BASEDIR50"
34 source $BASEDIR50/etc/ric.conf
37 if [ -z "$RICPLT_RELEASE_NAME" ];then
38 RELEASE_NAME=$helm_release_name
40 RELEASE_NAME=$RICPLT_RELEASE_NAME
43 # Namespace configuration
44 if [ -z "$RICPLT_NAMESPACE" ];then
45 PLT_NAMESPACE=$plt_namespace
47 PLT_NAMESPACE=$RICPLT_NAMESPACE
50 RICPLT_COMPONENTS="ric-robot"
52 echo "Deploying RIC Platform components [$RICPLT_COMPONENTS]"
53 echo "Platform Namespace: $PLT_NAMESPACE"
54 echo "Helm Release Name: $RELEASE_NAME"
57 #COMMON_CHART_VERSION=$(cat $BASEDIR50/helm/common/Chart.yaml | grep version | awk '{print $2}')
58 COMMON_CHART_VERSION=$(cat $BASEDIRCOMMON/Chart.yaml | grep version | awk '{print $2}')
62 helm package -d /tmp $BASEDIRCOMMON
65 for component in $RICPLT_COMPONENTS; do
66 echo "Preparing chart for comonent $component"
67 mkdir -p $DIR/$component/charts/
68 cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/$component/charts/
69 if [ -z $OVERRIDEYAML ]; then
70 echo "helm install --namespace \"${PLT_NAMESPACE}\" --set \"Release.HelmReleaseName=${RELEASE_NAME}\" --name \"${RELEASE_NAME}-$component\" $DIR/../helm/$component"
71 helm install --namespace "${PLT_NAMESPACE}" --set "Release.HelmReleaseName=${RELEASE_NAME}" --name "${RELEASE_NAME}-$component" $DIR/$component
73 echo "helm install -f $OVERRIDEYAML --namespace \"${PLT_NAMESPACE}\" --set \"Release.HelmReleaseName=${RELEASE_NAME}\" --name \"${RELEASE_NAME}-$component\" $DIR/../helm/$component"
74 helm install -f $OVERRIDEYAML --namespace "${PLT_NAMESPACE}" --set "Release.HelmReleaseName=${RELEASE_NAME}" --name "${RELEASE_NAME}-$component" $DIR/$component