How to deploy an Azure ARM template
This how-to explains how to leverage the Azure ARM template feature to deploy IT solutions in a predictable and repeatable way. It will show how to import an Azure ARM template and then how to deploy it using the Azure cloud account of your choice.
Prerequisites
- Have a valid Azure subscription in Multi-Cloud Orchestrator.
- Have an ARM template with the following requirements:
- No Linked templates inside (https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates#linked-template).
- No multi-line strings must be used. ARM templates are JSON files and must comply with json restrictions.
- Also only Resource Group level deployments are supported (https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-to-resource-group).
- For this example we will use the following ARM template: docker-wordpress-mysql.
Upload the ARM template
The ARM template is going to be uploaded into the orchestrator repository of ARM templates.
- Go to APPLICATIONS -> CSEs.
- Press the "Import CSE template" button.
- Provide a name for the template, select Cloud Provider syntax as ARM, select a local file containing a valid ARM template with "Select file".
- Press the "Import" button.
Deploy the ARM template
From the orchestrator repository we will be able to deploy ARM templates using any of the configured Azure cloud accounts.
- Go to APPLICATIONS -> CSEs.
- Select the arm template from the list to expand it.
- Press the "New CSE deployment" button.
- Provide all mandatory fields for the selected ARM template, select the Cloud Account & Zone where you want to deploy. Then press the "Deploy CSE" button.
- You will see the new deployment in "Deploying" state.
- Wait until deployment is in "Deployed" state.
- If you want to see the deployment details click on the deployment name.
- You can see the arm template deployment parameters as well the generated output, in this case the url of the wordpress site.
- Copy and paste the wordpress url in your browser to go to the site.
Undeploy the ARM deployment
We are going to undeploy all of the Azure resources deployed with the template.
- Go to APPLICATIONS -> CSEs.
- Select the arm template from the list to expand it.
- Press the "Actions menu" icon at the right of the deployment row and then press the "Undeploy deployment" button.
- Press the "Undeploy" button in the confirmation popup.
- You will see the deployment in "Undeploying" state.
- Wait until deployment disappears.