Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = 'XClient'
} elseif (!$clusterGroup -or !$subscription) {
throw "clusterGroup and subscription parameters must be specified when deploying to an environment that is not pg or prod."
$subscription = 'Azure SDK Test Resources - TME'
$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'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: stress-test-addons
repository: https://stresstestcharts.blob.core.windows.net/helm/
version: 0.3.4
digest: sha256:e1d29df9556aaf06ee08fe1116695e6ce5396826b334b5c9d0f646da6599057f
generated: "2024-11-01T18:05:45.572311938-04:00"
version: 0.3.5
digest: sha256:dcd6dac1a3d519673a1e046ffe641ce93cc4c765d96700e45bd3484f874eff72
generated: "2025-01-23T13:58:31.820111797-05:00"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: stress-test-addons
repository: https://stresstestcharts.blob.core.windows.net/helm/
version: 0.3.4
digest: sha256:e1d29df9556aaf06ee08fe1116695e6ce5396826b334b5c9d0f646da6599057f
generated: "2024-11-01T18:07:35.664870135-04:00"
version: 0.3.5
digest: sha256:dcd6dac1a3d519673a1e046ffe641ce93cc4c765d96700e45bd3484f874eff72
generated: "2025-01-23T13:58:57.51122156-05:00"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: stress-test-addons
repository: https://stresstestcharts.blob.core.windows.net/helm/
version: 0.3.4
digest: sha256:e1d29df9556aaf06ee08fe1116695e6ce5396826b334b5c9d0f646da6599057f
generated: "2024-11-01T18:09:07.145743507-04:00"
version: 0.3.5
digest: sha256:dcd6dac1a3d519673a1e046ffe641ce93cc4c765d96700e45bd3484f874eff72
generated: "2025-01-23T13:59:04.10880951-05:00"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: stress-test-addons
repository: https://stresstestcharts.blob.core.windows.net/helm/
version: 0.3.4
digest: sha256:e1d29df9556aaf06ee08fe1116695e6ce5396826b334b5c9d0f646da6599057f
generated: "2024-11-01T18:07:17.501073902-04:00"
version: 0.3.5
digest: sha256:dcd6dac1a3d519673a1e046ffe641ce93cc4c765d96700e45bd3484f874eff72
generated: "2025-01-23T13:57:51.914457962-05:00"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: stress-test-addons
repository: https://stresstestcharts.blob.core.windows.net/helm/
version: 0.3.4
digest: sha256:e1d29df9556aaf06ee08fe1116695e6ce5396826b334b5c9d0f646da6599057f
generated: "2024-11-01T18:07:24.379723401-04:00"
version: 0.3.5
digest: sha256:dcd6dac1a3d519673a1e046ffe641ce93cc4c765d96700e45bd3484f874eff72
generated: "2025-01-23T13:58:47.99879152-05:00"
10 changes: 10 additions & 0 deletions tools/stress-cluster/cluster/azure/cluster/acr.bicep
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
param registryName string
param location string = resourceGroup().location
param objectIds array
param kubeletIdentityObjectId string
// Cluster may be in a tenant that does not include the ACR access groups
param skipAcrRoleAssignment bool

Expand Down Expand Up @@ -38,4 +39,13 @@ resource acrPullRole 'Microsoft.Authorization/roleAssignments@2020-04-01-preview
}
}]

resource acrKubeletPullRole 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = {
name: guid('azureContainerRegistryPullRole', kubeletIdentityObjectId, resourceGroup().id)
scope: registry
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7f951dda-4ed3-4680-a7ca-43fe172d538d')
principalId: kubeletIdentityObjectId
}
}

