Giter Club home page Giter Club logo

contosoexpensesarm's Introduction

ContosoExpensesARM

The purpose of this template is to deploy the complete Contoso Expenses aplication to Azure. The following resources will be deployed.

  • 2 Web Applications (Web and API)
  • 1 Function App
  • 2 Storage Accounts
  • 1 SQL Database
  • 1 SendGrid Email

This template uses GitHub integration to deploy to the Azure WebApps and Azure Function. It will also restore the database using a .bacpac file.

Steps to deploy

  1. Run requirements script
  2. Deploy the template
  3. Configure SendGrid

Run requirements script

Folder pre-reqs contains a PowerShell script that you need to run in order to copy the database to a storage account in your subcription.

Run the script and make sure to copy the output somewhere since it will be used in the template deployment phase.

C:\..\ContosoExpensesARM\pre-reqs> .\Create-Storage-Account-And-Copy-DB.ps1

Successfully Signed-in
Created resource group
Created storage account
Created storage container
Successfully uploaded .bacpac to storage account

 ----                  OUTPUT                  
 - RESOURCE GROUP NAME: ContosoExpensesARM12345671
 - STORAGE ACCOUNT NAME: sqlimport4516281
 - STORAGE ACCOUNT KEY: sZ+1FFaHRvoHJYsSlvv1T3F3OIetCPWY8LiGLM0hjmwfJWPke5LHz5d2vHc5Q9EOPRmeXp+4AADVAUq5UG7HKkWA==
 - KEEP THIS INFORMATION AS IT WILL BE REQUIRED FOR DEPLOYING -

Deploy the template

To deploy the ARM template click the Deploy to Azure button. Fill in the required fields.

Deploy to Azure

Screenshot

Make sure the information copied previously is used in the this deployment phase.

Configure SendGrid

After deploying the template successfuly the SendGrid resource is already deployed in Azure but we need to generate an API Key and add it to the Azure Function Settings.

  1. Go to the Azure Portal and navigate to your SendGrid resource.
  2. Go to Configurations and copy the username that was automatically created.

Screenshot

  1. Go to http://app.sendgrid.com/ and log in using the username copied just now and the password created during the template deployment step.

Screenshot

  1. Expand the Settings tab on the left menu and click API Keys.

Screenshot

  1. Click Create API Key.
  2. Fill in the name of the key and select Full Access for the type of key.

Screenshot

  1. Copy the API Key that was generated by SendGrid.

Make sure you save the API Key somewhere as this is the only time you will be able to see it.

Screenshot

  1. Go to the Azure Portal once again and navigate to your Azure Function.

  2. Open your Azure Function and click Application Settings.

Screenshot

  1. Update the SendGridApiKey with the value you copied from the SendGrid portal and Save

Screenshot

That's it, you are ready to start!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.