Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

Latest commit

 

History

History
65 lines (53 loc) · 3.8 KB

challenge-bo-3.md

File metadata and controls

65 lines (53 loc) · 3.8 KB

Break Out #3: Create the infrastructure for our sample app with ARM templates

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.

Services

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

architecture_day2

Services to be added

  • Contacts API
    • Azure Web App:
      • Size: B1
      • make it accept only HTTPS traffic
  • Resources / Images API
    • Azure Storage Account:
      • SKU: Local Redundant Storage
      • Kind: StorageV2
    • Azure Web App:
      • Size: B1
      • 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
        • FUNCTIONS_WORKER_RUNTIME: dotnet
        • FUNCTIONS_EXTENSION_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.

References / Links

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 microsoervice approach.