X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-aux%2Fbin%2Finstall;h=7e4f03a0c1232f991f69be04dd8211bb5f241b06;hb=41f01080ed18db53fe75ffea1be444084e8a4d15;hp=917c9420058a1ab915f25ef76621c8816622f66c;hpb=4d2d4f1134dfe309238af3777fbefa91c1ecf8d6;p=it%2Fdep.git diff --git a/ric-aux/bin/install b/ric-aux/bin/install index 917c9420..7e4f03a0 100755 --- a/ric-aux/bin/install +++ b/ric-aux/bin/install @@ -45,8 +45,16 @@ if [ -z "$OVERRIDEYAML" ];then exit 1 fi +#Check for helm3 +IS_HELM3=$(helm version -c --short|grep -e "^v3") +HELM_SEARCH_FLAG="" +if [ $IS_HELM3 ] +then + HELM_SEARCH_FLAG="repo" +fi + -HAS_RIC_COMMON_PACKAGE=$(helm search local/ric-common | grep ric-common) +HAS_RIC_COMMON_PACKAGE=$(helm search ${HELM_SEARCH_FLAG} local/ric-common | grep ric-common) if [ -z "$HAS_RIC_COMMON_PACKAGE" ];then echo "****************************************************************************************************************" @@ -57,7 +65,7 @@ if [ -z "$HAS_RIC_COMMON_PACKAGE" ];then exit 1 fi -HAS_AUX_COMMON_PACKAGE=$(helm search local/aux-common | grep aux-common) +HAS_AUX_COMMON_PACKAGE=$(helm search ${HELM_SEARCH_FLAG} local/aux-common | grep aux-common) if [ -z "$HAS_AUX_COMMON_PACKAGE" ];then echo "****************************************************************************************************************" @@ -86,10 +94,11 @@ for f in $NODENAME; do LABEL=$(kubectl describe node $f | grep "local-storage=enable") if [ ! -z "$LABEL" ]; then LABELFOUND=true + echo "Found lable \"local-storage=enable\" at node $f" fi done -FOUND_STORAGECLASS=$(grep storageclass $OVERRIDEYAML) +FOUND_STORAGECLASS=$(grep -w storageclass $OVERRIDEYAML) if ! $LABELFOUND && [ -z "$FOUND_STORAGECLASS" ]; then @@ -138,6 +147,7 @@ for f in $NODENAME; do LABEL=$(kubectl describe node $f | grep "portal-storage=enable") if [ ! -z "$LABEL" ]; then LABELFOUND=true + echo "Found lable \"portal-storage=enable\" at node $f" fi done @@ -167,6 +177,7 @@ fi + echo Add cluster roles cat >ricaux-role.yaml <1{print $1}') @@ -253,6 +338,7 @@ for component in $COMPONENTS; do LABEL=$(kubectl describe node $f | grep "aaf-storage=enable") if [ ! -z "$LABEL" ]; then LABELFOUND=true + echo "Found lable \"aaf-storage=enable\" at node $f" fi done @@ -265,12 +351,12 @@ for component in $COMPONENTS; do echo "* kubectl label --overwrite nodes aaf-storage=enable *" echo "***********************************************************************************************" else - helm install -f $OVERRIDEYAML --namespace "onap" --name "${RELEASE_PREFIX}-$component" $DIR/../helm/$component + helm install -f $OVERRIDEYAML --namespace "onap" ${NAME_ARG} "${RELEASE_PREFIX}-$component" $DIR/../helm/$component fi ;; *) - helm install -f $OVERRIDEYAML --namespace "${AUXNAMESPACE:-ricaux}" --name "${RELEASE_PREFIX}-$component" $DIR/../helm/$component - + helm install -f $OVERRIDEYAML --namespace "${AUXNAMESPACE:-ricaux}" ${NAME_ARG} "${RELEASE_PREFIX}-$component" $DIR/../helm/$component + sleep 8 esac done