Skip to content

Commit

Permalink
Merge pull request #42 from wzx0z/fix-pkg-name
Browse files Browse the repository at this point in the history
Fix package not found issue
  • Loading branch information
BSWANG authored Sep 26, 2023
2 parents 20ed2a9 + 391e459 commit 36ffb7f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions scripts/ack-optimized-os-linux3-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,26 @@ setup_env() {
export RUNTIME_VERSION="1.5.10"
fi

export RELEASE_VERSION=$(echo $KUBE_VERSION | awk -F. '{print $1"."$2}')

export REGION=$(curl --retry 10 -sSL http://100.100.100.200/latest/meta-data/region-id)
export PKG_FILE_SERVER="http://aliacs-k8s-$REGION.oss-$REGION-internal.aliyuncs.com/$BETA_VERSION"
export ACK_OPTIMIZED_OS_BUILD=1
}


download_pkg() {
curl --retry 4 $PKG_FILE_SERVER/public/pkg/run/run-${KUBE_VERSION}.tar.gz -O
tar -xvf run-${KUBE_VERSION}.tar.gz
curl --retry 4 $PKG_FILE_SERVER/public/pkg/run/run-${RELEASE_VERSION}-linux-${OS_ARCH}.tar.gz -O
tar -xvf run-${RELEASE_VERSION}-linux-${OS_ARCH}.tar.gz
}


source_file() {
if [[ -e "pkg/run/$KUBE_VERSION/kubernetes.sh" ]]; then
source pkg/run/$KUBE_VERSION/kubernetes.sh --role source
if [[ -e "pkg/run/$RELEASE_VERSION/kubernetes.sh" ]]; then
source pkg/run/$RELEASE_VERSION/kubernetes.sh --role source
install_pkg
elif [[ -e "pkg/run/$KUBE_VERSION/bin/kubernetes.sh" ]]; then
ROLE=deploy-nodes pkg/run/$KUBE_VERSION/bin/kubernetes.sh
elif [[ -e "pkg/run/$RELEASE_VERSION/bin/kubernetes.sh" ]]; then
ROLE=deploy-nodes pkg/run/$RELEASE_VERSION/bin/kubernetes.sh
fi
}

Expand All @@ -76,7 +78,7 @@ install_pkg() {
preset_gpu() {
GPU_PACKAGE_URL=http://aliacs-k8s-${REGION}.oss-${REGION}-internal.aliyuncs.com/public/pkg
if [[ "$PRESET_GPU" == "true" ]]; then
bash -x pkg/run/$KUBE_VERSION/bin/nvidia-gpu-installer.sh --package-url-prefix ${GPU_PACKAGE_URL}
bash -x pkg/run/$RELEASE_VERSION/bin/nvidia-gpu-installer.sh --package-url-prefix ${GPU_PACKAGE_URL}
fi
}

Expand Down Expand Up @@ -239,4 +241,4 @@ main() {
record_k8s_version
}

main "$@"
main "$@"

0 comments on commit 36ffb7f

Please sign in to comment.