From a2c7b87559f37ce53d924d615b6e326af389860c Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Thu, 16 Jan 2025 15:54:08 -0500 Subject: [PATCH 1/2] Migrate stress storage cluster --- .../scripts/stress-testing/stress-test-deployment-lib.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 index 56876ba0e1be..8f19a1221b1a 100644 --- a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 +++ b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 @@ -127,7 +127,7 @@ function DeployStressTests( Write-Warning "Overriding cluster group and subscription with defaults for 'storage' environment." } $clusterGroup = 'rg-stress-cluster-storage' - $subscription = 'XClient' + $subscription = 'Azure SDK Test Resources - TME' } elseif (!$clusterGroup -or !$subscription) { throw "clusterGroup and subscription parameters must be specified when deploying to an environment that is not pg or prod." } From 14a3d7b9c5697a9cb65eec5b8a2cc519d8dfb25a Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Thu, 23 Jan 2025 17:03:18 -0500 Subject: [PATCH 2/2] Add tenant to stress deploy login --- .../scripts/stress-testing/deploy-stress-tests.ps1 | 1 + .../stress-testing/stress-test-deployment-lib.ps1 | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/eng/common/scripts/stress-testing/deploy-stress-tests.ps1 b/eng/common/scripts/stress-testing/deploy-stress-tests.ps1 index 61d8f947d800..76e0de20b7dd 100644 --- a/eng/common/scripts/stress-testing/deploy-stress-tests.ps1 +++ b/eng/common/scripts/stress-testing/deploy-stress-tests.ps1 @@ -10,6 +10,7 @@ param( [string]$DeployId, [switch]$SkipLogin, [string]$Subscription, + [string]$Tenant, # Default to true in Azure Pipelines environments [switch] $CI = ($null -ne $env:SYSTEM_TEAMPROJECTID), diff --git a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 index 8f19a1221b1a..498d4418fad9 100644 --- a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 +++ b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 @@ -43,12 +43,12 @@ function RunOrExitOnFailure() } } -function Login([string]$subscription, [string]$clusterGroup, [switch]$skipPushImages) +function Login([string]$subscription, [string]$tenant, [string]$clusterGroup, [switch]$skipPushImages) { Write-Host "Logging in to subscription, cluster and container registry" az account show -s "$subscription" *> $null if ($LASTEXITCODE) { - RunOrExitOnFailure az login --allow-no-subscriptions + RunOrExitOnFailure az login --allow-no-subscriptions --tenant $tenant } # Discover cluster name, only one cluster per group is expected @@ -116,24 +116,27 @@ function DeployStressTests( } $clusterGroup = 'rg-stress-cluster-pg' $subscription = 'Azure SDK Developer Playground' + $tenant = '72f988bf-86f1-41af-91ab-2d7cd011db47' } elseif ($environment -eq 'prod') { if ($clusterGroup -or $subscription) { Write-Warning "Overriding cluster group and subscription with defaults for 'prod' environment." } $clusterGroup = 'rg-stress-cluster-prod' $subscription = 'Azure SDK Test Resources - TME' + $tenant = '70a036f6-8e4d-4615-bad6-149c02e7720d' } elseif ($environment -eq 'storage') { if ($clusterGroup -or $subscription) { Write-Warning "Overriding cluster group and subscription with defaults for 'storage' environment." } $clusterGroup = 'rg-stress-cluster-storage' $subscription = 'Azure SDK Test Resources - TME' - } elseif (!$clusterGroup -or !$subscription) { - throw "clusterGroup and subscription parameters must be specified when deploying to an environment that is not pg or prod." + $tenant = '72f988bf-86f1-41af-91ab-2d7cd011db47' + } elseif (!$clusterGroup -or !$subscription -or $tenant) { + throw "-ClusterGroup, -Subscription and -Tenant parameters must be specified when deploying to an environment that is not pg or prod." } if (!$skipLogin) { - Login -subscription $subscription -clusterGroup $clusterGroup -skipPushImages:$skipPushImages + Login -subscription $subscription -tenant $tenant -clusterGroup $clusterGroup -skipPushImages:$skipPushImages } $chartRepoName = 'stress-test-charts'