Skip to content

Commit 30182e1

Browse files
authored
fix: use cli credentials for azcopy when downloading from private urls (#7496)
1 parent dba177d commit 30182e1

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

vhdbuilder/packer/install-dependencies.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ if [ -d "/var/log/azure/Microsoft.Azure.Extensions.CustomScript/events/" ] && [
746746
fi
747747
capture_benchmark "${SCRIPT_NAME}_configure_telemetry"
748748

749-
# download kubernetes package from the given URL using MSI for auth for azcopy
749+
# download kubernetes package from the given URL using azcopy
750750
# if it is a kube-proxy package, extract image from the downloaded package
751751
cacheKubePackageFromPrivateUrl() {
752752
local kube_private_binary_url="$1"
@@ -759,14 +759,15 @@ cacheKubePackageFromPrivateUrl() {
759759
local k8s_tgz_name
760760
k8s_tgz_name=$(echo "$kube_private_binary_url" | grep -o -P '(?<=\/kubernetes\/).*(?=\/binaries\/)').tar.gz
761761

762-
# use azcopy with MSI instead of curl to download packages
762+
# use azcopy instead of curl to download packages
763763
getAzCopyCurrentPath
764-
export AZCOPY_LOG_LOCATION="$(pwd)/azcopy-log-files/"
765-
export AZCOPY_JOB_PLAN_LOCATION="$(pwd)/azcopy-job-plan-files/"
766-
mkdir -p "${AZCOPY_LOG_LOCATION}"
767-
mkdir -p "${AZCOPY_JOB_PLAN_LOCATION}"
768764

769-
./azcopy login --login-type=MSI
765+
export AZCOPY_AUTO_LOGIN_TYPE="AZCLI"
766+
export AZCOPY_CONCURRENCY_VALUE="AUTO"
767+
export AZCOPY_LOG_LOCATION="$(pwd)/azcopy-log-files/"
768+
export AZCOPY_JOB_PLAN_LOCATION="$(pwd)/azcopy-job-plan-files/"
769+
mkdir -p "${AZCOPY_LOG_LOCATION}"
770+
mkdir -p "${AZCOPY_JOB_PLAN_LOCATION}"
770771

771772
cached_pkg="${K8S_PRIVATE_PACKAGES_CACHE_DIR}/${k8s_tgz_name}"
772773
echo "download private package ${kube_private_binary_url} and store as ${cached_pkg}"

0 commit comments

Comments
 (0)