Skip to content

Commit c1e26e4

Browse files
Added instructions for creating compute instances with no/SystemAssigned/UserAssigned Managed Identities. (#126)
* Added instructions for creating compute instances with managed identity config. * UX Improvements. * UX Improvements.
1 parent 36a625f commit c1e26e4

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

documentation/deployguides/deployguide_ado.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,14 +463,58 @@ The solution accelerator includes code and data for a sample end-to-end machine
463463
In this section you will execute an Azure DevOps pipeline that will create and run an Azure Machine Learning pipeline. Together, they perform the following steps:
464464

465465
* Connect to the Azure Machine Learning workspace created by the infrastructure deployment
466-
* Create a compute cluster for training in the workspace
466+
* Create a compute cluster for training in the workspace (refer to section below to create compute instances with or without managed identity)
467467
* Register the training dataset in the workspace
468468
* Prepare data for training
469469
* Registers a custom python environment with the packages required for this model
470470
* Train a linear regression model to predict taxi fares
471471
* Evaluate the model on the test dataset against the performance of any previously-registered models
472472
* If the new model performs better, register the model as an MLflow model in the workspace for later deployment
473473

474+
<details>
475+
<summary><strong>Create Compute Instances with SystemAssigned/UserAssigned/No Managed Identity</strong></summary>
476+
<br>
477+
478+
In order to create a compute instance with or without managed identity, you can leverage the `/mlops-templates/templates/python-sdk-v2/create-compute-instance.yml` located within the **mlops-templates** repository.
479+
480+
If you want to create a **compute instance without a managed identity** reference, you can add the following snippet with your own parameters to the `/mlops/devops-pipelines/deploy-model-training-pipeline.yml` pipeline definition:
481+
482+
``` yaml
483+
- template: templates/python-sdk-v2/create-compute-instance.yml@mlops-templates
484+
parameters:
485+
instance_name: compute-instance-a
486+
size: Standard_DS3_v2
487+
location: canadacentral
488+
description: compute instance a
489+
```
490+
491+
In order to **create a system-assigned managed identity** and assign it your compute instance during creation, the above snippet can be adjusted as follows:
492+
493+
``` yaml
494+
- template: templates/python-sdk-v2/create-compute-instance.yml@mlops-templates
495+
parameters:
496+
instance_name: compute-instance-a
497+
size: Standard_DS3_v2
498+
location: canadacentral
499+
description: compute instance a
500+
identity_type: SystemAssigned
501+
```
502+
503+
Lastly, to leverage a **user-assigned managed identity** for your compute, the following snippet can be used and adjusted as needed:
504+
505+
``` yaml
506+
- template: templates/python-sdk-v2/create-compute-instance.yml@mlops-templates
507+
parameters:
508+
instance_name: compute-instance-a
509+
size: Standard_DS3_v2
510+
location: canadacentral
511+
description: compute instance a
512+
identity_type: UserAssigned
513+
user_assigned_identity: e12c9326-0618-4036-a0a7-ad3bb396dc97
514+
```
515+
516+
</details>
517+
474518
To deploy the model training pipeline, open the **Pipelines** section again and select **New pipeline** in the upper right of the page
475519
476520
- Select **Azure Repos Git**

0 commit comments

Comments
 (0)