output containerRegistryName string = registry.name
5 changes: 3 additions & 2 deletions tools/stress-cluster/cluster/azure/cluster/cluster.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ param clusterName string
param location string = resourceGroup().location
param defaultAgentPoolMinNodes int = 6
param defaultAgentPoolMaxNodes int = 20
param defaultAgentPoolSku string = 'Standard_D8a_v4'
param defaultAgentPoolSku string
param systemAgentPoolSku string
param maintenanceWindowDay string = 'Monday'
// AKS does not allow agentPool updates via existing managed cluster resources
param updateNodes bool = false
Expand All @@ -23,7 +24,7 @@ var systemAgentPool = {
minCount: 1
maxCount: 4
mode: 'System'
vmSize: 'Standard_D4ds_v4'
vmSize: systemAgentPoolSku
type: 'VirtualMachineScaleSets'
osType: 'Linux'
enableAutoScaling: true
Expand Down
9 changes: 6 additions & 3 deletions tools/stress-cluster/cluster/azure/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ param clusterLocation string = 'westus3'
param monitoringLocation string = 'centralus'
param defaultAgentPoolMinNodes int = 6
param defaultAgentPoolMaxNodes int = 20
param defaultAgentPoolSku string = 'Standard_D8a_v4'
param defaultAgentPoolSku string = 'Standard_D8ads_v6'
param systemAgentPoolSku string = 'Standard_D4ads_v6'
param skipAcrRoleAssignment bool = false
param maintenanceWindowDay string = 'Monday'
param tags object
Expand Down Expand Up @@ -84,6 +85,7 @@ module cluster 'cluster/cluster.bicep' = {
defaultAgentPoolMinNodes: defaultAgentPoolMinNodes
defaultAgentPoolMaxNodes: defaultAgentPoolMaxNodes
defaultAgentPoolSku: defaultAgentPoolSku
systemAgentPoolSku: systemAgentPoolSku
maintenanceWindowDay: maintenanceWindowDay
tags: tags
groupSuffix: groupSuffix
Expand All @@ -97,8 +99,9 @@ module containerRegistry 'cluster/acr.bicep' = {
params: {
registryName: '${replace(clusterName, '-', '')}${resourceSuffix}'
location: clusterLocation
objectIds: concat(accessGroups, array(cluster.outputs.kubeletIdentityObjectId))
// Cluster may be in a tenant that does not include the ACR access groups
objectIds: accessGroups
kubeletIdentityObjectId: cluster.outputs.kubeletIdentityObjectId
// Cluster may be in a tenant that does not include the corp access groups
skipAcrRoleAssignment: skipAcrRoleAssignment
}
}
Expand Down
13 changes: 8 additions & 5 deletions tools/stress-cluster/cluster/azure/parameters/storage.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"contentVersion": "1.0.0.0",
"parameters": {
"subscriptionId": {
"value": "ba45b233-e2ef-4169-8808-49eb0d8eba0d"
"value": "4d042dc6-fe17-4698-a23f-ec6a8d1e98f4"
},
"groupSuffix": {
"value": "storage"
Expand All @@ -15,16 +15,19 @@
"value": "southcentralus"
},
"defaultAgentPoolMinNodes": {
"value": 5
"value": 1
},
"defaultAgentPoolMaxNodes": {
"value": 200
"value": 10
},
"skipAcrRoleAssignment": {
"value": true
},
"tags": {
"value": {
"environment": "storage",
"owners": "bebroder",
"purpose": "stress and load testing for storage SDKs - maintained by Azure SDK (devdiv)",
"owners": "bebroder,ripark",
"purpose": "stress and load testing for storage SDKs",
"DoNotDelete": ""
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependencies:
repository: https://charts.chaos-mesh.org
version: 2.6.3
- name: stress-test-addons
repository: file:///home/ben/azs/azure-sdk-tools/tools/stress-cluster/cluster/kubernetes/stress-test-addons
version: 0.3.4
digest: sha256:7ca87d5e4ce1b27a4bc0dbfa741a47739b0e343b7c2383c0e92b2dfaf4750a44
generated: "2024-11-01T18:04:13.42983041-04:00"
repository: https://stresstestcharts.blob.core.windows.net/helm/
version: 0.3.5
digest: sha256:711fbb59de71875ef437a50c222f7c17cf5c132033a63b05294f342c9ba183ee
generated: "2025-01-23T14:00:25.858193662-05:00"
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 0.3.5 (2025-01-23)

### Breaking Changes

Changed storage cluster config values (cluster subscription/tenant migration)

## 0.3.4 (2024-11-01)

### Breaking Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: stress-test-addons
description: Baseline resources and templates for stress testing clusters

version: 0.3.4
version: 0.3.5
appVersion: v0.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
apiVersion: v1
entries:
stress-test-addons:
- apiVersion: v2
appVersion: v0.1
created: "2025-01-23T13:56:16.608104834-05:00"
description: Baseline resources and templates for stress testing clusters
digest: 72a05ebbb40feecff4457cba1fd8274a2b72eee6e5ef4f5597c52435f27746eb
name: stress-test-addons
urls:
- https://stresstestcharts.blob.core.windows.net/helm/stress-test-addons-0.3.5.tgz
version: 0.3.5
- apiVersion: v2
appVersion: v0.1
created: "2024-11-01T18:04:40.435844341-04:00"
Expand Down Expand Up @@ -235,4 +244,4 @@ entries:
urls:
- https://stresstestcharts.blob.core.windows.net/helm/stress-test-addons-0.1.2.tgz
version: 0.1.2
generated: "2024-11-01T18:04:40.430027237-04:00"
generated: "2025-01-23T13:56:16.601581606-05:00"
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ appInsightsKeySecretName:
pg: appInsightsInstrumentationKey-s7b6dif73rup6
prod: appInsightsInstrumentationKey-2c6jtbqddf52a
dev: ""
storage: appInsightsInstrumentationKey-4okf44ko4zuos
storage: appInsightsInstrumentationKey-e27xlxyuvk34k
appInsightsConnectionStringSecretName:
pg: appInsightsConnectionString-s7b6dif73rup6
prod: appInsightsConnectionString-2c6jtbqddf52a
dev: ""
storage: appInsightsConnectionString-4okf44ko4zuos
storage: appInsightsConnectionString-e27xlxyuvk34k
debugStorageKeySecretName:
pg: debugStorageKey-s7b6dif73rup6
prod: debugStorageKey-2c6jtbqddf52a
dev: ""
storage: debugStorageKey-4okf44ko4zuos
storage: debugStorageKey-e27xlxyuvk34k
debugStorageAccountSecretName:
pg: debugStorageAccount-s7b6dif73rup6
prod: debugStorageAccount-2c6jtbqddf52a
dev: ""
storage: debugStorageAccount-4okf44ko4zuos
storage: debugStorageAccount-e27xlxyuvk34k
debugFileShareName:
pg: stressfiless7b6dif73rup6
prod: stressfiles2c6jtbqddf52a
dev: ""
storage: stressfiles4okf44ko4zuos
storage: stressfilese27xlxyuvk34k
staticTestSecretsKeyvaultName:
pg: stress-secrets-pg
prod: stress-secrets-prod
Expand All @@ -32,12 +32,12 @@ clusterTestSecretsKeyvaultName:
pg: stress-kv-s7b6dif73rup6
prod: stress-kv-2c6jtbqddf52a
dev: ""
storage: stress-kv-4okf44ko4zuos
storage: stress-kv-e27xlxyuvk34k
secretProviderIdentity:
pg: 0a7293d6-c5fa-47e7-a142-ef40bf6b6764
prod: d9a57c7a-5f79-4aff-90e7-4ebdb24b81e6
dev: ""
storage: 96ff1075-09d3-406b-a1ae-81a470dd803a
storage: 991949b1-6b69-4c93-aeb1-ab6fa4c545a0
provisionerAppId:
pg: e3fdf864-b936-4279-b787-55adc0f9984a
prod: 5d3c637e-07b7-4b29-83d9-87eb050dfdfb
Expand All @@ -51,26 +51,26 @@ infraWorkloadAppClientId:
pg: fb633f50-31c7-42af-9640-7651ab7cf69a
prod: 1b388c2c-1dc4-4456-a2a5-d5a4a5c7c4df
dev: ""
storage: 567c098d-734f-40d1-bacf-cba4c523f12c
storage: 99fa1a45-b7b0-40ed-bb97-69cea4326003
infraWorkloadAppObjectId:
pg: 135cb549-37ce-4379-8738-39b981753256
prod: 0dea7f23-e8fe-4dbc-9980-400480ca9966
dev: ""
storage: b31f8eda-395f-4950-97b8-864925bfb8a5
storage: 2a78a33d-851a-4d6f-a4c5-7b9e10248474
workloadAppClientNamePool:
pg: stress-app-workload-pg-0,stress-app-workload-pg-1,stress-app-workload-pg-2,stress-app-workload-pg-3,stress-app-workload-pg-4
prod: stress-app-workload-prod-0,stress-app-workload-prod-1,stress-app-workload-prod-2,stress-app-workload-prod-3,stress-app-workload-prod-4
dev:
dev:
storage: stress-app-workload-storage-0,stress-app-workload-storage-1,stress-app-workload-storage-2,stress-app-workload-storage-3,stress-app-workload-storage-4
workloadAppIssuer:
pg: https://westus3.oic.prod-aks.azure.com/72f988bf-86f1-41af-91ab-2d7cd011db47/c8b9b4a1-dee9-44e2-93d2-33fc5342ed26/
prod: https://westus2.oic.prod-aks.azure.com/70a036f6-8e4d-4615-bad6-149c02e7720d/3a180dd0-9ec9-490e-a0b1-03fdbbca5198/
dev:
storage: https://southcentralus.oic.prod-aks.azure.com/72f988bf-86f1-41af-91ab-2d7cd011db47/14f6afcc-b037-418e-b2c6-8d0726204adf/
dev:
storage: https://southcentralus.oic.prod-aks.azure.com/70a036f6-8e4d-4615-bad6-149c02e7720d/b5e7dc96-dee7-4765-bccc-c18a50ecfa13/
clusterGroup:
pg: rg-stress-cluster-pg
prod: rg-stress-cluster-prod
dev:
dev:
storage: rg-stress-cluster-storage
subscription:
pg: public
Expand All @@ -79,11 +79,11 @@ subscription:
subscriptionId:
pg: faa080af-c1d8-40ad-9cce-e1a450ca5b57
prod: 4d042dc6-fe17-4698-a23f-ec6a8d1e98f4
dev:
storage: ba45b233-e2ef-4169-8808-49eb0d8eba0d
dev:
storage: 4d042dc6-fe17-4698-a23f-ec6a8d1e98f4
tenantId:
pg: 72f988bf-86f1-41af-91ab-2d7cd011db47
prod: 70a036f6-8e4d-4615-bad6-149c02e7720d
dev: ""
storage: 72f988bf-86f1-41af-91ab-2d7cd011db47
storage: 70a036f6-8e4d-4615-bad6-149c02e7720d

2 changes: 1 addition & 1 deletion tools/stress-cluster/cluster/provision.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function main()
helm -h > $null
}

if ($Environment -NotIn "prod", "pg" -and !$LocalAddonsPath) {
if ($Environment -NotIn "prod", "pg", "storage" -and !$LocalAddonsPath) {
throw "When using a custom environment you must set -LocalAddonsPath to provide the stress-infrastructure release with environment values"
}

Expand Down
Loading