# 💎 Breakout 4 (optional): Create the infrastructure for our sample app with ARM templates 💎

⏲️ Est. time to complete: 60 min. ⏲️

# Here is what you will learn 🎯

So, this is our last Break-Out session for today. You will now have the challenge to create the ARM template for our SCM Contacts application and deploy it to Azure.

# Table Of Contents

  1. Services
  2. ToDo for You
  3. References / Links
  4. Wrap-Up

# Services

As a reminder, here is the architecture, we want to create:

architecture_day2

# Services to be added

  • Contacts API
    • Azure Web App:
      • Size: S1
      • make it accept only HTTPS traffic
  • Resources / Images API
    • Azure Storage Account:
      • SKU: Local Redundant Storage
      • Kind: StorageV2
    • Azure Web App:
      • Size: S1
      • make it accept only HTTPS traffic
      • configure App Settings:
        • ImageStoreOptions__StorageAccountConnectionString: <CONNECTIONSTRING_OF_STORAGEACCOUNT>
        • ImageStoreOptions__ImageContainer: rawimages
        • ImageStoreOptions-__ThumbnailContainer: thumbnails
        • StorageQueueOptions__StorageAccountConnectionString: <CONNECTIONSTRING_OF_STORAGEACCOUNT>
        • StorageQueueOptions__Queue: thumbnails
        • StorageQueueOptions__ImageContainer: rawimages
        • StorageQueueOptions__ThumbnailContainer: thumbnails
    • Azure Function:
      • Consumption Plan (!)
      • configure App Settings:
        • AzureWebJobsDashboard: <CONNECTIONSTRING_OF_STORAGEACCOUNT>
        • AzureWebJobsStorage: <CONNECTIONSTRING_OF_STORAGEACCOUNT>
        • StorageAccountConnectionString: <CONNECTIONSTRING_OF_STORAGEACCOUNT>
        • QueueName: thumbnails
        • FUNCTIONSWORKER_RUNTIME: _dotnet
        • FUNCTIONSEXTENSION_VERSION:~2_
        • ImageProcessorOptions__StorageAccountConnectionString: <CONNECTIONSTRING_OF_STORAGEACCOUNT>
        • ImageProcessorOptions__ImageWidth: 100
  • Frontend / Single Page Application
    • Azure Storage Account:
      • SKU: Local Redundant Storage
      • Kind: StorageV2
      • Static Website Hosting can't be enabled via ARM templates at the time of writing. Enable it via Azure CLI after the deployment: az storage blob service-properties update --account-name <STORAGE_ACCOUNT_NAME> --static-website --index-document index.html --404-document index.html. To show the URL for it, use: az storage account show -n <STORAGE_ACCOUNT_NAME> --query "primaryEndpoints.web" --output tsv

# ToDo for You

Create one ARM template (plus parameters file) that contains all resources we need. Deploy the resources to a new resource group.

# Wrap-Up

🎉 Congratulations 🎉

You have just automated the deployment of an Azure infrastructure. The next step would be to also automatically deploy the Web Apps / SPA to your infrastructure. We will learn about that on Day 4, when we are talking about Continuous Integration and Continuous Deployment (CI/CD).

On Day 3, we will learn about some additional Azure services that we can add to our application, to be able to store data, search for it and to show you how to do service-to-service communication with a microservice approach.

◀ Previous challenge | 🔼 Day 2