Skip to content

Commit c675e9c

Browse files
committed
Update how-to-create-manage-compute-instance.md
1 parent 75ed8ab commit c675e9c

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

articles/machine-learning/how-to-create-manage-compute-instance.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,39 @@ Following is a sample policy to default a shutdown schedule at 10 PM PST.
348348

349349
You can assign a system- or user-assigned [managed identity](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview) to a compute instance, to autheticate against other Azure resources such as storage. Using managed identities for authentication helps improve workspace security and management. For example you can allow users to access training data only when logged in to compute instance, or use a common user-assigned managed identity to permit access to a specific storage account.
350350

351+
You can create compute instance with managed identity from Azure ML Studio:
352+
351353
1. Fill out the form to [create a new compute instance](?tabs=azure-studio#create).
352354
1. Select **Next: Advanced Settings**.
353355
1. Enable **Assign a managed identity**.
354356
1. Select **System-assigned** or **User-assigned** under **Identity type**.
355357
1. If you selected **User-assigned**, select subscription and name of the identity.
356-
357-
When working on the compute instance, the managed identity is used automatically to authenticate against data stores with [identity-based data access enabled](how-to-identity-based-data-access.md).
358+
359+
You can use V2 CLI to create compute instance with assign system-assigned managed identity:
360+
361+
```azurecli
362+
az ml compute create --name myinstance --identity-type SystemAssigned --type ComputeInstance --resource-group my-resource-group --workspace-name my-workspace
363+
```
364+
365+
You can also use V2 CLI with yaml file, for example to create a compute instance with user-assigned managed identity:
366+
367+
```azurecli
368+
azure ml compute create --file compute.yaml --resource-group my-resource-group --workspace-name my-workspace
369+
```
370+
371+
The identity definition is contained in compute.yaml file:
372+
373+
```yaml
374+
https://azuremlschemas.azureedge.net/latest/computeInstance.schema.json
375+
name: myinstance
376+
type: computeinstance
377+
identity:
378+
type: user_assigned
379+
user_assigned_identities:
380+
- resource_id: identity_resource_id
381+
```
382+
383+
Once the managed identity is created, enable [identity-based data access enabled](how-to-identity-based-data-access.md) to your storage accounts for that identity. Then, when you worki on the compute instance, the managed identity is used automatically to authenticate against data stores.
358384
359385
You can also use the managed identity manually to authenticate against other Azure resources. For example, to use it to get ARM access token, use following.
360386

0 commit comments

Comments
 (0)