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
This article describes how to deploy linked Azure Resource Manager (ARM) templates with Azure DevOps Services (formerly Visual Studio Team Services, or VSTS).
17
17
18
18
## Overview
19
19
20
-
When dealing with deploying many components in Azure, a single ARM template might be challenging to manage and maintain. ARM linked templates allow you to make your deployment more modular and makes the templates easier to manage. When dealing with large deployments, it's highly recommended to consider breaking down your deployment into a main template and multiple linked templates representing different components of your deployment.
20
+
When you're deploying many components in Azure, a single ARM template might be challenging to manage and maintain. ARM linked templates allow you to make your deployment more modular and makes the templates easier to manage. When dealing with large deployments, it's highly recommended to consider breaking down your deployment into a main template and multiple linked templates representing different components of your deployment.
21
21
22
-
Deploying ARM templates can be performed using several different methods such as using PowerShell, Azure CLI, and Azure portal. A recommended approach however is to adopt one of DevOps practices, namely continuous deployment. VSTS is an application lifecycle management tool hosted in the cloud and offered as a service. One of the capabilities VSTS offers is release management.
22
+
Deploying ARM templates can be performed using several different methods such as using PowerShell, Azure CLI, and Azure portal. A recommended approach however is to adopt one of DevOps practices, namely continuous deployment. Azure DevOps Services is an application lifecycle management tool hosted in the cloud and offered as a service. One of the capabilities Azure DevOps Services offers is release management.
23
23
24
-
This article describes how you can deploy linked ARM templates using the release management feature of VSTS. In order for the linked templates to be deployed properly, they need to be stored in a location that can be reached by the Azure Resource Manager, such as Azure Storage; so we show how Azure Storage can be used to stage the ARM template files. We will also show some recommended practices around keeping secrets protected using Azure Key Vault.
24
+
This article describes how you can deploy linked ARM templates using the release management feature of Azure DevOps Services. In order for the linked templates to be deployed properly, they need to be stored in a location that can be reached by the Azure Resource Manager, such as Azure Storage; so we show how Azure Storage can be used to stage the ARM template files. We'll also show some recommended practices around keeping secrets protected using Azure Key Vault.
25
25
26
-
The scenario we walk through here's to deploy VNet with a Network Security Group (NSG) structured as linked templates. We use VSTS to show how continuous deployment can be set up to enable teams to continuously update Azure with new changes each time there's a modification to the template.
26
+
This scenario deploys a virtual network with a Network Security Group (NSG) structured as linked templates. We use Azure DevOps Services to show how continuous deployment can be set up to enable teams to continuously update Azure with new changes each time there's a modification to the template.
27
27
28
28
## Create an Azure Storage account
29
29
30
30
1. Sign in to the Azure portal and create an Azure Storage account following the steps documented [here](../storage/common/storage-account-create.md?tabs=azure-portal).
31
-
1. Once deployment is complete, navigate to the storage account and select **Shared access signature**. Select Service, Container, and Object for the **Allowed resource types**. Then select **Generate SAS and connection string**. Copy the SAS token and keep it available since we use it later.
31
+
1. Once deployment is complete, navigate to the storage account and select **Shared access signature**. Select Service, Container, and Object for the **Allowed resource types**. Then select **Generate SAS and connection string**. Copy the SAS token and keep it available since we use it later.
32
32
33
33
:::image type="content" source="media\deploy-linked-arm-templates-with-vsts\storage-account-generate-sas-token.png" alt-text="Shows an Azure Storage Account in the Azure portal with Shared access signature selected." lightbox="media\deploy-linked-arm-templates-with-vsts\storage-account-generate-sas-token.png":::
34
34
35
35
1. Select the storage account Containers page and create a new Container.
36
36
1. Select the new Container properties.
37
37
38
-
:::image type="content" source="media\deploy-linked-arm-templates-with-vsts\container-properties.png" alt-text="Shows an Azure Storage Account in the Azure portal with Containers selected. There's a container with its Container properties menu selected.":::
38
+
:::image type="content" source="media\deploy-linked-arm-templates-with-vsts\container-properties.png" alt-text="Shows an Azure Storage Account in the Azure portal with Containers selected. There's a container with its Container properties menu selected.":::
39
39
40
-
1. Copy the URL field and keep it handy. We need it later along with the SAS token from the earlier step.
40
+
1. Copy the URL field and keep it handy. We need it later along with the SAS token from the earlier step.
41
41
42
42
## Protect secrets with Azure Key Vault
43
43
44
-
1. In the Azure portal, create an Azure Key Vault resource.
45
-
1. Select the Azure Key Vault you created in the earlier step and then select Secrets.
44
+
1. In the Azure portal, create an [Azure Key Vault](/azure/key-vault/general/quick-create-portal) resource.
45
+
1. Select the created Azure Key Vault and then select **Secrets**.
46
46
1. Select Generate/Import to add the SAS Token.
47
47
1. For the Name property, enter `StorageSASToken` and then provide the Azure Storage shared access signature key you copied in a previous step for the Value.
48
48
1. Select Create.
49
49
50
-
## Link Azure Key Vault to VSTS
50
+
## Link Azure Key Vault to Azure DevOps Services
51
51
52
52
1. Sign in to your Azure DevOps organization and navigate to your project.
53
53
1. Go to **Library** under **Pipelines** in the navigation pane.
54
54
55
-
:::image type="content" source="media\deploy-linked-arm-templates-with-vsts\vsts-libraries.png" alt-text="Shows the navigation pane in VSTS with Pipelines selected and the Library option highlighted.":::
55
+
:::image type="content" source="media\deploy-linked-arm-templates-with-vsts\vsts-libraries.png" alt-text="Shows the navigation pane in Azure DevOps Services with Pipelines selected and the Library option highlighted.":::
56
56
57
57
1. Under **Variable group**, create a new group and for **Variable group name** enter `AzureKeyVaultSecrets`.
58
58
1. Toggle **Link secrets from an Azure key vault as variables**.
59
59
1. Select your Azure subscription and then the Azure Key Vault you created earlier, and then select Authorize.
60
60
1. Once authorization is successful, you can add variables by clicking **Add** and are presented with the option to add references to the secrets in the Azure Key Vault. Add a reference to the `StorageSASToken` created in the earlier step, and save it.
61
61
62
-
## Setup continuous deployment using VSTS
62
+
## Set up continuous deployment using Azure DevOps Services
63
63
64
64
1. Follow steps listed in the article [Automate continuous integration using Azure Pipelines releases](continuous-integration-delivery-automate-azure-pipelines.md#set-up-an-azure-pipelines-release).
65
65
1. A few changes are required from the above steps in order to use a linked ARM template deployment:
@@ -77,4 +77,5 @@ The scenario we walk through here's to deploy VNet with a Network Security Grou
77
77
1. Save the release pipeline and trigger a release.
78
78
79
79
## Related content
80
+
80
81
-[Automate continuous integration using Azure Pipelines releases](continuous-integration-delivery-automate-azure-pipelines.md)
0 commit comments