Exercise 2: Deploy a Virtual Machine Scale Set(VMSS) using PowerShell Desired State Configuration(DSC)
Task 1: View ARM Template
GOAL: To review an ARM template that is located on our lab VM(F:\Mod03\Labfiles\Starter\vmss.json)
Lab VM → This PC → F:\Mod03\Labfiles\Starter\vmss.json → Open with Code
Task 2: Deploy a Windows VMSS using ARM
GOAL: To deploy a VM scale set into a new resource group called“MOD03VMSS“ with a minimum of two“instance count” and“overprovisioning” allowed
Azure Portal → Create a resource → Template deployment → Create → Build your own template in the editor → Load file → F:\Mod03\Labfiles\Starter\vmss.json → Save
Complete the following:
Resource group: Create new →“MOD03VMSS”
Location: East US
Instance Count: 2
Overprovision: true
Configuration Module Url: URL of the blob that we uploaded our DSC configuration script to
With overprovisioning turned on, the scale set actually spins up more VMs than you asked for, then deletes the extra VMs once the requested number of VMs are successfully provisioned. Overprovisioning improves provisioning success rates and reduces deployment time. You are not billed for the extra VMs, and they do not count toward your quota limits.
Task 3: Validate VMSS Instances are Serving Web Content
GOAL: To obtain the public IP address of the VMSS and verify that it is now serving web content
Exercise 3: Cleanup Subscription
GOAL: To delete the two resource groups(“MOD03VDSC“ and“MOD03VMSS“) that were created in this module
Browse to “shell.azure.com” → Bash
[code language=”bash”]
az group delete –help
# shows the arguments that we can use when deleting a resource group
az group delete –name MOD03VDSC –no-wait –yes
az group delete –name MOD03VMSS –no-wait –yes
[/code]