Use VM managed identity for login #2175
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR resolves the issue #2171 by updating the testing workflows to use the Azure VM managed identity for login. It's tested in the PR #2174 .
1. Create a Azure VM with Ubuntu 22.04
* Configure the managed identity on creation: Management → Identity → Enable system assigned managed identity
* Choosee Ubuntu 22.04 instead of 24.04, because PowerShell does not have packages on 24.04
2. Go to the AML workspace (azureml-test-workspace) and grant the following roles to the VM's managed identity
* AzureML Compute Operator
* AzureML Data Scientist
* Reader
3. Install PowerShell, Azure CLI and Azure PowerShell on the VM
4. Go to Recommenders → Settings → Actions → Runners → New self-hosted runner
Run the command on the VM
5. Change the following secret values with the IDs of the VM: Settings → Secrets and variables → Actions → New repository secret
*
AZURE_VM_TENANT_ID
*
AZURE_VM_SUBSCRIPTION_ID
Related Issues
References
Checklist:
git commit -s -m "your commit message"
.staging branch
AND NOT TOmain branch
.