Azure Container Registry (ACR) - Part 2

Jorge Bernhardt
Cloud Computing
July 27, 2021

Azure Container Registry (ACR) - Part 2

Prerequisites

  • This tutorial assumes that you already have a Microsoft Azure account configured.
  • You already have an Azure Container Registry (ACR) and properly configured. If you want to know how to create it, see this link.

Azure PowerShell Workaround

If you want to know how to install the PowerShell Azure module on your machine, check out this link.

The simplest way to get started is to sign in interactively at the command line.

This cmdlet will bring up a dialog box prompting you for your email address and password associated with your Azure account.

If you have more than one subscription associated with your mail account, you can choose the default subscription. To perform this task, we will use the following commands:

Once you set your default subscription, you're ready to start.

Set the variables

Here, we define the characteristics of our environment and the resource's properties.


Geo-replication in ACR

Please note that Geographic Replication is a feature of Premium records only. Geographic replication will allow you to manage a single ACR that will serve multiple regions, among other interesting features.

if you don't know if your ACR is premium you can check it, using the following command

Get-AzContainerRegistry

If your ACR is not yet Premium, you can change it using the following command.

Update-AzContainerRegistry

Creates a container registry replication

To create a new container registry replication, use the New-AzContainerRegistryReplication cmdlet with the following syntax.

As you can see, you should refer to the Master ACR in the -RegistryName parameter, specify a name for the new ACR and select the zone where the new replica will be hosted.

New-AzContainerRegistryReplication

Gets the status of the replication

To get information about the status of replication, use the Get-AzContainerRegistryReplication cmdlet with the following syntax.

Get-AzContainerRegistryReplication
ACR Geo-Replication

Removes a container registry replication

finally, to remove a container registry replication, you should use the Remove-AzContainerRegistryReplication cmdlet as shown below.

In the next post, I will show you how to use Azure Container Registry webhooks.

Thanks for reading my post, I hope you find it useful.

If you want to know more about Azure Container Registry, check out this link: https://docs.microsoft.com/en-us/azure/container-registry/


As I mentioned in my previous post, today I want to show you how to enable geo-replication of your ACR. This feature will allow us to manage a single registry across all regions, push images to a single registry while the Azure service manages the replication, and last but not least, allows us to keep images very close to the application infrastructure.

Jorge Bernhardt

Hi! I am Jorge Bernhardt and I have been an IT professional for almost 20 years. During this time, I have worked as a helpdesk operator, systems administrator, and cloud architect. I am specialised in Microsoft Technologies, particularly Microsoft Cloud & Datacenter solutions, Microsoft Virtualisation, and Microsoft 365. I love learning from other professionals and, when possible, share my knowledge back with the community.

https://www.jorgebernhardt.com

Keep Reading

Newsletter EuropeClouds.com

Thank you! Your submission has been received!

Oops! Something went wrong while submitting the form