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
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Transfer artifacts
3
3
description: Transfer collections of images or other artifacts from one container registry to another registry by creating a transfer pipeline using Azure storage accounts
4
4
ms.topic: article
5
-
ms.date: 04/10/2020
5
+
ms.date: 04/13/2020
6
6
ms.custom:
7
7
---
8
8
@@ -27,7 +27,7 @@ This feature is available in the **Premium** container registry service tier. Fo
27
27
***Container registries** - You need an existing source registry with artifacts to transfer, and a target registry. ACR transfer is intended for movement across physically disconnected clouds. For testing, 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
28
***Storage accounts** - Create source and target storage accounts in a subscription and location of your choice. For testing purposes, you can use the same subscription or subscriptions as your source and target registries. For cross-cloud scenarios, typically you create a separate storage account in each cloud. If needed, create the storage accounts with the [Azure CLI](../storage/common/storage-account-create.md?tabs=azure-cli) or other tools.
29
29
30
-
Create a blob container for artifact transfer in each account. For example, create a container named *transfer*. Two or more transfer pipelines can share the same storage account, but should use different storage container scopes.
30
+
Create a blob container for artifact transfer in each account. For example, create a container named *transfer*. Two or more transfer pipelines can share the same storage account, but should use different storage container scopes.
31
31
***Key vaults** - Key vaults are needed to store SAS token secrets used to access source and target storage accounts. Create the source and target key vaults in the same Azure subscription or subscriptions as your source and target registries. If needed, create key vaults with the [Azure CLI](../key-vault/quick-create-cli.md) or other tools.
32
32
***Environment variables** - For example commands in this article, set the following environment variables for the source and target environments. All examples are formatted for the Bash shell.
33
33
```console
@@ -45,8 +45,8 @@ You create the following three pipeline resources for image transfer between reg
45
45
46
46
Storage authentication uses SAS tokens, managed as secrets in key vaults. The pipelines use managed identities to read the secrets in the vaults.
47
47
48
-
***[ExportPipeline](#create-exportpipeline-with-resource-manager)** - 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.
49
-
***[ImportPipeline](#create-importpipeline-with-resource-manager)** - 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.
48
+
***[ExportPipeline](#create-exportpipeline-with-resource-manager)** - 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 managing the source SAS token.
49
+
***[ImportPipeline](#create-importpipeline-with-resource-manager)** - 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 managing the target SAS token. An import trigger is enabled by default, so the pipeline runs automatically when an artifact blob lands in the target storage container.
50
50
***[PipelineRun](#create-pipelinerun-with-resource-manager)** - Resource used to invoke either an ExportPipeline or ImportPipeline resource.
51
51
* You run the ExportPipeline manually by creating a PipelineRun resource and specify the artifacts to export.
52
52
* If an import trigger is enabled, the ImportPipeline runs automatically. It can also be run manually using a PipelineRun.
@@ -58,7 +58,7 @@ Storage authentication uses SAS tokens, managed as secrets in key vaults. The pi
58
58
59
59
## Create and store SAS keys
60
60
61
-
Transfer uses shared access signature (SAS) tokens to access the designated storage accounts in the source and target environments. Generate and store tokens as described in the following sections.
61
+
Transfer uses shared access signature (SAS) tokens to access the storage accounts in the source and target environments. Generate and store tokens as described in the following sections.
62
62
63
63
### Generate SAS token for export
64
64
@@ -71,7 +71,7 @@ In the following example, command output is assigned to the EXPORT_SAS environme
71
71
```azurecli
72
72
EXPORT_SAS=?$(az storage container generate-sas \
73
73
--name transfer \
74
-
--account-name $SA_SOURCE \
74
+
--account-name $SOURCE_SA \
75
75
--expiry 2020-05-01 \
76
76
--permissions alrw \
77
77
--https-only \
@@ -100,7 +100,7 @@ In the following example, command output is assigned to the IMPORT_SAS environme
100
100
```azurecli
101
101
IMPORT_SAS=?$(az storage container generate-sas \
102
102
--name transfer \
103
-
--account-name $SA_TARGET \
103
+
--account-name $TARGET_SA \
104
104
--expiry 2020-05-01 \
105
105
--permissions dlr \
106
106
--https-only \
@@ -120,7 +120,7 @@ az keyvault secret set \
120
120
121
121
## Create ExportPipeline with Resource Manager
122
122
123
-
Create an ExportPipeline resource for your source container registry using Azure Resource Manager template deployment. The ExportPipeline resource is provisioned with the source user-assigned identity you created in the previous section.
123
+
Create an ExportPipeline resource for your source container registry using Azure Resource Manager template deployment.
124
124
125
125
Copy ExportPipeline Resource Manager [template files](https://github.com/Azure/acr/tree/master/docs/image-transfer/ExportPipelines) to a local folder.
126
126
@@ -138,9 +138,9 @@ Enter the following parameter values in the file `azuredeploy.parameters.json`:
138
138
139
139
The `options` property for the export pipelines supports optional boolean values. The following values are recommended:
140
140
141
-
|Parameter |Description|
141
+
|Parameter |Value|
142
142
|---------|---------|
143
-
|options | OverwriteBlobs - Existing target blobs are overwritten<br/>ContinueOnErrors - Continue export of remaining artifacts in the source registry if one artifact export fails.
143
+
|options | OverwriteBlobs - Overwrite existing target blobs<br/>ContinueOnErrors - Continue export of remaining artifacts in the source registry if one artifact export fails.
144
144
145
145
### Create the resource
146
146
@@ -166,7 +166,7 @@ EXPORT_RES_ID=$(az group deployment show \
166
166
167
167
## Create ImportPipeline with Resource Manager
168
168
169
-
Create an ImportPipeline resource in your target container registry using Azure Resource Manager template deployment. The ImportPipeline resource is provisioned with the target user-assigned identity you created previously. By default, the pipeline is enabled to import automatically when the storage account in the target environment has an artifact blob.
169
+
Create an ImportPipeline resource in your target container registry using Azure Resource Manager template deployment. By default, the pipeline is enabled to import automatically when the storage account in the target environment has an artifact blob.
170
170
171
171
Copy ImportPipeline Resource Manager [template files](https://github.com/Azure/acr/tree/master/docs/image-transfer/ImportPipelines) to a local folder.
172
172
@@ -184,9 +184,9 @@ Parameter |Value |
184
184
185
185
The `options` property for the import pipeline supports optional boolean values. The following values are recommended:
186
186
187
-
|Parameter |Description|
187
+
|Parameter |Value|
188
188
|---------|---------|
189
-
|options | OverwriteTags - Existing target tags are overwritten<br/>DeleteSourceBlobOnSuccess - Delete the source storage blob after successful import to the target registry<br/>ContinueOnErrors - Continue import of remaining artifacts in the target registry if one artifact import fails.
189
+
|options | OverwriteTags - Overwrite existing target tags<br/>DeleteSourceBlobOnSuccess - Delete the source storage blob after successful import to the target registry<br/>ContinueOnErrors - Continue import of remaining artifacts in the target registry if one artifact import fails.
190
190
191
191
### Create the resource
192
192
@@ -224,7 +224,7 @@ Enter the following parameter values in the file `azuredeploy.parameters.json`:
224
224
|pipelineRunName | Name you choose for the run |
225
225
|pipelineResourceId | Resource ID of the export pipeline.<br/>Example: `/subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>/providers/Microsoft.ContainerRegistry/registries/<sourceRegistryName>/exportPipelines/myExportPipeline`|
226
226
|targetName | Name you choose for the artifacts blob exported to your source storage account, such as *myblob*
227
-
|artifacts | Array of source artifacts to transfer, as tags or manifest digests<br/>Example: `[samples/hello-world:v1", "samples/nginx:v1"]`|
227
+
|artifacts | Array of source artifacts to transfer, as tags or manifest digests<br/>Example: `[samples/hello-world:v1", "samples/nginx:v1" , "myrepository@sha256:0a2e01852872..."]`|
228
228
229
229
Run [az deployment group create][az-deployment-group-create] to create the PipelineRun resource. The following example names the deployment *exportPipelineRun*.
230
230
@@ -252,13 +252,13 @@ az storage blob list \
252
252
253
253
Use the AzCopy tool or other methods to [transfer blob data](../storage/common/storage-use-azcopy-blobs.md#copy-blobs-between-storage-accounts) from the source storage account to the target storage account.
254
254
255
-
For example, the following [`azcopy sync`](/azure/storage/common/storage-ref-azcopy-sync) command replicates the *transfer* container from the source storage account to the *transfer* container in the target account. Authentication uses SAS tokens with appropriate permissions for the source and target containers. (Steps to create tokens are not shown.)
255
+
For example, the following [`azcopy copy`](/azure/storage/common/storage-ref-azcopy-copy) command copies myblob from the *transfer* container in the source account to the *transfer* container in the target account. If the blob exists in the target account, it's overwritten. Authentication uses SAS tokens with appropriate permissions for the source and target containers. (Steps to create tokens are not shown.)
0 commit comments