Warning
If these labs already exist then skip this step.
In the Azure Education section create 2 new labs:
Troubleshooting - Instructor
Troubleshooting - Instructor <Name>
Troubleshooting - TA
Troubleshooting - TA <Name>
Note
The instructor should then accept their lab assignment (you can hit the Setup button that pops up to do this without checking your email). TAs will accept theirs in the next step.
Before discussing the issues and their solutions each of you must first set up the broken deployment. This will require you to refresh the az CLI
cache to recognize and set your new lab subscription as the default:
az CLI
¶First up we need to clear the AZ CLI cache:
> az account clear
Now we need to login again which will present us with the form to authenticate:
> az login
Will print out list of all your subscriptions. Look for the one with the name Troubleshooting - TA <Your Name>
. Then copy the id
field value:
{
"cloudName": "AzureCloud",
"homeTenantId": "d61de018-082f-46bb-80e0-bbde4455d074",
"id": "095dea07-a8e5-4bd1-ba75-54d61d581524",
"isDefault": true,
"managedByTenants": [],
"name": "Troubleshooting - TA <Your Name>",
"state": "Enabled",
"tenantId": "d61de018-082f-46bb-80e0-bbde4455d074",
"user": {
"name": "[email protected]",
"type": "user"
}
}
Assign this as the az cli subscription:
> az account set -s "095dea07-a8e5-4bd1-ba75-54d61d581524"
After configuring the AZ CLI to use the new subscription set the defaults for the correct resource group and virtual machine:
> az configure -d group=linux-ts-rg vm=broken-linux-vm
Warning
You will not need to edit the scripts at all. They will deploy the application and break a few things that this article will walk your group through fixing.
Clone the setup scripts repo and switch to the tps-reports
branch:
> git clone https://github.com/LaunchCodeEducation/powershell-az-cli-scripting-deployment
> cd powershell-az-cli-scripting-deployment
> git checkout tps-reports
Then run the script:
> ./full-deployment.ps1