You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-manage-registries.md
+79-9Lines changed: 79 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
---
2
2
title: Create and manage registries (preview)
3
3
titleSuffix: Azure Machine Learning
4
-
description: Learn how create registries with the CLI, Azure portal and Azure Machine Learning Studio
4
+
description: Learn how create registries with the CLI, REST API, Azure portal and Azure Machine Learning studio
5
5
services: machine-learning
6
6
ms.service: machine-learning
7
7
ms.subservice: mlops
8
-
ms.author: mabables
9
-
author: ManojBableshwar
8
+
ms.author: kritifaujdar
9
+
author: fkriti
10
10
ms.reviewer: larryfr
11
-
ms.date: 09/21/2022
11
+
ms.date: 04/12/2023
12
12
ms.topic: how-to
13
13
ms.custom: devx-track-python, ignite-2022
14
14
---
@@ -22,7 +22,7 @@ Azure Machine Learning entities can be grouped into two broad categories:
22
22
23
23
Assets lend themselves to being stored in a central repository and used in different workspaces, possibly in different regions. Resources are workspace specific.
24
24
25
-
Azure Machine Learning registries (preview) enable you to create and use those assets in different workspaces. Registries support multi-region replication for low latency access to assets, so you can use assets in workspaces located in different Azure regions. Creating a registry will provision Azure resources required to facilitate replication. First, Azure blob storage accounts in each supported region. Second, a single Azure Container Registry with replication enabled to each supported region.
25
+
Azure Machine Learning registries (preview) enable you to create and use those assets in different workspaces. Registries support multi-region replication for low latency access to assets, so you can use assets in workspaces located in different Azure regions. Creating a registry provisions Azure resources required to facilitate replication. First, Azure blob storage accounts in each supported region. Second, a single Azure Container Registry with replication enabled to each supported region.
26
26
27
27
:::image type="content" source="./media/how-to-manage-registries/machine-learning-registry-block-diagram.png" alt-text="Diagram of the relationships between assets in workspace and registry.":::
28
28
@@ -68,8 +68,8 @@ Create the YAML definition and name it `registry.yml`.
68
68
69
69
```YAML
70
70
name: DemoRegistry1
71
-
description: Basic registry with one primary region and to additional regions
72
71
tags:
72
+
description: Basic registry with one primary region and to additional regions
73
73
foo: bar
74
74
location: eastus
75
75
replication_locations:
@@ -120,8 +120,79 @@ You can create registries in Azure Machine Learning studio using the following s
120
120
121
121
1. Review the information and select __Create__.
122
122
123
+
124
+
125
+
# [REST API](#tab/rest)
126
+
127
+
> [!TIP]
128
+
> You need the **curl** utility to complete this step. The **curl** program is available in the [Windows Subsystem for Linux](/windows/wsl/install-win10) or any UNIX distribution. In PowerShell, **curl** is an alias for **Invoke-WebRequest** and `curl -d "key=val" -X POST uri` becomes `Invoke-WebRequest -Body "key=val" -Method POST -Uri uri`.
129
+
130
+
To authenticate REST API calls, you need an authentication token for your Azure user account. You can use the following command to retrieve a token:
131
+
132
+
```azurecli
133
+
az account get-access-token
134
+
```
135
+
136
+
The response should provide an access token good for one hour. Make note of the token, as you use it to authenticate all administrative requests. The following JSON is a sample response:
137
+
138
+
> [!TIP]
139
+
> The value of the `access_token` field is the token.
140
+
141
+
```json
142
+
{
143
+
"access_token": "YOUR-ACCESS-TOKEN",
144
+
"expiresOn": "<expiration-time>",
145
+
"subscription": "<subscription-id>",
146
+
"tenant": "your-tenant-id",
147
+
"tokenType": "Bearer"
148
+
}
149
+
```
150
+
151
+
To create a registry, use the following command. You can edit the JSON to change the inputs as needed. Replace the `<YOUR-ACCESS-TOKEN>` value with the access token retrieved previously:
## Specify storage account type and SKU (optional)
126
197
127
198
> [!TIP]
@@ -134,12 +205,12 @@ Next, decide if you want to use an [Azure Blob storage](../storage/blobs/storage
134
205
> [!NOTE]
135
206
>The `hns` portion of `storage_account_hns` refers to the [hierarchical namespace](../storage/blobs/data-lake-storage-namespace.md) capability of Azure Data Lake Storage Gen2 accounts.
136
207
137
-
Below is an example YAML that demonstrates this advanced storage configuration:
208
+
The following example YAML file demonstrates this advanced storage configuration:
138
209
139
210
```YAML
140
211
name: DemoRegistry2
141
-
description: Registry with additional configuration for storage accounts
142
212
tags:
213
+
description: Registry with additional configuration for storage accounts
143
214
foo: bar
144
215
location: eastus
145
216
replication_locations:
@@ -191,7 +262,6 @@ Permission | Description
191
262
Microsoft.MachineLearningServices/registries/write| Allows the user to create or update registries
192
263
Microsoft.MachineLearningServices/registries/delete | Allows the user to delete registries
0 commit comments