Let’s get started with Azure Resource Manager (ARM) deployments in Microsoft Azure Germany

Today, Microsoft Azure Germany was announced officially, so it is time for some technical details how to deploy your workloads using Azure Resource Manager (ARM). Generally your existing ARM templates will work in the German Cloud as long as the services you need are available yet and the ARM resource provider does exist. I will show you that with little to no changes to your existing ARM templates you will be able to use the German Azure locations to deploy your workloads.

With the code-samples in this article I will show how to deploy the following types of Azure resources using a customized ARM json template:

Resource Group

Vnet

Storage Account

Network Adapter

Virtual Machine

Public IP

Logging in into Microsoft Azure Germany

The first step to start submitting commands to the Azure environment is to log in. To log in into Microsoft Azure Germany you will use your admin credentials provided with your test-subscription at the command line.

Listing your subscriptions

To get an overview what subscriptions you currently have in Azure Germany, use this command

azure account list

This command will show you a result similar to this:

Enabling ARM mode

Enabling ARM config mode is important because all following steps will need the config mode to be using ARM (Azure Resource Manager). So better we enable it beforehand using

azure config mode arm

Creating your first resource group

Every resource in Azure needs to go into a resource group, which we need to create prior to creating anything else. Resource groups are managed by using the cli command “azure resource”. To get an overview of what can be done with resource groups, just type

azure group

in your command line:

We will utilize “group create” to create a new resource group with the name “rg1” by launching this command

azure group create -v -n rg1 -l germanycentral

the -n parameter sets the name for our new resource group and with the -l paramter we tell azure to deploy it to a specific location, in this sample the “germanycentral” location, which means to Frankfurt. If you need to deploy to Magdeburg, this would be equivalent to the “germanynortheast” location.

Deploying ARM templates into a resource group

As listed above the “azure group” cli command also gives us the ability to deploy ARM json templates into an existing resource group. In our case, we would like to deploy a virtual machine into the new resource group. I am using one of the quickstart samples from github to deploy a sample virtual machine to the resource group. To test this out you will at least have to download the sample parameters file from github and set your username, password and public dns name. Then pass the name of the parameter file to the command as below:

This means we are deploying into resource group “rg1” using a deployment name “dep1” the template at the given uri with the local parameters file parameters.txt. The parameters.txt can either be a local file or a json string with the contents of this file.

While the command is runing, it will show progress of the deployment process. After a few minutes, it should end with the final state of the deployment:

As you can see from the results of this command, the virtual machine should be up and running now. We can easily check by using the cli command

azure vm list

or in the azure portal looking into the resource group rg1

and clicking on the virtual machine will show us that the vm is up and running and which public IP it has to access it via ssh.

This quickly summarizes all steps needed to deploy ARM templates in the Microsoft Azure Germany environments. If you have any questions, please don’t hesitate to comment on this or contact me via your preferred method.