X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-infra%2F10-Nexus%2Fbin%2Finstall;h=f160a48ed27466c751edcca882a0bdc8f7564a56;hb=e7873992010cbe1274c8afc432b51be090bcd2d5;hp=452924b9e91aa3ac96a1a23c9d7964bc8e709d87;hpb=62b17b9e2ec2a91cc7d84f73821017c7c6b773a8;p=it%2Fdep.git diff --git a/ric-infra/10-Nexus/bin/install b/ric-infra/10-Nexus/bin/install index 452924b9..f160a48e 100755 --- a/ric-infra/10-Nexus/bin/install +++ b/ric-infra/10-Nexus/bin/install @@ -32,11 +32,6 @@ if [ -z "$RICINFRA_NAMESPACE" ];then else NAMESPACE=$RICINFRA_NAMESPACE fi -if [ -z "$INGRESS_PORT" ];then - INGRESS_PORT_NEXUS=$ingress_port -else - INGRESS_PORT_NEXUS=$INGRESS_PORT -fi @@ -44,37 +39,22 @@ echo "Deploying nexus repo managers for local docker registry and helm repo." 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 @@ -84,38 +64,4 @@ fi -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 - -