Skip to content
This repository was archived by the owner on Nov 10, 2019. It is now read-only.

Latest commit

 

History

History
79 lines (48 loc) · 3.5 KB

exercise07.md

File metadata and controls

79 lines (48 loc) · 3.5 KB

Exercise 7

Learnings

  1. Basics about ARM Templates
  2. Exporting ARM Templates
  3. Downloading ARM Templates
  4. Editing and deploying ARM Templates in the Azure Portal
  5. Deploying a VM using an Azure ARM Quickstart

Export Template

  1. Open Azure Portal and sign in.

  2. Trigger Template Export for Resource Group PracticalDevOps-Dev:
    Export Template

  3. Download exported template and make yourself familiar with the code.
    Download Template

  4. Discussion points:

    • Describe basic concepts of Azure Resource Manager and ARM templates
    • Speak about structure of ARM templates (e.g. parameters, variables, resources, etc.)
    • Point out the use of template functions
    • Code walk-through for generated PowerShell scripts

Edit and Deploy Using PowerShell

If you are very familiar with PowerShell, you can do the following steps using the downloaded code instead of editing and deploying it in the Azure Portal.

Edit and Deploy Using Azure Portal

  1. Save the exported template using the name PracticalDevOps.
    Save Template

  2. Edit the ARM template in Azure Portal.
    Edit Template

  3. Replace all -dev by -test and save the changed template.

  4. Deploy changed template with the following parameters. This step might take a while.
    Deploy Template

Use ARM Quickstart Template from GitHub

  1. Open Azure Quickstart Templates on GitHub.

  2. Take a look at Quickstart Templates on GitHub. In particular, look for the docker-simple-on-ubuntu template (link).

  3. Take a look at the UI for the Quickstart Templates in the Azure Portal. Again, look for the Deploy an Ubuntu VM with Docker Engine template (link).

  4. Discussion points:

    • Why are the Quickstart Templates so useful?
    • Describe different ways of deploying them (PowerShell, using the embedded Deploy to Azure button)
    • How does the Deploy to Azure mechanism work?
  5. In the next example, we are going to need a Docker host. Use the button Deploy to Azure in the Quickstart Template to deploy a Docker host in your Azure subscription.
    Deploy to Azure

  6. Use the following settings when deploying the Docker host (note that you have to choose your own unique names for storage account and DNS name):
    Deploy to Azure settings

  7. Make sure that your deployment was successful. If it was, you are prepared for the next exercise.
    Deployment successful

Further Ideas

If you have time left, you could additionally cover topics like:

  • Demonstrate ARM template support in Visual Studio
  • Create and deploy ARM template from scratch using Visual Studio project
  • Deploy ARM template using a PowerShell script
  • Deploy a more complex template from Azure Quickstarts