From d5bdf76ccd46d0f6db17da08bb65aaea1212715a Mon Sep 17 00:00:00 2001 From: Jan Egil Ring Date: Tue, 14 May 2024 11:05:05 +0200 Subject: [PATCH] Removed SAS token for VHD downloads Signed-off-by: Jan Egil Ring --- .../artifacts/ArcServersLogonScript.ps1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/azure_jumpstart_arcbox/artifacts/ArcServersLogonScript.ps1 b/azure_jumpstart_arcbox/artifacts/ArcServersLogonScript.ps1 index 4aed5eb96d..bb8f3e812e 100644 --- a/azure_jumpstart_arcbox/artifacts/ArcServersLogonScript.ps1 +++ b/azure_jumpstart_arcbox/artifacts/ArcServersLogonScript.ps1 @@ -13,8 +13,7 @@ $azureLocation = $env:azureLocation $resourceGroup = $env:resourceGroup # Moved VHD storage account details here to keep only in place to prevent duplicates. -$vhdSourceFolder = "https://jsvhds.blob.core.windows.net/arcbox" -$sas = "*?si=ArcBox-RL&spr=https&sv=2022-11-02&sr=c&sig=vg8VRjM00Ya%2FGa5izAq3b0axMpR4ylsLsQ8ap3BhrnA%3D" +$vhdSourceFolder = "https://jsvhds.blob.core.windows.net/arcbox/*" # Archive existing log file and create new one $logFilePath = "$Env:ArcBoxLogsDir\ArcServersLogonScript.log" @@ -184,7 +183,7 @@ if ($Env:flavor -ne "DevOps") { $Env:AZCOPY_BUFFER_GB = 4 # Other ArcBox flavors does not have an azcopy network throughput capping Write-Output "Downloading nested VMs VHDX file for SQL. This can take some time, hold tight..." - azcopy cp $vhdSourceFolder/$sas --include-pattern "${SQLvmName}.vhdx" $Env:ArcBoxVMDir --check-length=false --cap-mbps 1200 --log-level=ERROR + azcopy cp $vhdSourceFolder --include-pattern "${SQLvmName}.vhdx" $Env:ArcBoxVMDir --check-length=false --cap-mbps 1200 --log-level=ERROR } # Create the nested VMs if not already created @@ -337,12 +336,12 @@ if ($Env:flavor -ne "DevOps") { if ($Env:flavor -eq "Full") { # The "Full" ArcBox flavor has an azcopy network throughput capping Write-Output "Downloading nested VMs VHDX files. This can take some time, hold tight..." - azcopy cp $vhdSourceFolder/$sas $Env:ArcBoxVMDir --include-pattern "${Win2k19vmName}.vhdx;${Win2k22vmName}.vhdx;${Ubuntu01vmName}.vhdx;${Ubuntu02vmName}.vhdx;" --recursive=true --check-length=false --cap-mbps 1200 --log-level=ERROR + azcopy cp $vhdSourceFolder $Env:ArcBoxVMDir --include-pattern "${Win2k19vmName}.vhdx;${Win2k22vmName}.vhdx;${Ubuntu01vmName}.vhdx;${Ubuntu02vmName}.vhdx;" --recursive=true --check-length=false --cap-mbps 1200 --log-level=ERROR } else { # Other ArcBox flavors does not have an azcopy network throughput capping Write-Output "Downloading nested VMs VHDX files. This can take some time, hold tight..." - azcopy cp $vhdSourceFolder/$sas $Env:ArcBoxVMDir --include-pattern "${Win2k19vmName}.vhdx;${Win2k22vmName}.vhdx;${Ubuntu01vmName}.vhdx;${Ubuntu02vmName}.vhdx;" --recursive=true --check-length=false --log-level=ERROR + azcopy cp $vhdSourceFolder $Env:ArcBoxVMDir --include-pattern "${Win2k19vmName}.vhdx;${Win2k22vmName}.vhdx;${Ubuntu01vmName}.vhdx;${Ubuntu02vmName}.vhdx;" --recursive=true --check-length=false --log-level=ERROR } }