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/container-registry/container-registry-transfer-images.md
+17-19Lines changed: 17 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,40 +10,38 @@ ms.custom:
10
10
11
11
This article shows how to transfer images or other registry artifacts in bulk from one Azure container registry to another registry. The source and target registries can be in the same or different subscriptions, or potentially different Active Directory tenants or Azure clouds.
12
12
13
-
To transfer images, you create a transfer *pipeline*:
13
+
To transfer images, you create a *transfer pipeline* that replicates artifacts between registries by using blob storage:
14
14
15
-
* Create source and target storage resources, and store storage access secrets in Azure key vaults
16
-
* Create and run a resource that exports images to the source storage account
17
-
* Copy images from the source storage account to the target storage account
18
-
* Create a resource that imports images to the target registry. You can set up the import pipeline to trigger whenever images are in the source storage account
15
+
* Images from a source registry are packaged into a blob placed in a source storage account
16
+
* The blob is copied from the source storage account to a target storage account
17
+
* The blob in the target storage account gets unpacked into artifacts in the target registry. You can set up the import pipeline to trigger whenever the image blob updates in the target storage.
19
18
20
19
Transferring registry images is a more general, scalable alternative to [importing images](container-registry-import-images.md) from one container registry to another.
21
20
22
-
In this article, you use the Azure CLI and Azure Resource Manager templates to create the resources and transfer pipeline. If you'd like to use the Azure CLI locally, you must have Azure CLI version **XXX** or later installed and logged in with [az login][az-login]. Run `az --version` to find the version. If you need to install or upgrade the CLI, see [Install Azure CLI][azure-cli].
21
+
In this article, you use the Azure CLI and Azure Resource Manager templates to create the resources and transfer pipeline. If you need to install or upgrade the CLI, see [Install Azure CLI][azure-cli].
23
22
24
23
This feature is available in the **Premium** container registry service tier. For information about registry service tiers and limits, see [Azure Container Registry SKUs](container-registry-skus.md).
25
24
26
25
## Prerequisites
27
26
28
-
***Container registries** - For this scenario you need an existing source registry with images you want to transfer, and a target registry. The source and target registries can be in the same or a different Azure subscription, Active Directory tenant, or cloud. If you need to create a registry, see [Quickstart: Create a private container registry using the Azure CLI](container-registry-get-started-cli.md).
29
-
***Storage accounts** - Create source and target storage accounts in a subscription and location of your choice. If needed, create the storage accounts with the [Azure CLI](../storage/common/storage-account-create.md?tabs=azure-cli) or other tools. In each account, create a blob container for image transfer. For example, create a container named *transfer*
27
+
***Container registries** - You need an existing source registry with images to transfer, and a target registry. The source and target registries can be in the same or a different Azure subscription, Active Directory tenant, or cloud. If you need to create a registry, see [Quickstart: Create a private container registry using the Azure CLI](container-registry-get-started-azure-cli.md).
28
+
***Storage accounts** - Create source and target storage accounts in a subscription and location of your choice. If needed, create the storage accounts with the [Azure CLI](../storage/common/storage-account-create.md?tabs=azure-cli) or other tools. In each account, create a blob container for image transfer. For example, create a container named *transfer*.
30
29
***Key vaults** Create key vaults to store secrets in the same Azure subscription or subscriptions as your source and target registries. If needed, create source and target key vaults with the [Azure CLI](../key-vault/quick-create-cli.md) or other tools.
31
30
32
31
## Scenario overview
33
32
34
33
You create the following three resources for ACR Transfer. All are created using PUT operations. These resources operate on your *source* and *target* registries and storage accounts.
35
34
36
-
***ExportPipeline** - Long-lasting resource that contains high-level information about the *source* registry and storage account. This information includes the storage blob container URI and the key vault secret URI of the storage SAS token.
37
-
***ImportPipeline** - Long-lasting resource that contains high-level information about the *target* registry and storage account. This information includes the storage blob container URI and the key vault secret URI of the storage SAS token. An import trigger is enabled by default, so the pipeline runs automatically when artifacts land in the target storage container.
35
+
***ExportPipeline** - Long-lasting resource that contains high-level information about the *source* registry and storage account. This information includes the source storage blob container URI and the key vault secret URI of the storage SAS token.
36
+
***ImportPipeline** - Long-lasting resource that contains high-level information about the *target* registry and storage account. This information includes the target storage blob container URI and the key vault secret URI of the storage SAS token. An import trigger is enabled by default, so the pipeline runs automatically when artifacts land in the target storage container.
38
37
***PipelineRun** Resource used to invoke either an ExportPipeline or ImportPipeline resource.
38
+
You run the ExportPipeline manually by creating a PipelineRun resource. When you run the ExportPipeline, you specify the artifacts to be exported.
39
39
40
-
You run the ExportPipeline manually by creating a PipelineRun resource. When you run the ExportPipeline, you specify the artifacts to be exported.
41
-
42
-
If an import trigger is enabled, an ImportPipeline runs automatically. It can also be run manually using a PipelineRun.
40
+
If an import trigger is enabled, an ImportPipeline runs automatically. It can also be run manually using a PipelineRun.
43
41
44
42
### Things to know
45
-
* The ImportPipeline and ExportPipeline may be located in different Active Directory tenants, or different Azure clouds. If run in different tenants or clouds, you need separate managed identities and key vaults for the export and import resources.
46
-
* ExportPipelines and ImportPipelines also support system-assigned identities. In this case, assign the identity permissions to your key vault after the export resource is created and before running.
43
+
* The ImportPipeline and ExportPipeline may be located in different Active Directory tenants, or different Azure clouds. If run in different tenants or clouds, you need separate managed identities and key vaults for the export and import resources.
44
+
* ExportPipelines and ImportPipelines also support system-assigned identities. In this case, assign the identity permissions to your key vault after the ExportPipeline resource is created and before running.
47
45
48
46
## Create and store SAS tokens
49
47
@@ -216,7 +214,7 @@ Enter the following parameter values in the file `azuredeploy.parameters.json`:
216
214
|registryName | Name of your source container registry |
217
215
|pipelineRunName | Name you choose for the run |
218
216
|pipelineResourceId | Resource ID of the export pipeline. Example: `/subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>/providers/Microsoft.ContainerRegistry/registries/<sourceRegistryName>/exportPipelines/myExportPipeline`|
219
-
|targetName | Name you choose for the blob for exported artifacts in your source storage account, such a *myblob*
217
+
|targetName | Name you choose for the artifacts blob exported to your source storage account, such a *myblob*
220
218
|artifacts | Array of source images to transfer. Example: `[samples/hello-world:v1", "samples/nginx:v1"]`
221
219
222
220
Run [az deployment group create][az-deployment-group-create] to run the resource.
@@ -259,13 +257,13 @@ Parameter |Value |
259
257
|---------|---------|
260
258
|registryName | Name of your target container registry |
261
259
|importPipelineName | Name you choose for the import pipeline |
262
-
|sourceUri | URI of the container in your target storage account, used as a source for the import pipeline. Example: `https://targetstorage.blob.core.windows.net/transfer`|
260
+
|sourceUri | URI of the container in your target storage account, which is the source for the import pipeline. Example: `https://targetstorage.blob.core.windows.net/transfer`|
263
261
|keyVaultUri | URI of the SAS token secret in the target key vault. Example: `https://targetvault.vault-int.azure-int.net/secrets/acrimportsas`|
264
262
265
263
Run [az deployment group create][az-deployment-group-create] to create the resource.
266
264
267
265
```azurecli
268
-
az group deployment create \
266
+
az deployment group create \
269
267
--resource-group myResourceGroup \
270
268
--template-file azuredeploy.json \
271
269
--parameters azuredeploy.parameters.json \
@@ -286,7 +284,7 @@ Enter the following parameter values in the file `azuredeploy.parameters.json`:
286
284
|---------|---------|
287
285
|registryName | Name of your source container registry |
288
286
|pipelineRunName | Name you choose for the run |
289
-
|pipelineResourceId | Resource ID of the import pipeline. Example: `/subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>/providers/Microsoft.ContainerRegistry/registries/<sourceRegistryName>/exportPipelines/myExportPipeline`|
287
+
|pipelineResourceId | Resource ID of the import pipeline. Example: `/subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>/providers/Microsoft.ContainerRegistry/registries/<sourceRegistryName>/importPipelines/myImportPipeline`|
290
288
|sourceName | Name of the blob for exported artifacts in your storage account, such a *myblob*
291
289
292
290
Run [az deployment group create][az-deployment-group-create] to run the resource.
0 commit comments