Git Product home page Git Product logo

adm-quickstart's Introduction

Project Name

This quickstart deploys a simple hello-world webapp to two regions in a staged manner using Azure Deployment Manager (ADM). For more information, see:

Prerequisites

To complete the quickstart, you need:

  • An Azure subscription: if you don't have an Azure subscription, create a free account before you begin.

  • Install the Azure Az PowerShell: For the instructions, see Owerview of Azure PowerShell.

  • Install the Az.ManagedServiceIdentity module. Run the 'New-AzUserAssignedIdentity' cmdlet in a PowerShell window and if you get an error signature like "The term 'New-AzUserAssignedIdentity' is not recognized as the name of a cmdlet", run the following command in a PowerShell window opened in Administrator mode.

    Install-Module -Name Az.ManagedServiceIdentity
    
  • Install Git. For the instructions, see Install Git.

Details

This project contains:

  • The App directory: contains the code and scripts that make up the WebApp. This code at the time of this writing was taken from the Azure NodeJS based WebApp sample.
  • The Deploy directory: contains the artifacts and scripts that are used to deploy the app using ADM. This also includes the templates/parameters files required to create the ADM resources that deploy the WebApp.
  • The Deploy/ArtifactRoot directory: Contains the ARM Template and Parameters files for the WebApp deployment. These are given to ADM and used by ADM to orchestrate your WebApp deployment. The WebApp code in App directory is packaged into a zip as required for deployment and is stored in the bin directory.
  • The Deploy/DeploymentManagerSetup.ps1 script: creates all the ADM resources, sets up a storage account, uploads the WebApp artifacts (from where this sample is run) to the storage account, creates a User Assigned Identity, creates a role assignment in your subscription for this Identity and proceeds to create a rollout.

Clone the repository

  1. Open Git Shell/Bash.

  2. Run the following git command:

    git clone https://github.com/Azure-Samples/adm-quickstart
    

Run the project

  1. Open Windows PowerShell.

  2. Change directory to github\adm-quickstart\deploy.

  3. Run the following command to connect to Azure:

    Connect-AzAccount
    
  4. Launch the setup script by running the following command. You need to provide a subscription Id, resource group name (the script creates this resource group for you) and location for the resource groups. Make sure to give a subscription Id that is in the Azure account you logged in with. The resourceGroupName value is used to create a storage account and upload the artifacts required. Do not use uppercase letters or special characters in the resourceGroupName and limit the length to about 10 characters.

    .\DeploymentManagerSetup.ps1 -subscriptionId "<subscriptionId>" -resourceGroupName "<resourceGroupName>" -location "<location>"
    

Once you run the script, you can open the resource group in the Azure portal and view the resources getting created. Make sure you select 'Show Hidden Types' option in the resource group view to see the ADM resources.

The WebApps are created in two different target resource groups named ServiceWUSrg and ServiceEUSrg. You can view the WebApp and dependent resources getting deployed to these resource groups once the script runs and as the rollout progresses. The rollout has a Wait Step after deploying to one region to demonstrate how you can introduce steps into your rollout to customize your deployment experience.

After the script completes successfully, it prints the command to track the rollout progress.

Run this command every 2-3 minutes to view the current status of the rollout and the resources that are being created. The rollout will reach a terminal state of 'Succeeded' when all the resources are deployed and all rollout steps are completed.

Clean up

There are 2 resource groups created in addition to the one provided as input to the script and you can clean up all the resources created in your subscription by deleting these 3 resource groups. Search in the portal for the resource groups using and delete them.

Important: Deleting the resource groups will delete all the underlying resources created as part of this quick start.

Alternately, you can run the following commands from PowerShell to delete these resource groups.

Remove-AzResourceGroup -Name <resourceGroupName>
Remove-AzResourceGroup -Name <resourceGroupName>ServiceWUSrg
Remove-AzResourceGroup -Name <resourceGroupName>ServiceEUSrg

Resources

Contributing

If you'd like to contribute to this sample, see CONTRIBUTING.MD.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

adm-quickstart's People

Contributors

deveshguha avatar microsoftopensource avatar mumian avatar msftgits avatar

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.