How to enable automatic scaling on azure Virtual Machine Scale Sets using ARM template
Automatic scaling of virtual machines in a scale set is the creation or deletion of machines in the set as needed to match performance requirements. As the volume of work grows, an application may require additional resources to enable it to effectively perform tasks.+
Automatic scaling is an automated process that helps ease management overhead. By reducing overhead, you don’t need to continually monitor system performance or decide how to manage resources. Scaling is an elastic process. More resources can be added as the load increases. And as demand decreases, resources can be removed to minimize costs and maintain performance levels.
How to enable automatic scaling at the time of resource deployment:
step 1 -make sure that you have virtualMachineScaleSets resource in ARM . check line 532 in attached template
Step 2- make sure that you have arm resource code to add “IaaSDiagnostics” extension to the vm scale set. check line 582 in attached template
Step 2 – Make sure that you have ARM for auto scale setting configuration once you provisioned vm scale set. check line 714 in attached template
Step 3 – deploy the ARM using below commands
#Select-AzureRmSubscription -SubscriptionId "982b17bd-3d27-4da0-7645-40aa55e8v6c7"
Test-AzureRmResourceGroupDeployment -ResourceGroupName $rg -TemplateFile "C:\My\template1.json" -TemplateParameterFile "C:\My\parameters1.json"
$result = New-AzureRmResourceGroupDeployment -name $rg -ResourceGroupName $rg -TemplateFile "C:\My\template1.json" -TemplateParameterFile "C:\My\parameters1.json"
Template and parameter file download – template
Note- the template have additional components like azure service fabric which is using the auto scaled vm scale set
(Visited 3,465 times, 1 visits today)