From 543f359ae7523ca28f07c0c8bc3be93195bb2c90 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 12 Oct 2021 14:24:42 -0700 Subject: [PATCH 01/42] Add sdk/storage/perf.yml --- sdk/storage/perf.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sdk/storage/perf.yml diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml new file mode 100644 index 000000000000..f8227f4259a1 --- /dev/null +++ b/sdk/storage/perf.yml @@ -0,0 +1,28 @@ +variables: + NugetSecurityAnalysisWarningLevel: 'none' + skipComponentGovernanceDetection: 'true' + +pool: + name: "azsdk-pool-mms-ubuntu-2004-general" + vmImage: "MMSUbuntu20.04" + +resources: + repositories: + - repository: azure-sdk-tools + type: github + endpoint: Azure + name: Azure/azure-sdk-tools + +steps: + - checkout: self + - checkout: azure-sdk-tools + + - script: dotnet run -- run --help + displayName: Run perf tests + workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation + env: + AZURE_STORAGE_ACCOUNT_KEY: $(azure-storage-account-key) + AZURE_STORAGE_ACCOUNT_NAME: $(azure-storage-account-name) + AZURE_STORAGE_CONNECTION_STRING: $(azure-storage-connection-string) + STANDARD_STORAGE_CONNECTION_STRING: $(standard-storage-connection-string) + STORAGE_CONNECTION_STRING: $(storage-connection-string) From 0e644e610f305853c0a0e553ca45f894eb1690a9 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 12 Oct 2021 16:25:16 -0700 Subject: [PATCH 02/42] Checkout perf-automation branch --- sdk/storage/perf.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index f8227f4259a1..435b23e40b08 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -12,6 +12,7 @@ resources: type: github endpoint: Azure name: Azure/azure-sdk-tools + ref: perf-automation steps: - checkout: self From d1e1f912decff48dfbab6b5a8d5673a74cfe209e Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 12 Oct 2021 16:31:12 -0700 Subject: [PATCH 03/42] fetchDepth: 1 --- sdk/storage/perf.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index 435b23e40b08..f843355446e9 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -15,8 +15,10 @@ resources: ref: perf-automation steps: - - checkout: self + - checkout: self + fetchDepth: 1 - checkout: azure-sdk-tools + fetchDepth: 1 - script: dotnet run -- run --help displayName: Run perf tests From 9170731c1ffc32e88411655f2e54526f3d376c1a Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 12 Oct 2021 16:44:55 -0700 Subject: [PATCH 04/42] revert fetchDepth --- sdk/storage/perf.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index f843355446e9..42567887d09d 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -16,9 +16,7 @@ resources: steps: - checkout: self - fetchDepth: 1 - checkout: azure-sdk-tools - fetchDepth: 1 - script: dotnet run -- run --help displayName: Run perf tests From 91c130d25df94892a3ed866f5b22f4b505a9b316 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Wed, 13 Oct 2021 18:40:29 -0700 Subject: [PATCH 05/42] Create config.yml, run real tests --- sdk/storage/perf.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index 42567887d09d..05118bb41164 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -18,8 +18,13 @@ steps: - checkout: self - checkout: azure-sdk-tools - - script: dotnet run -- run --help - displayName: Run perf tests + - pwsh: | + set-content -path config.yml -value "WorkingDirectories:" + add-content -path config.yml -value " Python: $(Agent.BuildDirectory)/azure-sdk-for-python" + workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation + displayName: Create config.yml + + - script: dotnet run -- run --no-sync -l python -s "^storage-blob$" -t "^(download|upload|list-blobs)$" -a "warmup 0" workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation env: AZURE_STORAGE_ACCOUNT_KEY: $(azure-storage-account-key) @@ -27,3 +32,6 @@ steps: AZURE_STORAGE_CONNECTION_STRING: $(azure-storage-connection-string) STANDARD_STORAGE_CONNECTION_STRING: $(standard-storage-connection-string) STORAGE_CONNECTION_STRING: $(storage-connection-string) + displayName: Run perf tests + + # TODO: Add results.json to build artifacts \ No newline at end of file From 79e74562706f996f9187162c13b29ae86a86384d Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 26 Oct 2021 13:28:11 -0700 Subject: [PATCH 06/42] Use python3.7 --- sdk/storage/perf.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index 05118bb41164..35358dac3462 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -1,6 +1,7 @@ variables: NugetSecurityAnalysisWarningLevel: 'none' skipComponentGovernanceDetection: 'true' + PythonVersion: '3.7' pool: name: "azsdk-pool-mms-ubuntu-2004-general" @@ -18,6 +19,11 @@ steps: - checkout: self - checkout: azure-sdk-tools + - task: UsePythonVersion@0 + displayName: "Use Python $(PythonVersion)" + inputs: + versionSpec: $(PythonVersion) + - pwsh: | set-content -path config.yml -value "WorkingDirectories:" add-content -path config.yml -value " Python: $(Agent.BuildDirectory)/azure-sdk-for-python" From 1d2128ab9f807a4eb09e3bdf5f032119ddf56d7d Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 26 Oct 2021 18:12:11 -0700 Subject: [PATCH 07/42] Debug logging --- sdk/storage/perf.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index 35358dac3462..6ef2c6994bc2 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -24,6 +24,11 @@ steps: inputs: versionSpec: $(PythonVersion) + - script: | + echo $(Agent.BuildDirectory) + ls $(Agent.BuildDirectory) + ls $(Agent.BuildDirectory)/azure-sdk-for-python + - pwsh: | set-content -path config.yml -value "WorkingDirectories:" add-content -path config.yml -value " Python: $(Agent.BuildDirectory)/azure-sdk-for-python" From 1f444a2e88c4363b2f3484fa00bff5045fc70af0 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 26 Oct 2021 18:34:11 -0700 Subject: [PATCH 08/42] Fix build path --- sdk/storage/perf.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index 6ef2c6994bc2..ad37073732e0 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -24,14 +24,9 @@ steps: inputs: versionSpec: $(PythonVersion) - - script: | - echo $(Agent.BuildDirectory) - ls $(Agent.BuildDirectory) - ls $(Agent.BuildDirectory)/azure-sdk-for-python - - pwsh: | set-content -path config.yml -value "WorkingDirectories:" - add-content -path config.yml -value " Python: $(Agent.BuildDirectory)/azure-sdk-for-python" + add-content -path config.yml -value " Python: $(Agent.BuildDirectory)/s/azure-sdk-for-python" workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation displayName: Create config.yml From c7dde6965fd80239b6be3eff375e47cb2a589296 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Wed, 27 Oct 2021 16:44:44 -0700 Subject: [PATCH 09/42] Publish results.json --- sdk/storage/perf.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index ad37073732e0..675a30935316 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -2,6 +2,7 @@ variables: NugetSecurityAnalysisWarningLevel: 'none' skipComponentGovernanceDetection: 'true' PythonVersion: '3.7' + System.Debug: 'true' pool: name: "azsdk-pool-mms-ubuntu-2004-general" @@ -40,4 +41,7 @@ steps: STORAGE_CONNECTION_STRING: $(storage-connection-string) displayName: Run perf tests - # TODO: Add results.json to build artifacts \ No newline at end of file + - task: PublishPipelineArtifact@1 + inputs: + targetPath: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results + artifactName: results From 720a89a7bbdf796e26cb2b0ffdc6cd62b13d5485 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Wed, 27 Oct 2021 16:51:41 -0700 Subject: [PATCH 10/42] Run 5 iterations of real-world tests --- sdk/storage/perf.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index 675a30935316..2afa7c1e476b 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -31,7 +31,15 @@ steps: workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation displayName: Create config.yml - - script: dotnet run -- run --no-sync -l python -s "^storage-blob$" -t "^(download|upload|list-blobs)$" -a "warmup 0" + - script: >- + dotnet run -- run + --no-sync + -l python + -p source + -s "^storage-blob$" + -t "^(download|upload|list-blobs)$" + -a "(10240)|(10485760)|(5 )|(500 )" + -i 5 workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation env: AZURE_STORAGE_ACCOUNT_KEY: $(azure-storage-account-key) From ce7371a600194593254f24c75842010787b9ec06 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Thu, 28 Oct 2021 14:25:49 -0700 Subject: [PATCH 11/42] Run GA packages to compare to main --- sdk/storage/perf.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index 2afa7c1e476b..8933861294b3 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -35,7 +35,6 @@ steps: dotnet run -- run --no-sync -l python - -p source -s "^storage-blob$" -t "^(download|upload|list-blobs)$" -a "(10240)|(10485760)|(5 )|(500 )" From b741789aa705f97968cdcfe1eb1c62f43138652b Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Mon, 1 Nov 2021 17:21:56 -0700 Subject: [PATCH 12/42] Add ResourceType parameter to TestResources.ps1 scripts --- eng/common/TestResources/New-TestResources.ps1 | 16 ++++++++++------ .../TestResources/Remove-TestResources.ps1 | 8 ++++++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/eng/common/TestResources/New-TestResources.ps1 b/eng/common/TestResources/New-TestResources.ps1 index b0ab66ea95fa..8bf7431c3d34 100644 --- a/eng/common/TestResources/New-TestResources.ps1 +++ b/eng/common/TestResources/New-TestResources.ps1 @@ -63,6 +63,10 @@ param ( [ValidateSet('AzureCloud', 'AzureUSGovernment', 'AzureChinaCloud', 'Dogfood')] [string] $Environment = 'AzureCloud', + [Parameter()] + [ValidateSet('test', 'perf')] + [string] $ResourceType = 'test', + [Parameter()] [hashtable] $ArmTemplateParameters, @@ -223,7 +227,7 @@ function BuildBicepFile([System.IO.FileSystemInfo] $file) } $tmp = $env:TEMP ? $env:TEMP : [System.IO.Path]::GetTempPath() - $templateFilePath = Join-Path $tmp "test-resources.$(New-Guid).compiled.json" + $templateFilePath = Join-Path $tmp "$ResourceType-resources.$(New-Guid).compiled.json" # Az can deploy bicep files natively, but by compiling here it becomes easier to parse the # outputted json for mismatched parameter declarations. @@ -349,7 +353,7 @@ try { $root = [System.IO.Path]::Combine($repositoryRoot, "sdk", $ServiceDirectory) | Resolve-Path $templateFiles = @() - 'test-resources.json', 'test-resources.bicep' | ForEach-Object { + "$ResourceType-resources.json", "$ResourceType-resources.bicep" | ForEach-Object { Write-Verbose "Checking for '$_' files under '$root'" Get-ChildItem -Path $root -Filter "$_" -Recurse | ForEach-Object { Write-Verbose "Found template '$($_.FullName)'" @@ -584,9 +588,9 @@ try { # Service principals in the Microsoft AAD tenant must end with an @microsoft.com domain; those in other tenants # are not permitted to do so. Format the non-MS name so there's an assocation with the Azure SDK. if ($TenantId -eq '72f988bf-86f1-41af-91ab-2d7cd011db47') { - $displayName = "test-resources-$($baseName)$suffix.microsoft.com" + $displayName = "$ResourceType-resources-$($baseName)$suffix.microsoft.com" } else { - $displayName = "$($baseName)$suffix.test-resources.azure.sdk" + $displayName = "$($baseName)$suffix.$ResourceType-resources.azure.sdk" } $servicePrincipalWrapper = NewServicePrincipalWrapper -subscription $SubscriptionId -resourceGroup $ResourceGroupName -displayName $DisplayName @@ -703,7 +707,7 @@ try { } } - $preDeploymentScript = $templateFile.originalFilePath | Split-Path | Join-Path -ChildPath 'test-resources-pre.ps1' + $preDeploymentScript = $templateFile.originalFilePath | Split-Path | Join-Path -ChildPath "$ResourceType-resources-pre.ps1" if (Test-Path $preDeploymentScript) { Log "Invoking pre-deployment script '$preDeploymentScript'" &$preDeploymentScript -ResourceGroupName $ResourceGroupName @PSBoundParameters @@ -743,7 +747,7 @@ try { $deploymentOutputs = SetDeploymentOutputs $serviceName $context $deployment $templateFile - $postDeploymentScript = $templateFile.originalFilePath | Split-Path | Join-Path -ChildPath 'test-resources-post.ps1' + $postDeploymentScript = $templateFile.originalFilePath | Split-Path | Join-Path -ChildPath "$ResourceType-resources-post.ps1" if (Test-Path $postDeploymentScript) { Log "Invoking post-deployment script '$postDeploymentScript'" &$postDeploymentScript -ResourceGroupName $ResourceGroupName -DeploymentOutputs $deploymentOutputs @PSBoundParameters diff --git a/eng/common/TestResources/Remove-TestResources.ps1 b/eng/common/TestResources/Remove-TestResources.ps1 index a1bd773772e0..c915c331a111 100644 --- a/eng/common/TestResources/Remove-TestResources.ps1 +++ b/eng/common/TestResources/Remove-TestResources.ps1 @@ -52,6 +52,10 @@ param ( [Parameter(ParameterSetName = 'ResourceGroup+Provisioner')] [switch] $CI, + [Parameter()] + [ValidateSet('test', 'perf')] + [string] $ResourceType = 'test', + [Parameter()] [switch] $Force, @@ -194,7 +198,7 @@ Log "Selected subscription '$subscriptionName'" if ($ServiceDirectory) { $root = [System.IO.Path]::Combine("$PSScriptRoot/../../../sdk", $ServiceDirectory) | Resolve-Path - $preRemovalScript = Join-Path -Path $root -ChildPath 'remove-test-resources-pre.ps1' + $preRemovalScript = Join-Path -Path $root -ChildPath "remove-$ResourceType-resources-pre.ps1" if (Test-Path $preRemovalScript) { Log "Invoking pre resource removal script '$preRemovalScript'" @@ -206,7 +210,7 @@ if ($ServiceDirectory) { } # Make sure environment files from New-TestResources -OutFile are removed. - Get-ChildItem -Path $root -Filter test-resources.json.env -Recurse | Remove-Item -Force:$Force + Get-ChildItem -Path $root -Filter "$ResourceType-resources.json.env" -Recurse | Remove-Item -Force:$Force } $verifyDeleteScript = { From a63b537793dd1439592864aed2bab236aa0ac579 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Mon, 1 Nov 2021 17:22:02 -0700 Subject: [PATCH 13/42] Add perf-resources.json --- sdk/storage/perf-resources.json | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sdk/storage/perf-resources.json diff --git a/sdk/storage/perf-resources.json b/sdk/storage/perf-resources.json new file mode 100644 index 000000000000..31c1770f15b8 --- /dev/null +++ b/sdk/storage/perf-resources.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "type": "string" + } + }, + "variables": { + "mgmtApiVersion": "2019-04-01", + "blobAccountName": "[concat(parameters('baseName'), 'blob')]", + "location": "[resourceGroup().location]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('mgmtApiVersion')]", + "name": "[variables('blobAccountName')]", + "location": "[variables('location')]", + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + }, + "kind": "BlockBlobStorage" + } + ] +} From edae5831c507c9d17ec9a294f85a3f84a1560b2f Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 9 Nov 2021 13:50:15 -0800 Subject: [PATCH 14/42] Add ResourceType parameter --- eng/common/TestResources/deploy-test-resources.yml | 7 +++++++ eng/common/TestResources/remove-test-resources.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/eng/common/TestResources/deploy-test-resources.yml b/eng/common/TestResources/deploy-test-resources.yml index 7eeeda847fad..dd7aa207c762 100644 --- a/eng/common/TestResources/deploy-test-resources.yml +++ b/eng/common/TestResources/deploy-test-resources.yml @@ -4,6 +4,12 @@ parameters: DeleteAfterHours: 8 Location: '' SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + - name: ResourceType + type: string + default: test + values: + - test + - perf # SubscriptionConfiguration will be splatted into the parameters of the test # resources script. It should be JSON in the form: @@ -48,6 +54,7 @@ steps: # pass those in via the ArmTemplateParameters flag, and handle any # additional parameters from the pipelines via AdditionalParameters eng/common/TestResources/New-TestResources.ps1 ` + -ResourceType '${{ parameters.ResourceType }}' ` -BaseName 'Generated' ` -ServiceDirectory '${{ parameters.ServiceDirectory }}' ` -Location '${{ parameters.Location }}' ` diff --git a/eng/common/TestResources/remove-test-resources.yml b/eng/common/TestResources/remove-test-resources.yml index 6c02706d2202..a36bdbc1ffc0 100644 --- a/eng/common/TestResources/remove-test-resources.yml +++ b/eng/common/TestResources/remove-test-resources.yml @@ -4,6 +4,12 @@ parameters: ServiceDirectory: '' SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + - name: ResourceType + type: string + default: test + values: + - test + - perf # SubscriptionConfiguration will be splat into the parameters of the test # resources script. It should be JSON in the form: @@ -28,6 +34,7 @@ steps: "@ | ConvertFrom-Json -AsHashtable; eng/common/TestResources/Remove-TestResources.ps1 ` + -ResourceType '${{ parameters.ResourceType }}' ` @subscriptionConfiguration ` -ServiceDirectory "${{ parameters.ServiceDirectory }}" ` -CI ` From d8c25ba0b5f83fdf47a8cf59cabf13416034a631 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 9 Nov 2021 13:54:02 -0800 Subject: [PATCH 15/42] output env vars --- sdk/storage/perf-resources.json | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/sdk/storage/perf-resources.json b/sdk/storage/perf-resources.json index 31c1770f15b8..a159f93fcfa7 100644 --- a/sdk/storage/perf-resources.json +++ b/sdk/storage/perf-resources.json @@ -23,5 +23,27 @@ }, "kind": "BlockBlobStorage" } - ] + ], + "outputs": { + "AZURE_STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('blobAccountName')]" + }, + "AZURE_STORAGE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('blobAccountName')), variables('mgmtApiVersion')).keys[0].value]" + }, + "AZURE_STORAGE_CONNECTION_STRING": { + "type": "string", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('blobAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('blobAccountName')), variables('mgmtApiVersion')).keys[0].value)]" + }, + "STANDARD_STORAGE_CONNECTION_STRING": { + "type": "string", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('blobAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('blobAccountName')), variables('mgmtApiVersion')).keys[0].value)]" + }, + "STORAGE_CONNECTION_STRING": { + "type": "string", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('blobAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('blobAccountName')), variables('mgmtApiVersion')).keys[0].value)]" + } + } } From 0a04086c72614fc7a1ce80562ce8897d66a0623d Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 9 Nov 2021 13:55:42 -0800 Subject: [PATCH 16/42] Deploy test resources --- sdk/storage/perf.yml | 74 +++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 32 deletions(-) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index 8933861294b3..74fef437eb10 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -20,35 +20,45 @@ steps: - checkout: self - checkout: azure-sdk-tools - - task: UsePythonVersion@0 - displayName: "Use Python $(PythonVersion)" - inputs: - versionSpec: $(PythonVersion) - - - pwsh: | - set-content -path config.yml -value "WorkingDirectories:" - add-content -path config.yml -value " Python: $(Agent.BuildDirectory)/s/azure-sdk-for-python" - workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation - displayName: Create config.yml - - - script: >- - dotnet run -- run - --no-sync - -l python - -s "^storage-blob$" - -t "^(download|upload|list-blobs)$" - -a "(10240)|(10485760)|(5 )|(500 )" - -i 5 - workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation - env: - AZURE_STORAGE_ACCOUNT_KEY: $(azure-storage-account-key) - AZURE_STORAGE_ACCOUNT_NAME: $(azure-storage-account-name) - AZURE_STORAGE_CONNECTION_STRING: $(azure-storage-connection-string) - STANDARD_STORAGE_CONNECTION_STRING: $(standard-storage-connection-string) - STORAGE_CONNECTION_STRING: $(storage-connection-string) - displayName: Run perf tests - - - task: PublishPipelineArtifact@1 - inputs: - targetPath: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results - artifactName: results + - template: ../../../common/TestResources/deploy-test-resources.yml + parameters: + ServiceDirectory: storage + ResourceType: perf + + # - task: UsePythonVersion@0 + # displayName: "Use Python $(PythonVersion)" + # inputs: + # versionSpec: $(PythonVersion) + + # - pwsh: | + # set-content -path config.yml -value "WorkingDirectories:" + # add-content -path config.yml -value " Python: $(Agent.BuildDirectory)/s/azure-sdk-for-python" + # workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation + # displayName: Create config.yml + + # - script: >- + # dotnet run -- run + # --no-sync + # -l python + # -s "^storage-blob$" + # -t "^(download|upload|list-blobs)$" + # -a "(10240)|(10485760)|(5 )|(500 )" + # -i 5 + # workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation + # env: + # AZURE_STORAGE_ACCOUNT_KEY: $(azure-storage-account-key) + # AZURE_STORAGE_ACCOUNT_NAME: $(azure-storage-account-name) + # AZURE_STORAGE_CONNECTION_STRING: $(azure-storage-connection-string) + # STANDARD_STORAGE_CONNECTION_STRING: $(standard-storage-connection-string) + # STORAGE_CONNECTION_STRING: $(storage-connection-string) + # displayName: Run perf tests + + # - template: ../../../common/TestResources/remove-test-resources.yml + # parameters: + # ServiceDirectory: storage + # ResourceType: perf + + # - task: PublishPipelineArtifact@1 + # inputs: + # targetPath: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results + # artifactName: results From 33571ee8e4b38c3b64d306329494cf2469297ceb Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 9 Nov 2021 13:58:02 -0800 Subject: [PATCH 17/42] Fix template path --- sdk/storage/perf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index 74fef437eb10..9bcaa2442aea 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -20,7 +20,7 @@ steps: - checkout: self - checkout: azure-sdk-tools - - template: ../../../common/TestResources/deploy-test-resources.yml + - template: ../../common/TestResources/deploy-test-resources.yml parameters: ServiceDirectory: storage ResourceType: perf @@ -53,7 +53,7 @@ steps: # STORAGE_CONNECTION_STRING: $(storage-connection-string) # displayName: Run perf tests - # - template: ../../../common/TestResources/remove-test-resources.yml + # - template: ../../common/TestResources/remove-test-resources.yml # parameters: # ServiceDirectory: storage # ResourceType: perf From 94c65912b0740b5cb1517a587eedf04d7d0ab944 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 9 Nov 2021 14:00:43 -0800 Subject: [PATCH 18/42] Fix template path --- sdk/storage/perf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index 9bcaa2442aea..39e10e5aaa3b 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -20,7 +20,7 @@ steps: - checkout: self - checkout: azure-sdk-tools - - template: ../../common/TestResources/deploy-test-resources.yml + - template: ../../eng/common/TestResources/deploy-test-resources.yml parameters: ServiceDirectory: storage ResourceType: perf @@ -53,7 +53,7 @@ steps: # STORAGE_CONNECTION_STRING: $(storage-connection-string) # displayName: Run perf tests - # - template: ../../common/TestResources/remove-test-resources.yml + # - template: ../../eng/common/TestResources/remove-test-resources.yml # parameters: # ServiceDirectory: storage # ResourceType: perf From 2541cdb8cf8d5040a426f1559a86d49c4d80635d Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 9 Nov 2021 14:28:02 -0800 Subject: [PATCH 19/42] Fix parameter list --- eng/common/TestResources/deploy-test-resources.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/common/TestResources/deploy-test-resources.yml b/eng/common/TestResources/deploy-test-resources.yml index dd7aa207c762..99f52d979d79 100644 --- a/eng/common/TestResources/deploy-test-resources.yml +++ b/eng/common/TestResources/deploy-test-resources.yml @@ -4,12 +4,12 @@ parameters: DeleteAfterHours: 8 Location: '' SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - - name: ResourceType - type: string - default: test - values: - - test - - perf +- name: ResourceType + type: string + default: test + values: + - test + - perf # SubscriptionConfiguration will be splatted into the parameters of the test # resources script. It should be JSON in the form: From 9653fad1624c193018a30c523287d164a8a635e0 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Thu, 11 Nov 2021 13:29:50 -0800 Subject: [PATCH 20/42] Fix yaml parameter definitions --- eng/common/TestResources/deploy-test-resources.yml | 7 +------ eng/common/TestResources/remove-test-resources.yml | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/eng/common/TestResources/deploy-test-resources.yml b/eng/common/TestResources/deploy-test-resources.yml index 99f52d979d79..b34ce2838ac9 100644 --- a/eng/common/TestResources/deploy-test-resources.yml +++ b/eng/common/TestResources/deploy-test-resources.yml @@ -4,12 +4,7 @@ parameters: DeleteAfterHours: 8 Location: '' SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) -- name: ResourceType - type: string - default: test - values: - - test - - perf + ResourceType: test # SubscriptionConfiguration will be splatted into the parameters of the test # resources script. It should be JSON in the form: diff --git a/eng/common/TestResources/remove-test-resources.yml b/eng/common/TestResources/remove-test-resources.yml index a36bdbc1ffc0..0dfd11b689e7 100644 --- a/eng/common/TestResources/remove-test-resources.yml +++ b/eng/common/TestResources/remove-test-resources.yml @@ -4,12 +4,7 @@ parameters: ServiceDirectory: '' SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - - name: ResourceType - type: string - default: test - values: - - test - - perf + ResourceType: test # SubscriptionConfiguration will be splat into the parameters of the test # resources script. It should be JSON in the form: From 686ca756e7a8f93a545a341eb84f7f0c23f2780a Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Thu, 11 Nov 2021 13:50:56 -0800 Subject: [PATCH 21/42] Fix path to PSModule-Helpers.ps1 --- eng/common/pipelines/templates/steps/cache-ps-modules.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/pipelines/templates/steps/cache-ps-modules.yml b/eng/common/pipelines/templates/steps/cache-ps-modules.yml index ac136803164f..fcbc45614068 100644 --- a/eng/common/pipelines/templates/steps/cache-ps-modules.yml +++ b/eng/common/pipelines/templates/steps/cache-ps-modules.yml @@ -1,6 +1,6 @@ steps: - pwsh: | - . ./eng/common/scripts/Helpers/PSModule-Helpers.ps1 + . ../../../scripts/Helpers/PSModule-Helpers.ps1 Write-Host "##vso[task.setvariable variable=CachedPSModulePath]$global:CurrentUserModulePath" displayName: Set PS Modules Cache Directory # Containers should bake modules into the image to save on pipeline time From b94d4d308e0faf05656d0561162e4714b32cb3af Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Thu, 11 Nov 2021 14:20:27 -0800 Subject: [PATCH 22/42] Revert path change --- eng/common/pipelines/templates/steps/cache-ps-modules.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/pipelines/templates/steps/cache-ps-modules.yml b/eng/common/pipelines/templates/steps/cache-ps-modules.yml index fcbc45614068..ac136803164f 100644 --- a/eng/common/pipelines/templates/steps/cache-ps-modules.yml +++ b/eng/common/pipelines/templates/steps/cache-ps-modules.yml @@ -1,6 +1,6 @@ steps: - pwsh: | - . ../../../scripts/Helpers/PSModule-Helpers.ps1 + . ./eng/common/scripts/Helpers/PSModule-Helpers.ps1 Write-Host "##vso[task.setvariable variable=CachedPSModulePath]$global:CurrentUserModulePath" displayName: Set PS Modules Cache Directory # Containers should bake modules into the image to save on pipeline time From 82d348c7f99ff7d7b9258a3fd9e1f7f4efd35783 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Thu, 11 Nov 2021 14:20:36 -0800 Subject: [PATCH 23/42] Change checkout paths --- sdk/storage/perf.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index 39e10e5aaa3b..275cffb5782b 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -18,7 +18,10 @@ resources: steps: - checkout: self + path: s + - checkout: azure-sdk-tools + path: s/azure-sdk-tools - template: ../../eng/common/TestResources/deploy-test-resources.yml parameters: From 7829eac64f06f35639a50b34878af98620053b34 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Thu, 11 Nov 2021 14:58:08 -0800 Subject: [PATCH 24/42] Run tests and remove test resources --- sdk/storage/perf.yml | 66 ++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index 275cffb5782b..fd428ffaa680 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -28,40 +28,40 @@ steps: ServiceDirectory: storage ResourceType: perf - # - task: UsePythonVersion@0 - # displayName: "Use Python $(PythonVersion)" - # inputs: - # versionSpec: $(PythonVersion) + - task: UsePythonVersion@0 + displayName: "Use Python $(PythonVersion)" + inputs: + versionSpec: $(PythonVersion) - # - pwsh: | - # set-content -path config.yml -value "WorkingDirectories:" - # add-content -path config.yml -value " Python: $(Agent.BuildDirectory)/s/azure-sdk-for-python" - # workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation - # displayName: Create config.yml + - pwsh: | + set-content -path config.yml -value "WorkingDirectories:" + add-content -path config.yml -value " Python: $(Agent.BuildDirectory)/s" + workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation + displayName: Create config.yml - # - script: >- - # dotnet run -- run - # --no-sync - # -l python - # -s "^storage-blob$" - # -t "^(download|upload|list-blobs)$" - # -a "(10240)|(10485760)|(5 )|(500 )" - # -i 5 - # workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation - # env: - # AZURE_STORAGE_ACCOUNT_KEY: $(azure-storage-account-key) - # AZURE_STORAGE_ACCOUNT_NAME: $(azure-storage-account-name) - # AZURE_STORAGE_CONNECTION_STRING: $(azure-storage-connection-string) - # STANDARD_STORAGE_CONNECTION_STRING: $(standard-storage-connection-string) - # STORAGE_CONNECTION_STRING: $(storage-connection-string) - # displayName: Run perf tests + - script: >- + dotnet run -- run + --no-sync + -l python + -s "^storage-blob$" + -t "^(download|upload|list-blobs)$" + -a "(10240)|(10485760)|(5 )|(500 )" + -i 5 + workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation + env: + AZURE_STORAGE_ACCOUNT_KEY: $(azure-storage-account-key) + AZURE_STORAGE_ACCOUNT_NAME: $(azure-storage-account-name) + AZURE_STORAGE_CONNECTION_STRING: $(azure-storage-connection-string) + STANDARD_STORAGE_CONNECTION_STRING: $(standard-storage-connection-string) + STORAGE_CONNECTION_STRING: $(storage-connection-string) + displayName: Run perf tests - # - template: ../../eng/common/TestResources/remove-test-resources.yml - # parameters: - # ServiceDirectory: storage - # ResourceType: perf + - template: ../../eng/common/TestResources/remove-test-resources.yml + parameters: + ServiceDirectory: storage + ResourceType: perf - # - task: PublishPipelineArtifact@1 - # inputs: - # targetPath: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results - # artifactName: results + - task: PublishPipelineArtifact@1 + inputs: + targetPath: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results + artifactName: results From 02ba340659f71f08a4957a1482fbee8f6b3adc9f Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 12 Nov 2021 16:38:56 -0800 Subject: [PATCH 25/42] Use dedicated perf agent pool --- sdk/storage/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index fd428ffaa680..3a5a20212aa2 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -5,7 +5,7 @@ variables: System.Debug: 'true' pool: - name: "azsdk-pool-mms-ubuntu-2004-general" + name: "azsdk-pool-mms-ubuntu-2004-perf" vmImage: "MMSUbuntu20.04" resources: From 92edf2f62857d11fc6be4161777eee077aeec5a5 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 7 Dec 2021 15:15:07 -0800 Subject: [PATCH 26/42] Revert System.Debug --- sdk/storage/perf.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index 3a5a20212aa2..1e2a5ce77f18 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -2,7 +2,6 @@ variables: NugetSecurityAnalysisWarningLevel: 'none' skipComponentGovernanceDetection: 'true' PythonVersion: '3.7' - System.Debug: 'true' pool: name: "azsdk-pool-mms-ubuntu-2004-perf" From 9104fdd252f93d8625f15da2082004d4dd99b145 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 7 Dec 2021 15:15:40 -0800 Subject: [PATCH 27/42] Print results --- sdk/storage/perf.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml index 1e2a5ce77f18..563f946ba5d8 100644 --- a/sdk/storage/perf.yml +++ b/sdk/storage/perf.yml @@ -55,6 +55,12 @@ steps: STORAGE_CONNECTION_STRING: $(storage-connection-string) displayName: Run perf tests + - pwsh: | + get-content results.csv + get-content results.json + workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results + displayName: Print results + - template: ../../eng/common/TestResources/remove-test-resources.yml parameters: ServiceDirectory: storage From cd6230df329480d1ee6da5365374caac5549383d Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 24 May 2022 22:28:18 -0700 Subject: [PATCH 28/42] Update eng/common --- eng/common/TestResources/deploy-test-resources.yml | 1 - eng/common/TestResources/remove-test-resources.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/common/TestResources/deploy-test-resources.yml b/eng/common/TestResources/deploy-test-resources.yml index b34ce2838ac9..a0c68f33a3c1 100644 --- a/eng/common/TestResources/deploy-test-resources.yml +++ b/eng/common/TestResources/deploy-test-resources.yml @@ -50,7 +50,6 @@ steps: # additional parameters from the pipelines via AdditionalParameters eng/common/TestResources/New-TestResources.ps1 ` -ResourceType '${{ parameters.ResourceType }}' ` - -BaseName 'Generated' ` -ServiceDirectory '${{ parameters.ServiceDirectory }}' ` -Location '${{ parameters.Location }}' ` -DeleteAfterHours '${{ parameters.DeleteAfterHours }}' ` diff --git a/eng/common/TestResources/remove-test-resources.yml b/eng/common/TestResources/remove-test-resources.yml index c22e8609e96a..9675f58e06e1 100644 --- a/eng/common/TestResources/remove-test-resources.yml +++ b/eng/common/TestResources/remove-test-resources.yml @@ -29,8 +29,8 @@ steps: "@ | ConvertFrom-Json -AsHashtable; eng/common/TestResources/Remove-TestResources.ps1 ` - -ResourceType '${{ parameters.ResourceType }}' ` @subscriptionConfiguration ` + -ResourceType '${{ parameters.ResourceType }}' ` -ServiceDirectory "${{ parameters.ServiceDirectory }}" ` -CI ` -Force ` From 6bb810cbf87c8b1839503d698e85e348c6a5a8a3 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 24 May 2022 22:32:38 -0700 Subject: [PATCH 29/42] Remove JSON resources --- sdk/storage/perf-resources.json | 49 --------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 sdk/storage/perf-resources.json diff --git a/sdk/storage/perf-resources.json b/sdk/storage/perf-resources.json deleted file mode 100644 index a159f93fcfa7..000000000000 --- a/sdk/storage/perf-resources.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "baseName": { - "type": "string" - } - }, - "variables": { - "mgmtApiVersion": "2019-04-01", - "blobAccountName": "[concat(parameters('baseName'), 'blob')]", - "location": "[resourceGroup().location]" - }, - "resources": [ - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "[variables('mgmtApiVersion')]", - "name": "[variables('blobAccountName')]", - "location": "[variables('location')]", - "sku": { - "name": "Premium_LRS", - "tier": "Premium" - }, - "kind": "BlockBlobStorage" - } - ], - "outputs": { - "AZURE_STORAGE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('blobAccountName')]" - }, - "AZURE_STORAGE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('blobAccountName')), variables('mgmtApiVersion')).keys[0].value]" - }, - "AZURE_STORAGE_CONNECTION_STRING": { - "type": "string", - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('blobAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('blobAccountName')), variables('mgmtApiVersion')).keys[0].value)]" - }, - "STANDARD_STORAGE_CONNECTION_STRING": { - "type": "string", - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('blobAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('blobAccountName')), variables('mgmtApiVersion')).keys[0].value)]" - }, - "STORAGE_CONNECTION_STRING": { - "type": "string", - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('blobAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('blobAccountName')), variables('mgmtApiVersion')).keys[0].value)]" - } - } -} From 46665921946b2e221dcf3555b0604ebd4f775abb Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 24 May 2022 22:32:49 -0700 Subject: [PATCH 30/42] Add perf template --- eng/pipelines/templates/jobs/perf.yml | 111 ++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 eng/pipelines/templates/jobs/perf.yml diff --git a/eng/pipelines/templates/jobs/perf.yml b/eng/pipelines/templates/jobs/perf.yml new file mode 100644 index 000000000000..5b033ddcaa05 --- /dev/null +++ b/eng/pipelines/templates/jobs/perf.yml @@ -0,0 +1,111 @@ +parameters: + - name: serviceDirectory + type: string + default: '' + - name: services + type: string + default: '' + - name: packageVersions + type: string + default: '.*' + - name: tests + type: string + default: '' + - name: arguments + type: string + default: '' + - name: iterations + type: number + default: '5' + - name: envVars + type: object + default: {} + - name: additionalArguments + type: string + default: '' + +variables: + - name: NugetSecurityAnalysisWarningLevel + value: 'none' + - name: skipComponentGovernanceDetection + value: 'true' + - name: DisableDockerDetector + value: 'true' + - name: Pool + value: 'azsdk-pool-mms-ubuntu-2004-perf' + - name: OSVmImage + value: 'MMSUbuntu20.04' + +resources: + repositories: + - repository: azure-sdk-tools + type: github + endpoint: Azure + name: Azure/azure-sdk-tools + ref: perf-automation + +jobs: +- job: Perf + timeoutInMinutes: 360 + pool: + name: $(Pool) + vmImage: $(OSVmImage) + steps: + - checkout: self + path: s + + - checkout: azure-sdk-tools + path: s/azure-sdk-tools + + - template: /eng/common/pipelines/templates/steps/verify-agent-os.yml + parameters: + AgentImage: $(OSVmImage) + + - task: UsePythonVersion@0 + displayName: "Use Python $(PythonVersion)" + inputs: + versionSpec: $(PythonVersion) + + - template: ../../../common/TestResources/deploy-test-resources.yml + parameters: + ServiceDirectory: ${{ parameters.serviceDirectory }} + Location: westus + ResourceType: perf + + - pwsh: | + set-content -path config.yml -value "WorkingDirectories:" + add-content -path config.yml -value " Python: $(Agent.BuildDirectory)/s" + workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation + displayName: Create config.yml + + - script: >- + dotnet run -- run + --no-sync + --languages python + --services "${{ parameters.services }}" + --package-versions "${{ parameters.packageVersions }}" + --tests "${{ parameters.tests }}" + --arguments "${{ parameters.arguments }}" + --iterations ${{ parameters.iterations }} + ${{ parameters.additionalArguments }} + workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation + env: + ${{ each var in parameters.EnvVars }}: + ${{ var.key }}: ${{ var.value }} + displayName: Run perf tests + + - pwsh: | + get-content results.csv + get-content results.json + workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results + displayName: Print results + + - template: ../../../common/TestResources/remove-test-resources.yml + parameters: + ServiceDirectory: ${{ parameters.serviceDirectory }} + ResourceType: perf + + - task: PublishPipelineArtifact@1 + inputs: + targetPath: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results + artifactName: results From 6456b0204d529aea8156f3be6e45f6fe5ae7b1b2 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 24 May 2022 22:34:37 -0700 Subject: [PATCH 31/42] Add pipeline for storage-blob --- .../azure-storage-blob/perf-resources.bicep | 21 ++++++++++++ sdk/storage/azure-storage-blob/perf.yml | 32 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 sdk/storage/azure-storage-blob/perf-resources.bicep create mode 100644 sdk/storage/azure-storage-blob/perf.yml diff --git a/sdk/storage/azure-storage-blob/perf-resources.bicep b/sdk/storage/azure-storage-blob/perf-resources.bicep new file mode 100644 index 000000000000..f05d353d7452 --- /dev/null +++ b/sdk/storage/azure-storage-blob/perf-resources.bicep @@ -0,0 +1,21 @@ +param baseName string = resourceGroup().name +param location string = resourceGroup().location + +resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' = { + name: '${baseName}blob' + location: location + kind: 'BlockBlobStorage' + sku: { + name: 'Premium_LRS' + } +} + +var name = storageAccount.name +var key = storageAccount.listKeys().keys[0].value +var connectionString = 'DefaultEndpointsProtocol=https;AccountName=${name};AccountKey=${key}' + +output AZURE_STORAGE_ACCOUNT_NAME string = name +output AZURE_STORAGE_ACCOUNT_KEY string = key +output AZURE_STORAGE_CONNECTION_STRING string = connectionString +output STANDARD_STORAGE_CONNECTION_STRING string = connectionString +output STORAGE_CONNECTION_STRING string = connectionString diff --git a/sdk/storage/azure-storage-blob/perf.yml b/sdk/storage/azure-storage-blob/perf.yml new file mode 100644 index 000000000000..711dc21c33fa --- /dev/null +++ b/sdk/storage/azure-storage-blob/perf.yml @@ -0,0 +1,32 @@ +parameters: + - name: packageVersions + displayName: PackageVersions (regex of package versions to run) + type: string + default: '12.10.0|source' + - name: tests + displayName: Tests (regex of tests to run) + type: string + default: '^(download|upload|list-blobs)$' + - name: arguments + displayName: Arguments (regex of arguments to run) + type: string + default: '(10240)|(10485760)|(1073741824)|(5 )|(500 )|(50000 )' + - name: iterations + displayName: Iterations (times to run each test) + type: number + default: '5' + - name: additionalArguments + displayName: AdditionalArguments (passed to PerfAutomation) + type: string + default: ' ' + +extends: + template: ../../../eng/pipelines/templates/jobs/perf.yml + parameters: + serviceDirectory: storage/azure-storage-blob + services: "^storage-blob$" + packageVersions: ${{ parameters.packageVersions }} + tests: ${{ parameters.tests }} + arguments: ${{ parameters.arguments }} + iterations: ${{ parameters.iterations }} + additionalArguments: ${{ parameters.additionalArguments }} From 6e34f4a4947b9614830dbf9a17f62e9d8c6d36a3 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Wed, 25 May 2022 22:10:01 -0700 Subject: [PATCH 32/42] Set PythonVersion to 3.7 --- eng/pipelines/templates/jobs/perf.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/templates/jobs/perf.yml b/eng/pipelines/templates/jobs/perf.yml index 5b033ddcaa05..b8f7659b403f 100644 --- a/eng/pipelines/templates/jobs/perf.yml +++ b/eng/pipelines/templates/jobs/perf.yml @@ -35,6 +35,8 @@ variables: value: 'azsdk-pool-mms-ubuntu-2004-perf' - name: OSVmImage value: 'MMSUbuntu20.04' + - name: PythonVersion + value: '3.7' resources: repositories: @@ -61,10 +63,10 @@ jobs: parameters: AgentImage: $(OSVmImage) - - task: UsePythonVersion@0 - displayName: "Use Python $(PythonVersion)" - inputs: - versionSpec: $(PythonVersion) + - task: UsePythonVersion@0 + displayName: "Use Python $(PythonVersion)" + inputs: + versionSpec: $(PythonVersion) - template: ../../../common/TestResources/deploy-test-resources.yml parameters: From 9d7fc0c76ae0c6d50bdb15f1819efa4c23e15f73 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Wed, 25 May 2022 22:11:32 -0700 Subject: [PATCH 33/42] Fix indentation --- eng/pipelines/templates/jobs/perf.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/templates/jobs/perf.yml b/eng/pipelines/templates/jobs/perf.yml index b8f7659b403f..70b89ab08596 100644 --- a/eng/pipelines/templates/jobs/perf.yml +++ b/eng/pipelines/templates/jobs/perf.yml @@ -63,10 +63,10 @@ jobs: parameters: AgentImage: $(OSVmImage) - - task: UsePythonVersion@0 - displayName: "Use Python $(PythonVersion)" - inputs: - versionSpec: $(PythonVersion) + - task: UsePythonVersion@0 + displayName: "Use Python $(PythonVersion)" + inputs: + versionSpec: $(PythonVersion) - template: ../../../common/TestResources/deploy-test-resources.yml parameters: From 077a9a48240d9d343e6467b050ad553e069be6b7 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Wed, 25 May 2022 22:18:43 -0700 Subject: [PATCH 34/42] Add pipeline for file-share --- .../perf-resources.bicep | 30 +++++++++++++++++ sdk/storage/azure-storage-file-share/perf.yml | 32 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 sdk/storage/azure-storage-file-share/perf-resources.bicep create mode 100644 sdk/storage/azure-storage-file-share/perf.yml diff --git a/sdk/storage/azure-storage-file-share/perf-resources.bicep b/sdk/storage/azure-storage-file-share/perf-resources.bicep new file mode 100644 index 000000000000..11f55970ffd1 --- /dev/null +++ b/sdk/storage/azure-storage-file-share/perf-resources.bicep @@ -0,0 +1,30 @@ +param baseName string = resourceGroup().name +param location string = resourceGroup().location + +resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' = { + name: '${baseName}files' + location: location + kind: 'FileStorage' + sku: { + name: 'Premium_LRS' + } + + resource service 'fileServices' = { + name: 'default' + properties: { + shareDeleteRetentionPolicy: { + enabled: false + } + } + } +} + +var name = storageAccount.name +var key = storageAccount.listKeys().keys[0].value +var connectionString = 'DefaultEndpointsProtocol=https;AccountName=${name};AccountKey=${key}' + +output AZURE_STORAGE_ACCOUNT_NAME string = name +output AZURE_STORAGE_ACCOUNT_KEY string = key +output AZURE_STORAGE_CONNECTION_STRING string = connectionString +output STANDARD_STORAGE_CONNECTION_STRING string = connectionString +output STORAGE_CONNECTION_STRING string = connectionString diff --git a/sdk/storage/azure-storage-file-share/perf.yml b/sdk/storage/azure-storage-file-share/perf.yml new file mode 100644 index 000000000000..c3f0e950e553 --- /dev/null +++ b/sdk/storage/azure-storage-file-share/perf.yml @@ -0,0 +1,32 @@ +parameters: + - name: packageVersions + displayName: PackageVersions (regex of package versions to run) + type: string + default: '12.7.0|source' + - name: tests + displayName: Tests (regex of tests to run) + type: string + default: '^(download|upload)$' + - name: arguments + displayName: Arguments (regex of arguments to run) + type: string + default: '(10240)|(10485760)|(1073741824)' + - name: iterations + displayName: Iterations (times to run each test) + type: number + default: '5' + - name: additionalArguments + displayName: AdditionalArguments (passed to PerfAutomation) + type: string + default: ' ' + +extends: + template: ../../../eng/pipelines/templates/jobs/perf.yml + parameters: + serviceDirectory: storage/azure-storage-file-share + services: "^storage-file-share$" + packageVersions: ${{ parameters.packageVersions }} + tests: ${{ parameters.tests }} + arguments: ${{ parameters.arguments }} + iterations: ${{ parameters.iterations }} + additionalArguments: ${{ parameters.additionalArguments }} From f1a01cc73184b79955196107e0522af463f3a38d Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Wed, 25 May 2022 23:53:32 -0700 Subject: [PATCH 35/42] Remove old perf pipeline --- sdk/storage/perf.yml | 72 ---- sdk/storage/test-resources.json | 615 -------------------------------- 2 files changed, 687 deletions(-) delete mode 100644 sdk/storage/perf.yml delete mode 100644 sdk/storage/test-resources.json diff --git a/sdk/storage/perf.yml b/sdk/storage/perf.yml deleted file mode 100644 index 563f946ba5d8..000000000000 --- a/sdk/storage/perf.yml +++ /dev/null @@ -1,72 +0,0 @@ -variables: - NugetSecurityAnalysisWarningLevel: 'none' - skipComponentGovernanceDetection: 'true' - PythonVersion: '3.7' - -pool: - name: "azsdk-pool-mms-ubuntu-2004-perf" - vmImage: "MMSUbuntu20.04" - -resources: - repositories: - - repository: azure-sdk-tools - type: github - endpoint: Azure - name: Azure/azure-sdk-tools - ref: perf-automation - -steps: - - checkout: self - path: s - - - checkout: azure-sdk-tools - path: s/azure-sdk-tools - - - template: ../../eng/common/TestResources/deploy-test-resources.yml - parameters: - ServiceDirectory: storage - ResourceType: perf - - - task: UsePythonVersion@0 - displayName: "Use Python $(PythonVersion)" - inputs: - versionSpec: $(PythonVersion) - - - pwsh: | - set-content -path config.yml -value "WorkingDirectories:" - add-content -path config.yml -value " Python: $(Agent.BuildDirectory)/s" - workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation - displayName: Create config.yml - - - script: >- - dotnet run -- run - --no-sync - -l python - -s "^storage-blob$" - -t "^(download|upload|list-blobs)$" - -a "(10240)|(10485760)|(5 )|(500 )" - -i 5 - workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation - env: - AZURE_STORAGE_ACCOUNT_KEY: $(azure-storage-account-key) - AZURE_STORAGE_ACCOUNT_NAME: $(azure-storage-account-name) - AZURE_STORAGE_CONNECTION_STRING: $(azure-storage-connection-string) - STANDARD_STORAGE_CONNECTION_STRING: $(standard-storage-connection-string) - STORAGE_CONNECTION_STRING: $(storage-connection-string) - displayName: Run perf tests - - - pwsh: | - get-content results.csv - get-content results.json - workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results - displayName: Print results - - - template: ../../eng/common/TestResources/remove-test-resources.yml - parameters: - ServiceDirectory: storage - ResourceType: perf - - - task: PublishPipelineArtifact@1 - inputs: - targetPath: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results - artifactName: results diff --git a/sdk/storage/test-resources.json b/sdk/storage/test-resources.json deleted file mode 100644 index a7a45f2c4da6..000000000000 --- a/sdk/storage/test-resources.json +++ /dev/null @@ -1,615 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "baseName": { - "type": "String" - }, - "endpointSuffix": { - "type": "string", - "defaultValue": "core.windows.net" - }, - "tenantId": { - "type": "string", - "defaultValue": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "metadata": { - "description": "The tenant ID to which the application and resources belong." - } - }, - "testApplicationOid": { - "type": "string", - "metadata": { - "description": "The principal to assign the role to. This is application object id." - } - } - }, - "variables": { - "storageApiVersion": "2019-06-01", - "keyVaultApiVersion": "2016-10-01", - "authorizationApiVersion": "2018-09-01-preview", - "blobDataContributorRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/ba92f5b4-2d11-453d-a403-e96b0029c9fe')]", - "contributorRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "blobDataOwnerRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/b7e6dc6d-f1e8-4753-8033-0f276bb0955b')]", - "primaryAccountName": "[concat('prim', parameters('baseName'))]", - "secondaryAccountName": "[concat('sec', parameters('baseName'))]", - "softDeleteAccountName": "[concat('sftdl', parameters('baseName'))]", - "premiumAccountName": "[concat('prem', parameters('baseName'))]", - "versionedAccountName": "[concat('ver', parameters('baseName'))]", - "dataLakeAccountName": "[concat('dtlk', parameters('baseName'))]", - "dataLakeSoftDeleteAccountName": "[concat('dtlksd', parameters('baseName'))]", - "premiumFileAccountName": "[concat('premf', parameters('baseName'))]", - "keyvaultName": "[concat(parameters('baseName'), 'kvlt')]", - "azureKeyVaultUrl": "[format('https://{0}.vault.azure.net', variables('keyvaultName'))]", - "location": "[resourceGroup().location]", - "resourceGroupName": "[resourceGroup().name]", - "subscriptionId": "[subscription().subscriptionId]" - }, - "resources": [ - { - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "[variables('authorizationApiVersion')]", - "name": "[guid(concat('dataContributorRoleId', variables('primaryAccountName')))]", - "dependsOn": [ - "[variables('primaryAccountName')]" - ], - "properties": { - "roleDefinitionId": "[variables('blobDataContributorRoleId')]", - "principalId": "[parameters('testApplicationOid')]" - } - }, - { - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "[variables('authorizationApiVersion')]", - "name": "[guid(concat('contributorRoleId', variables('primaryAccountName')))]", - "dependsOn": [ - "[variables('primaryAccountName')]" - ], - "properties": { - "roleDefinitionId": "[variables('contributorRoleId')]", - "principalId": "[parameters('testApplicationOid')]" - } - }, - { - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "[variables('authorizationApiVersion')]", - "name": "[guid(concat('blobDataOwnerRoleId', variables('primaryAccountName')))]", - "dependsOn": [ - "[variables('primaryAccountName')]" - ], - "properties": { - "roleDefinitionId": "[variables('blobDataOwnerRoleId')]", - "principalId": "[parameters('testApplicationOid')]" - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[variables('primaryAccountName')]", - "location": "[variables('location')]", - "sku": { - "name": "Standard_RAGRS", - "tier": "Standard" - }, - "kind": "StorageV2", - "properties": { - "networkAcls": { - "bypass": "AzureServices", - "virtualNetworkRules": [], - "ipRules": [], - "defaultAction": "Allow" - }, - "supportsHttpsTrafficOnly": true, - "encryption": { - "services": { - "file": { - "enabled": true - }, - "blob": { - "enabled": true - } - }, - "keySource": "Microsoft.Storage" - }, - "accessTier": "Hot" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[concat(variables('primaryAccountName'), '/default')]", - "properties": { - "containerDeleteRetentionPolicy": { - "enabled": true, - "days": 1 - } - }, - "dependsOn": [ - "[variables('primaryAccountName')]" - ] - }, - { - "type": "Microsoft.Storage/storageAccounts/fileServices", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[concat(variables('primaryAccountName'), '/default')]", - "properties": { - "shareDeleteRetentionPolicy": { - "enabled": true, - "days": 1 - } - }, - "dependsOn": [ - "[variables('primaryAccountName')]" - ] - }, - { - "type": "Microsoft.Storage/storageAccounts/encryptionScopes", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[concat(variables('primaryAccountName'), '/testscope1')]", - "properties": { - }, - "dependsOn": [ - "[variables('primaryAccountName')]" - ] - }, - { - "type": "Microsoft.Storage/storageAccounts/encryptionScopes", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[concat(variables('primaryAccountName'), '/testscope2')]", - "properties": { - }, - "dependsOn": [ - "[variables('primaryAccountName')]" - ] - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[variables('secondaryAccountName')]", - "location": "[variables('location')]", - "sku": { - "name": "Standard_RAGRS", - "tier": "Standard" - }, - "kind": "StorageV2", - "properties": { - "networkAcls": { - "bypass": "AzureServices", - "virtualNetworkRules": [], - "ipRules": [], - "defaultAction": "Allow" - }, - "supportsHttpsTrafficOnly": true, - "encryption": { - "services": { - "file": { - "enabled": true - }, - "blob": { - "enabled": true - } - }, - "keySource": "Microsoft.Storage" - }, - "accessTier": "Hot" - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[variables('softDeleteAccountName')]", - "location": "[variables('location')]", - "sku": { - "name": "Standard_RAGRS", - "tier": "Standard" - }, - "kind": "StorageV2", - "properties": { - "networkAcls": { - "bypass": "AzureServices", - "virtualNetworkRules": [], - "ipRules": [], - "defaultAction": "Allow" - }, - "supportsHttpsTrafficOnly": true, - "encryption": { - "services": { - "file": { - "enabled": true - }, - "blob": { - "enabled": true - } - }, - "keySource": "Microsoft.Storage" - }, - "accessTier": "Hot" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[concat(variables('softDeleteAccountName'), '/default')]", - "properties": { - "deleteRetentionPolicy": { - "enabled": true, - "days": 1 - }, - "containerDeleteRetentionPolicy": { - "enabled": true, - "days": 1 - } - }, - "dependsOn": [ - "[variables('softDeleteAccountName')]" - ] - }, - { - "type": "Microsoft.Storage/storageAccounts/fileServices", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[concat(variables('softDeleteAccountName'), '/default')]", - "properties": { - "shareDeleteRetentionPolicy": { - "enabled": true, - "days": 1 - } - }, - "dependsOn": [ - "[variables('softDeleteAccountName')]" - ] - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[variables('premiumAccountName')]", - "location": "[variables('location')]", - "sku": { - "name": "Premium_LRS", - "tier": "Premium" - }, - "kind": "StorageV2", - "properties": { - "networkAcls": { - "bypass": "AzureServices", - "virtualNetworkRules": [], - "ipRules": [], - "defaultAction": "Allow" - }, - "supportsHttpsTrafficOnly": true, - "encryption": { - "services": { - "file": { - "enabled": true - }, - "blob": { - "enabled": true - } - }, - "keySource": "Microsoft.Storage" - }, - "accessTier": "Hot" - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[variables('versionedAccountName')]", - "location": "[variables('location')]", - "sku": { - "name": "Standard_RAGRS", - "tier": "Standard" - }, - "kind": "StorageV2", - "properties": { - "networkAcls": { - "bypass": "AzureServices", - "virtualNetworkRules": [], - "ipRules": [], - "defaultAction": "Allow" - }, - "supportsHttpsTrafficOnly": true, - "encryption": { - "services": { - "file": { - "enabled": true - }, - "blob": { - "enabled": true - } - }, - "keySource": "Microsoft.Storage" - }, - "accessTier": "Hot" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[concat(variables('versionedAccountName'), '/default')]", - "properties": { - "isVersioningEnabled": true - }, - "dependsOn": [ - "[variables('versionedAccountName')]" - ] - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[variables('dataLakeAccountName')]", - "location": "[variables('location')]", - "sku": { - "name": "Standard_RAGRS", - "tier": "Standard" - }, - "kind": "StorageV2", - "properties": { - "isHnsEnabled": true, - "networkAcls": { - "bypass": "AzureServices", - "virtualNetworkRules": [], - "ipRules": [], - "defaultAction": "Allow" - }, - "supportsHttpsTrafficOnly": true, - "encryption": { - "services": { - "file": { - "enabled": true - }, - "blob": { - "enabled": true - } - }, - "keySource": "Microsoft.Storage" - }, - "accessTier": "Hot" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[concat(variables('dataLakeAccountName'), '/default')]", - "properties": { - "containerDeleteRetentionPolicy": { - "enabled": true, - "days": 1 - } - }, - "dependsOn": [ - "[variables('dataLakeAccountName')]" - ] - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[variables('dataLakeSoftDeleteAccountName')]", - "location": "[variables('location')]", - "sku": { - "name": "Standard_RAGRS", - "tier": "Standard" - }, - "kind": "StorageV2", - "properties": { - "isHnsEnabled": true, - "networkAcls": { - "bypass": "AzureServices", - "virtualNetworkRules": [], - "ipRules": [], - "defaultAction": "Allow" - }, - "supportsHttpsTrafficOnly": true, - "encryption": { - "services": { - "file": { - "enabled": true - }, - "blob": { - "enabled": true - } - }, - "keySource": "Microsoft.Storage" - }, - "accessTier": "Hot" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[concat(variables('dataLakeSoftDeleteAccountName'), '/default')]", - "properties": { - "containerDeleteRetentionPolicy": { - "enabled": true, - "days": 1 - } - }, - "dependsOn": [ - "[variables('dataLakeSoftDeleteAccountName')]" - ] - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[variables('premiumFileAccountName')]", - "location": "[variables('location')]", - "sku": { - "name": "Premium_LRS", - "tier": "Premium" - }, - "kind": "FileStorage", - "properties": { - "networkAcls": { - "bypass": "AzureServices", - "virtualNetworkRules": [], - "ipRules": [], - "defaultAction": "Allow" - }, - "supportsHttpsTrafficOnly": true, - "encryption": { - "services": { - "file": { - "enabled": true - } - }, - "keySource": "Microsoft.Storage" - } - } - }, - { - "type": "Microsoft.KeyVault/vaults", - "apiVersion": "[variables('keyvaultApiVersion')]", - "name": "[variables('keyvaultName')]", - "location": "[variables('location')]", - "properties": { - "sku": { - "family": "A", - "name": "premium" - }, - "tenantId": "[parameters('tenantId')]", - "accessPolicies": [ - { - "tenantId": "[parameters('tenantId')]", - "objectId": "[parameters('testApplicationOid')]", - "permissions": { - "keys": [ - "get", - "list", - "update", - "create", - "import", - "delete", - "recover", - "backup", - "restore", - "decrypt", - "encrypt", - "unwrapKey", - "wrapKey", - "verify", - "sign", - "purge" - ], - "secrets": [ - "get", - "list", - "set", - "delete", - "recover", - "backup", - "restore", - "purge" - ], - "certificates": [ - "get", - "list", - "update", - "create", - "import", - "delete", - "recover", - "backup", - "restore", - "managecontacts", - "manageissuers", - "getissuers", - "listissuers", - "setissuers", - "deleteissuers", - "purge" - ] - } - } - ], - "enabledForDeployment": false, - "enabledForDiskEncryption": false, - "enabledForTemplateDeployment": false, - "enableSoftDelete": false - } - } - ], - "outputs": { - "STORAGE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('primaryAccountName')]" - }, - "STORAGE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('primaryAccountName')), variables('storageApiVersion')).keys[0].value]" - }, - "SECONDARY_STORAGE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('secondaryAccountName')]" - }, - "SECONDARY_STORAGE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('secondaryAccountName')), variables('storageApiVersion')).keys[0].value]" - }, - "SOFT_DELETE_STORAGE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('softDeleteAccountName')]" - }, - "SOFT_DELETE_STORAGE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('softDeleteAccountName')), variables('storageApiVersion')).keys[0].value]" - }, - "BLOB_STORAGE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('secondaryAccountName')]" - }, - "BLOB_STORAGE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('secondaryAccountName')), variables('storageApiVersion')).keys[0].value]" - }, - "PREMIUM_STORAGE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('premiumAccountName')]" - }, - "PREMIUM_STORAGE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('premiumAccountName')), variables('storageApiVersion')).keys[0].value]" - }, - "VERSIONED_STORAGE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('versionedAccountName')]" - }, - "VERSIONED_STORAGE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('versionedAccountName')), variables('storageApiVersion')).keys[0].value]" - }, - "PREMIUM_STORAGE_FILE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('premiumFileAccountName')]" - }, - "PREMIUM_STORAGE_FILE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('premiumFileAccountName')), variables('storageApiVersion')).keys[0].value]" - }, - "DATALAKE_STORAGE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('dataLakeAccountName')]" - }, - "DATALAKE_STORAGE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('dataLakeAccountName')), variables('storageApiVersion')).keys[0].value]" - }, - "STORAGE_DATA_LAKE_SOFT_DELETE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('dataLakeSoftDeleteAccountName')]" - }, - "STORAGE_DATA_LAKE_SOFT_DELETE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('dataLakeSoftDeleteAccountName')), variables('storageApiVersion')).keys[0].value]" - }, - "KEYVAULT_URL":{ - "type": "string", - "value": "[variables('azureKeyVaultUrl')]" - }, - "STORAGE_RESOURCE_GROUP_NAME": { - "type": "string", - "value": "[variables('resourceGroupName')]" - }, - "STORAGE_SUBSCRIPTION_ID": { - "type": "string", - "value": "[variables('subscriptionId')]" - } - } -} From f5dba207360ea60aea9a3b129c07459ddebe2e1c Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Thu, 26 May 2022 00:00:02 -0700 Subject: [PATCH 36/42] Add pipeline for datalake --- .../perf-resources.bicep | 28 ++++++++++++++++ .../azure-storage-file-datalake/perf.yml | 32 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 sdk/storage/azure-storage-file-datalake/perf-resources.bicep create mode 100644 sdk/storage/azure-storage-file-datalake/perf.yml diff --git a/sdk/storage/azure-storage-file-datalake/perf-resources.bicep b/sdk/storage/azure-storage-file-datalake/perf-resources.bicep new file mode 100644 index 000000000000..5e8f3d0267c7 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/perf-resources.bicep @@ -0,0 +1,28 @@ +param baseName string = resourceGroup().name +param location string = resourceGroup().location + +resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' = { + name: '${baseName}dlake' + location: location + kind: 'BlockBlobStorage' + sku: { + name: 'Premium_LRS' + } + properties: { + isHnsEnabled: true + } +} + +var name = storageAccount.name +var key = storageAccount.listKeys().keys[0].value +var connectionString = 'DefaultEndpointsProtocol=https;AccountName=${name};AccountKey=${key}' + +// .NET +output DATALAKE_STORAGE_ACCOUNT_NAME string = name +output DATALAKE_STORAGE_ACCOUNT_KEY string = key + +// Java, JS +output STORAGE_CONNECTION_STRING string = connectionString + +// Python +output AZURE_STORAGE_CONNECTION_STRING string = connectionString diff --git a/sdk/storage/azure-storage-file-datalake/perf.yml b/sdk/storage/azure-storage-file-datalake/perf.yml new file mode 100644 index 000000000000..0aeedb76d6b9 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/perf.yml @@ -0,0 +1,32 @@ +parameters: + - name: packageVersions + displayName: PackageVersions (regex of package versions to run) + type: string + default: '12.6.0|source' + - name: tests + displayName: Tests (regex of tests to run) + type: string + default: '^(download|upload)$' + - name: arguments + displayName: Arguments (regex of arguments to run) + type: string + default: '(10240)|(10485760)|(1073741824)' + - name: iterations + displayName: Iterations (times to run each test) + type: number + default: '5' + - name: additionalArguments + displayName: AdditionalArguments (passed to PerfAutomation) + type: string + default: ' ' + +extends: + template: ../../../eng/pipelines/templates/jobs/perf.yml + parameters: + serviceDirectory: storage/azure-storage-file-datalake + services: "^storage-file-datalake$" + packageVersions: ${{ parameters.packageVersions }} + tests: ${{ parameters.tests }} + arguments: ${{ parameters.arguments }} + iterations: ${{ parameters.iterations }} + additionalArguments: ${{ parameters.additionalArguments }} From 8623511445bc2309f1ba9a51cfb6dbb43d7ca5b0 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 7 Jun 2022 15:18:11 -0700 Subject: [PATCH 37/42] Update default package versions --- sdk/storage/azure-storage-blob/perf.yml | 2 +- sdk/storage/azure-storage-file-datalake/perf.yml | 2 +- sdk/storage/azure-storage-file-share/perf.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/storage/azure-storage-blob/perf.yml b/sdk/storage/azure-storage-blob/perf.yml index 711dc21c33fa..1bf6a35c589c 100644 --- a/sdk/storage/azure-storage-blob/perf.yml +++ b/sdk/storage/azure-storage-blob/perf.yml @@ -2,7 +2,7 @@ parameters: - name: packageVersions displayName: PackageVersions (regex of package versions to run) type: string - default: '12.10.0|source' + default: '12|source' - name: tests displayName: Tests (regex of tests to run) type: string diff --git a/sdk/storage/azure-storage-file-datalake/perf.yml b/sdk/storage/azure-storage-file-datalake/perf.yml index 0aeedb76d6b9..3c3a91fbf1fd 100644 --- a/sdk/storage/azure-storage-file-datalake/perf.yml +++ b/sdk/storage/azure-storage-file-datalake/perf.yml @@ -2,7 +2,7 @@ parameters: - name: packageVersions displayName: PackageVersions (regex of package versions to run) type: string - default: '12.6.0|source' + default: '12|source' - name: tests displayName: Tests (regex of tests to run) type: string diff --git a/sdk/storage/azure-storage-file-share/perf.yml b/sdk/storage/azure-storage-file-share/perf.yml index c3f0e950e553..5d6431d35bc1 100644 --- a/sdk/storage/azure-storage-file-share/perf.yml +++ b/sdk/storage/azure-storage-file-share/perf.yml @@ -2,7 +2,7 @@ parameters: - name: packageVersions displayName: PackageVersions (regex of package versions to run) type: string - default: '12.7.0|source' + default: '12|source' - name: tests displayName: Tests (regex of tests to run) type: string From df2b4b2280678fda74834a496302a358e7c1e4d8 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Mon, 13 Jun 2022 14:18:35 -0700 Subject: [PATCH 38/42] Print results.csv and results.json separately - Improve perf when viewing results.csv in browser --- eng/pipelines/templates/jobs/perf.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/perf.yml b/eng/pipelines/templates/jobs/perf.yml index 70b89ab08596..f57d6ba50825 100644 --- a/eng/pipelines/templates/jobs/perf.yml +++ b/eng/pipelines/templates/jobs/perf.yml @@ -98,9 +98,13 @@ jobs: - pwsh: | get-content results.csv + workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results + displayName: Print results.csv + + - pwsh: | get-content results.json workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results - displayName: Print results + displayName: Print results.json - template: ../../../common/TestResources/remove-test-resources.yml parameters: From 91cc8bcc7f3fce4cd77e02e4f9d998d95a6cd1b9 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Thu, 16 Jun 2022 13:00:14 -0700 Subject: [PATCH 39/42] Add EndpointSuffix to connection string --- sdk/storage/azure-storage-file-datalake/perf-resources.bicep | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-file-datalake/perf-resources.bicep b/sdk/storage/azure-storage-file-datalake/perf-resources.bicep index 5e8f3d0267c7..9434e55ce6ba 100644 --- a/sdk/storage/azure-storage-file-datalake/perf-resources.bicep +++ b/sdk/storage/azure-storage-file-datalake/perf-resources.bicep @@ -15,7 +15,9 @@ resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' = { var name = storageAccount.name var key = storageAccount.listKeys().keys[0].value -var connectionString = 'DefaultEndpointsProtocol=https;AccountName=${name};AccountKey=${key}' + +// EndpointSuffix is required by azure-storage-file-datalake 12.7.0 and earlier (fixed in #24779) +var connectionString = 'DefaultEndpointsProtocol=https;AccountName=${name};AccountKey=${key};EndpointSuffix=core.windows.net' // .NET output DATALAKE_STORAGE_ACCOUNT_NAME string = name From f14da8cf7a8e4edee0f5802e5a9a9393529c48b2 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 17 Jun 2022 00:51:07 -0700 Subject: [PATCH 40/42] Use main branch of azure-sdk-tools --- eng/pipelines/templates/jobs/perf.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/perf.yml b/eng/pipelines/templates/jobs/perf.yml index f57d6ba50825..ece4cecf1532 100644 --- a/eng/pipelines/templates/jobs/perf.yml +++ b/eng/pipelines/templates/jobs/perf.yml @@ -44,7 +44,6 @@ resources: type: github endpoint: Azure name: Azure/azure-sdk-tools - ref: perf-automation jobs: - job: Perf From 1911d8aa773a458121188ac324225ab1ff776966 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 17 Jun 2022 00:57:14 -0700 Subject: [PATCH 41/42] Restore sdk/storage/test-resources.json --- sdk/storage/test-resources.json | 615 ++++++++++++++++++++++++++++++++ 1 file changed, 615 insertions(+) create mode 100644 sdk/storage/test-resources.json diff --git a/sdk/storage/test-resources.json b/sdk/storage/test-resources.json new file mode 100644 index 000000000000..a7a45f2c4da6 --- /dev/null +++ b/sdk/storage/test-resources.json @@ -0,0 +1,615 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "type": "String" + }, + "endpointSuffix": { + "type": "string", + "defaultValue": "core.windows.net" + }, + "tenantId": { + "type": "string", + "defaultValue": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "metadata": { + "description": "The tenant ID to which the application and resources belong." + } + }, + "testApplicationOid": { + "type": "string", + "metadata": { + "description": "The principal to assign the role to. This is application object id." + } + } + }, + "variables": { + "storageApiVersion": "2019-06-01", + "keyVaultApiVersion": "2016-10-01", + "authorizationApiVersion": "2018-09-01-preview", + "blobDataContributorRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/ba92f5b4-2d11-453d-a403-e96b0029c9fe')]", + "contributorRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c')]", + "blobDataOwnerRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/b7e6dc6d-f1e8-4753-8033-0f276bb0955b')]", + "primaryAccountName": "[concat('prim', parameters('baseName'))]", + "secondaryAccountName": "[concat('sec', parameters('baseName'))]", + "softDeleteAccountName": "[concat('sftdl', parameters('baseName'))]", + "premiumAccountName": "[concat('prem', parameters('baseName'))]", + "versionedAccountName": "[concat('ver', parameters('baseName'))]", + "dataLakeAccountName": "[concat('dtlk', parameters('baseName'))]", + "dataLakeSoftDeleteAccountName": "[concat('dtlksd', parameters('baseName'))]", + "premiumFileAccountName": "[concat('premf', parameters('baseName'))]", + "keyvaultName": "[concat(parameters('baseName'), 'kvlt')]", + "azureKeyVaultUrl": "[format('https://{0}.vault.azure.net', variables('keyvaultName'))]", + "location": "[resourceGroup().location]", + "resourceGroupName": "[resourceGroup().name]", + "subscriptionId": "[subscription().subscriptionId]" + }, + "resources": [ + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "[variables('authorizationApiVersion')]", + "name": "[guid(concat('dataContributorRoleId', variables('primaryAccountName')))]", + "dependsOn": [ + "[variables('primaryAccountName')]" + ], + "properties": { + "roleDefinitionId": "[variables('blobDataContributorRoleId')]", + "principalId": "[parameters('testApplicationOid')]" + } + }, + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "[variables('authorizationApiVersion')]", + "name": "[guid(concat('contributorRoleId', variables('primaryAccountName')))]", + "dependsOn": [ + "[variables('primaryAccountName')]" + ], + "properties": { + "roleDefinitionId": "[variables('contributorRoleId')]", + "principalId": "[parameters('testApplicationOid')]" + } + }, + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "[variables('authorizationApiVersion')]", + "name": "[guid(concat('blobDataOwnerRoleId', variables('primaryAccountName')))]", + "dependsOn": [ + "[variables('primaryAccountName')]" + ], + "properties": { + "roleDefinitionId": "[variables('blobDataOwnerRoleId')]", + "principalId": "[parameters('testApplicationOid')]" + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[variables('primaryAccountName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "enabled": true + }, + "blob": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "accessTier": "Hot" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[concat(variables('primaryAccountName'), '/default')]", + "properties": { + "containerDeleteRetentionPolicy": { + "enabled": true, + "days": 1 + } + }, + "dependsOn": [ + "[variables('primaryAccountName')]" + ] + }, + { + "type": "Microsoft.Storage/storageAccounts/fileServices", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[concat(variables('primaryAccountName'), '/default')]", + "properties": { + "shareDeleteRetentionPolicy": { + "enabled": true, + "days": 1 + } + }, + "dependsOn": [ + "[variables('primaryAccountName')]" + ] + }, + { + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[concat(variables('primaryAccountName'), '/testscope1')]", + "properties": { + }, + "dependsOn": [ + "[variables('primaryAccountName')]" + ] + }, + { + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[concat(variables('primaryAccountName'), '/testscope2')]", + "properties": { + }, + "dependsOn": [ + "[variables('primaryAccountName')]" + ] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[variables('secondaryAccountName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "enabled": true + }, + "blob": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "accessTier": "Hot" + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[variables('softDeleteAccountName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "enabled": true + }, + "blob": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "accessTier": "Hot" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[concat(variables('softDeleteAccountName'), '/default')]", + "properties": { + "deleteRetentionPolicy": { + "enabled": true, + "days": 1 + }, + "containerDeleteRetentionPolicy": { + "enabled": true, + "days": 1 + } + }, + "dependsOn": [ + "[variables('softDeleteAccountName')]" + ] + }, + { + "type": "Microsoft.Storage/storageAccounts/fileServices", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[concat(variables('softDeleteAccountName'), '/default')]", + "properties": { + "shareDeleteRetentionPolicy": { + "enabled": true, + "days": 1 + } + }, + "dependsOn": [ + "[variables('softDeleteAccountName')]" + ] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[variables('premiumAccountName')]", + "location": "[variables('location')]", + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + }, + "kind": "StorageV2", + "properties": { + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "enabled": true + }, + "blob": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "accessTier": "Hot" + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[variables('versionedAccountName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "enabled": true + }, + "blob": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "accessTier": "Hot" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[concat(variables('versionedAccountName'), '/default')]", + "properties": { + "isVersioningEnabled": true + }, + "dependsOn": [ + "[variables('versionedAccountName')]" + ] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[variables('dataLakeAccountName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "isHnsEnabled": true, + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "enabled": true + }, + "blob": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "accessTier": "Hot" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[concat(variables('dataLakeAccountName'), '/default')]", + "properties": { + "containerDeleteRetentionPolicy": { + "enabled": true, + "days": 1 + } + }, + "dependsOn": [ + "[variables('dataLakeAccountName')]" + ] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[variables('dataLakeSoftDeleteAccountName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "isHnsEnabled": true, + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "enabled": true + }, + "blob": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "accessTier": "Hot" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[concat(variables('dataLakeSoftDeleteAccountName'), '/default')]", + "properties": { + "containerDeleteRetentionPolicy": { + "enabled": true, + "days": 1 + } + }, + "dependsOn": [ + "[variables('dataLakeSoftDeleteAccountName')]" + ] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[variables('premiumFileAccountName')]", + "location": "[variables('location')]", + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + }, + "kind": "FileStorage", + "properties": { + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + } + } + }, + { + "type": "Microsoft.KeyVault/vaults", + "apiVersion": "[variables('keyvaultApiVersion')]", + "name": "[variables('keyvaultName')]", + "location": "[variables('location')]", + "properties": { + "sku": { + "family": "A", + "name": "premium" + }, + "tenantId": "[parameters('tenantId')]", + "accessPolicies": [ + { + "tenantId": "[parameters('tenantId')]", + "objectId": "[parameters('testApplicationOid')]", + "permissions": { + "keys": [ + "get", + "list", + "update", + "create", + "import", + "delete", + "recover", + "backup", + "restore", + "decrypt", + "encrypt", + "unwrapKey", + "wrapKey", + "verify", + "sign", + "purge" + ], + "secrets": [ + "get", + "list", + "set", + "delete", + "recover", + "backup", + "restore", + "purge" + ], + "certificates": [ + "get", + "list", + "update", + "create", + "import", + "delete", + "recover", + "backup", + "restore", + "managecontacts", + "manageissuers", + "getissuers", + "listissuers", + "setissuers", + "deleteissuers", + "purge" + ] + } + } + ], + "enabledForDeployment": false, + "enabledForDiskEncryption": false, + "enabledForTemplateDeployment": false, + "enableSoftDelete": false + } + } + ], + "outputs": { + "STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('primaryAccountName')]" + }, + "STORAGE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('primaryAccountName')), variables('storageApiVersion')).keys[0].value]" + }, + "SECONDARY_STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('secondaryAccountName')]" + }, + "SECONDARY_STORAGE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('secondaryAccountName')), variables('storageApiVersion')).keys[0].value]" + }, + "SOFT_DELETE_STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('softDeleteAccountName')]" + }, + "SOFT_DELETE_STORAGE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('softDeleteAccountName')), variables('storageApiVersion')).keys[0].value]" + }, + "BLOB_STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('secondaryAccountName')]" + }, + "BLOB_STORAGE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('secondaryAccountName')), variables('storageApiVersion')).keys[0].value]" + }, + "PREMIUM_STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('premiumAccountName')]" + }, + "PREMIUM_STORAGE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('premiumAccountName')), variables('storageApiVersion')).keys[0].value]" + }, + "VERSIONED_STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('versionedAccountName')]" + }, + "VERSIONED_STORAGE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('versionedAccountName')), variables('storageApiVersion')).keys[0].value]" + }, + "PREMIUM_STORAGE_FILE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('premiumFileAccountName')]" + }, + "PREMIUM_STORAGE_FILE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('premiumFileAccountName')), variables('storageApiVersion')).keys[0].value]" + }, + "DATALAKE_STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('dataLakeAccountName')]" + }, + "DATALAKE_STORAGE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('dataLakeAccountName')), variables('storageApiVersion')).keys[0].value]" + }, + "STORAGE_DATA_LAKE_SOFT_DELETE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('dataLakeSoftDeleteAccountName')]" + }, + "STORAGE_DATA_LAKE_SOFT_DELETE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('dataLakeSoftDeleteAccountName')), variables('storageApiVersion')).keys[0].value]" + }, + "KEYVAULT_URL":{ + "type": "string", + "value": "[variables('azureKeyVaultUrl')]" + }, + "STORAGE_RESOURCE_GROUP_NAME": { + "type": "string", + "value": "[variables('resourceGroupName')]" + }, + "STORAGE_SUBSCRIPTION_ID": { + "type": "string", + "value": "[variables('subscriptionId')]" + } + } +} From 26c090923feae8f5066870de753ce3d7ef28d85c Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 24 Jun 2022 18:07:30 -0700 Subject: [PATCH 42/42] Import globals.yml, use absolute paths --- eng/pipelines/templates/jobs/perf.yml | 11 +++-------- sdk/storage/azure-storage-blob/perf.yml | 2 +- sdk/storage/azure-storage-file-datalake/perf.yml | 2 +- sdk/storage/azure-storage-file-share/perf.yml | 2 +- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/eng/pipelines/templates/jobs/perf.yml b/eng/pipelines/templates/jobs/perf.yml index ece4cecf1532..578c63428bef 100644 --- a/eng/pipelines/templates/jobs/perf.yml +++ b/eng/pipelines/templates/jobs/perf.yml @@ -25,12 +25,7 @@ parameters: default: '' variables: - - name: NugetSecurityAnalysisWarningLevel - value: 'none' - - name: skipComponentGovernanceDetection - value: 'true' - - name: DisableDockerDetector - value: 'true' + - template: /eng/pipelines/templates/variables/globals.yml - name: Pool value: 'azsdk-pool-mms-ubuntu-2004-perf' - name: OSVmImage @@ -67,7 +62,7 @@ jobs: inputs: versionSpec: $(PythonVersion) - - template: ../../../common/TestResources/deploy-test-resources.yml + - template: /eng/common/TestResources/deploy-test-resources.yml parameters: ServiceDirectory: ${{ parameters.serviceDirectory }} Location: westus @@ -105,7 +100,7 @@ jobs: workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results displayName: Print results.json - - template: ../../../common/TestResources/remove-test-resources.yml + - template: /eng/common/TestResources/remove-test-resources.yml parameters: ServiceDirectory: ${{ parameters.serviceDirectory }} ResourceType: perf diff --git a/sdk/storage/azure-storage-blob/perf.yml b/sdk/storage/azure-storage-blob/perf.yml index 1bf6a35c589c..3f33cf1a74e0 100644 --- a/sdk/storage/azure-storage-blob/perf.yml +++ b/sdk/storage/azure-storage-blob/perf.yml @@ -21,7 +21,7 @@ parameters: default: ' ' extends: - template: ../../../eng/pipelines/templates/jobs/perf.yml + template: /eng/pipelines/templates/jobs/perf.yml parameters: serviceDirectory: storage/azure-storage-blob services: "^storage-blob$" diff --git a/sdk/storage/azure-storage-file-datalake/perf.yml b/sdk/storage/azure-storage-file-datalake/perf.yml index 3c3a91fbf1fd..a09b4aa53fea 100644 --- a/sdk/storage/azure-storage-file-datalake/perf.yml +++ b/sdk/storage/azure-storage-file-datalake/perf.yml @@ -21,7 +21,7 @@ parameters: default: ' ' extends: - template: ../../../eng/pipelines/templates/jobs/perf.yml + template: /eng/pipelines/templates/jobs/perf.yml parameters: serviceDirectory: storage/azure-storage-file-datalake services: "^storage-file-datalake$" diff --git a/sdk/storage/azure-storage-file-share/perf.yml b/sdk/storage/azure-storage-file-share/perf.yml index 5d6431d35bc1..a04a0e788733 100644 --- a/sdk/storage/azure-storage-file-share/perf.yml +++ b/sdk/storage/azure-storage-file-share/perf.yml @@ -21,7 +21,7 @@ parameters: default: ' ' extends: - template: ../../../eng/pipelines/templates/jobs/perf.yml + template: /eng/pipelines/templates/jobs/perf.yml parameters: serviceDirectory: storage/azure-storage-file-share services: "^storage-file-share$"