Azure / Azure/azure-sdk-tools

Automate team subscription configuration keyvault provisioning

Open
#2,572 5 comments 0 reactions 1 assignee Claimed by @benbp View on GitHub
Central-EngSys
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

We have a way to add custom live test configuration overlays that can be managed directly by partner teams (see [here](https://dev.azure.com/azure-sdk/internal/_wiki/wikis/internal.wiki/449/Engineering-System-Secrets) and [here](https://dev.azure.com/azure-sdk/internal/_wiki/wikis/internal.wiki/449/Engineering-System-Secrets)). This process has been ad-hoc thus far as it was not common. It is both poorly documented and consists of manual steps.

More and more teams are starting to request this functionality, so it should be automated. This could either take the form of automating the ad-hoc steps via a tool/script OR adding some sort of configuration alongside the test yaml that could hint our pipeline generator to do it instead.

Provisioning steps today:

1. Provision a new keyvault
- Update keyvault owners and access policies for partner team
- Add new subscription configuration secret(s) to the keyvault
1. Create a new devops variable group backed by the keyvault.
- This requires initializing a new service connection to access this keyvault and giving it the appropriate access policies. Only a few admins can do this since the keyvaults are stored in our main live testing secrets resource group.
1. Make changes to add reference to custom config, add a new cloud definition, and remove any hardcoded keyvault variable references. For example: https://github.com/Azure/azure-sdk-for-python/pull/22376
1. Edit the live and weekly test pipelines to add the variable group for that Keyvault. Click “Edit”, then click the three dots and “Triggers”. Click the “Variables” tab then “Link Variable Group”. Search for the live test secrets variable group and add it. Then click Save.
1. Run the pipeline. It will give you a one-time prompt to authorize the pipeline to use the service connection for that variable group’s backing Keyvault.
1. If the subscription configuration references a custom subscription separate from our main testing subscriptions, add the subscription configuration to the live-test-cleanup pipeline for zombie resource cleanup.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.