Skip to content

Latest commit

 

History

History
100 lines (61 loc) · 7.02 KB

container-registry-get-started-geo-replication-template.md

File metadata and controls

100 lines (61 loc) · 7.02 KB
title description services author ms.author ms.date ms.topic ms.service tags ms.custom
Quickstart - Create geo-replicated registry - Azure Resource Manager template
Learn how to create a geo-replicated Azure container registry by using an Azure Resource Manager template.
azure-resource-manager
tejaswikolli-web
tejaswikolli
10/31/2023
quickstart
container-registry
azure-resource-manager
subject-armqs, mode-arm, devx-track-arm-template

Quickstart: Create a geo-replicated container registry by using an ARM template

This quickstart shows how to create an Azure Container Registry instance by using an Azure Resource Manager template (ARM template). The template sets up a geo-replicated registry, which automatically synchronizes registry content across more than one Azure region. Geo-replication enables network-close access to images from regional deployments, while providing a single management experience. It's a feature of the Premium registry service tier.

[!INCLUDE About Azure Resource Manager]

The registry with replications does not support the ARM/Bicep template Complete mode deployments.

If your environment meets the prerequisites and you're familiar with using ARM templates, select the Deploy to Azure button. The template will open in the Azure portal.

:::image type="content" source="~/reusable-content/ce-skilling/azure/media/template-deployments/deploy-to-azure-button.svg" alt-text="Button to deploy the Resource Manager template to Azure." border="false" link="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.containerregistry%2Fcontainer-registry-geo-replication%2Fazuredeploy.json":::

Prerequisites

If you don't have an Azure subscription, create a free account before you begin.

Review the template

The template used in this quickstart is from Azure Quickstart Templates. The template sets up a registry and an additional regional replica.

:::code language="json" source="~/quickstart-templates/quickstarts/microsoft.containerregistry/container-registry-geo-replication/azuredeploy.json":::

The following resources are defined in the template:

More Azure Container Registry template samples can be found in the quickstart template gallery.

Deploy the template

  1. Select the following image to sign in to Azure and open a template.

    :::image type="content" source="~/reusable-content/ce-skilling/azure/media/template-deployments/deploy-to-azure-button.svg" alt-text="Button to deploy the Resource Manager template to Azure." border="false" link="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.containerregistry%2Fcontainer-registry-geo-replication%2Fazuredeploy.json":::

  2. Select or enter the following values.

    • Subscription: select an Azure subscription.

    • Resource group: select Create new, enter a unique name for the resource group, and then select OK.

    • Region: select a location for the resource group. Example: Central US.

    • Acr Name: accept the generated name for the registry, or enter a name. It must be globally unique.

    • Acr Admin User Enabled: accept the default value.

    • Location: accept the generated location for the registry's home replica, or enter a location such as Central US.

    • Acr Sku: accept the default value.

    • Acr Replica Location: enter a location for the registry replica, using the region's short name. It must be different from the home registry location. Example: westeurope.

      :::image type="content" source="media/container-registry-get-started-geo-replication-template/template-properties.png" alt-text="Template properties":::

  3. Select Review + Create, then review the terms and conditions. If you agree, select Create.

  4. After the registry has been created successfully, you get a notification:

    :::image type="content" source="media/container-registry-get-started-geo-replication-template/deployment-notification.png" alt-text="Portal notification":::

The Azure portal is used to deploy the template. In addition to the Azure portal, you can use the Azure PowerShell, Azure CLI, and REST API. To learn other deployment methods, see Deploy templates.

Review deployed resources

Use the Azure portal or a tool such as the Azure CLI to review the properties of the container registry.

  1. In the portal, search for Container Registries, and select the container registry you created.

  2. On the Overview page, note the Login server of the registry. Use this URI when you use Docker to tag and push images to your registry. For information, see Push your first image using the Docker CLI.

    :::image type="content" source="media/container-registry-get-started-geo-replication-template/registry-overview.png" alt-text="Registry overview":::

  3. On the Replications page, confirm the locations of the home replica and the replica added through the template. If desired, add more replicas on this page.

    :::image type="content" source="media/container-registry-get-started-geo-replication-template/registry-replications.png" alt-text="Registry replications":::

Clean up resources

When you no longer need them, delete the resource group, the registry, and the registry replica. To do so, go to the Azure portal, select the resource group that contains the registry, and then select Delete resource group.

:::image type="content" source="media/container-registry-get-started-geo-replication-template/delete-resource-group.png" alt-text="Delete resource group":::

Next steps

In this quickstart, you created an Azure Container Registry with an ARM template, and configured a registry replica in another location. Continue to the Azure Container Registry tutorials for a deeper look at ACR.

[!div class="nextstepaction"] Azure Container Registry tutorials

For a step-by-step tutorial that guides you through the process of creating a template, see:

[!div class="nextstepaction"] Tutorial: Create and deploy your first ARM template