Skip to content
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

SRE20 - Monitoring Your Infrastructure and Applications in Production

Setting up a demo environment

In Azure CloudShell

Note: the git commands below require some auth setup, see Appendix A at the end of this document.

Get the code

mkdir ~/source
pushd ~/source

# This repo has all the setup scripts for SRE20 and application code
git clone

# This repo has the database schema scripts
git clone

Set up the demo environment

By default, the scripts will set up a resource group named SRE20-${CITY}-${APP_ENVIRONMENT} so each person will have an individual standalone environment.

All of the naming parameters are defined in ./setup/

pushd ~/source/SRE20-Setup

# edit the parameters to meet your needs
code ./setup/



Output from each of the commands in the scripts can be found in a corresponding log file in ./setup/log (e.g. for ./ there will be a ./2-database.log).

Clean up

cd ~
source ~/source/SRE20-Setup/setup/
az group delete -n "${LEARNING_PATH}${SESSION_NUMBER}-app-${CITY}-prod" --yes --no-wait
az group delete -n "${LEARNING_PATH}${SESSION_NUMBER}-db-${CITY}-prod" --yes --no-wait

rm ~/source/SRE20-Setup/setup/.dbpass
rm -rf ~/source/tailwind-traders
rm -rf ~/source/SRE20-Setup


Appendix A: git auth

During the period of time where the code for this demo env lives in private repos, there are two separate sets of git auth that have to be set up a single time:

  1. auth for create alternative credentials. This can be performed by going to the page for the repos (, clicking on Clone, filling out the bottom half of the form and choosing "Save Git Credentials". For more information, see the Azure DevOps documentation. Your alternative credentials ($ and the password you supplied) will be used for the git clone prompts.
  2. auth for create a personal access token by choosing Settings->Developer settings->personal access tokens from the drop down menu under your picture on (when logged in). When you create a person access token, be sure to choose the "[ ] repo Full control of private repositories" scope box. Note: you must also be a member of the Azure-Samples Organization for the repo to be accessible. For more infomation on personal auth tokens see Your github username and the personal access token you created will be used for the git clone prompts.
You can’t perform that action at this time.