Skip to content

Latest commit

 

History

History
72 lines (41 loc) · 3.95 KB

azFunctions-deployment.md

File metadata and controls

72 lines (41 loc) · 3.95 KB

Deployment Details

This page describes step by step how to deploy the Azure URL Shortener. To learn more about how the deployment was built see the section below

Deployment with the Deploy to Azure Button

Deploy to Azure

This will open the Azure Portal (portal.azure.com) in your subscription and create the required resources.

createARM

  • Resource group: Logical group where your resources will be created.
  • Location: Select a location (usually closer of your users)
  • Base Name: This is how you would like to named your resources. Because some names need to be globally unique, the deployment will generate a suffix and append it to the end of your Base name.
  • Frontend: Select the frontend that will be deploy. Select 'none', if you don't want any. Frontend available: adminBlazorWebsite, none.
  • Default Url Redirect: Default URL use when the key pass by the user is not found.
  • GitHub URL and Branch: Keep the default if you when to deploy from Frank's master repo.

Setting for adminBlazorWebsite (Required only if frontend = adminBlazorWebsite)

  • Frontend-Admin E Mail: The EMail use to connect into the admin Blazor Website.

  • Frontend-Admin Password: Password use to connect into the admin Blazor Website. It MOST have:

    • an uppercase character
    • a lowercase character
    • a digit
    • a non-alphanumeric character
    • must be at least six characters long
  • Expire On and Owner Name: Those value are for tags. They won't affect in any cases your deployment. I use it in another project (AzSubscriptionCleaner) to clean my subscription; without this project it's just information.

Once all the resources are created you will end-up with:

  • Azure Function: Where the code from the project src/shortenerTools will be copy.
  • Service Plan: Dynamic service plan (aka. Consumption Plan) to make sure you are only charged on a per-second granularity.
  • Application Insights: To get some metric/ usage of our function. (In the future we could Frontend that information in a friendly web UI)
  • 2 Storage account: 1 for the Azure Function, the second use as Data Storage leveraging the Azure Table storage.

ArmResult


Deploy using Azure CLI

An alternative method to deploy is to use the Azure CLI command that you can find in the debug.azcli file.


How the Deployment works

The deployment uses Azure Resource Manager (ARM) template, one for the Azure Function, and one for the frontend.

You can deploy each part individually by using the respective ARM template in the deployment folder or all together. To get that possible, the templates were nested.

You can learn more about it on Using linked and nested templates when deploying Azure resources in the Microsoft documentation, watching this video where I explains how I built this deployment.

Thumbnail of the YouTube video about the Nested ARM template deployment

There also a blog post: Simplify your deployment with nested Azure Resource Manager (ARM) templates

If you are interested to see the ARM templates before-after you can go in the Tutorial Section