0

im currently looking to move our VM's into a Scale Set, But i am facing an issue with updating the VM's. I’ve got a base Image from which I spin up a ScaleSet having 5 instances. Now I have an application update that needs to be pushed to each of these 5 servers, what will be the most suitable and convenient process to achieve this. I had done some research on this and one of the possible solutions was to ;

  1. Create a New image with the updated application code

  2. Run a Powershell script in templates which replaces the old Image with the newer image and update the Vm’s accordingly.

I am using asp.net for my application. So how do i go about updating each of the VM's in a scale set when ever there is an application update. I was advised that we could use chef/puppet, but this will work out too expensive at $120 per node

Could someone please suggest a simpler solution. Any help is much appreciated

avshetty
  • 11
  • 1
  • 4

3 Answers3

0

Use a script\dsc extension to push updates to your app. the process is straight forward and work exactly the same as single VM.

https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-dsc

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
0

The scale set "rolling upgrade" feature (currently in preview: https://github.com/Azure/vm-scale-sets/tree/master/preview/upgrade) could probably help; with this feature you simply create your new image, then update the scale set model with the new image, then the scale set will roll out the new image in batches over your infrastructure.

Hope this helps!

Neil Sant Gat
  • 857
  • 6
  • 10
0

Use powershell to deploy to the scaleset. Works like a charm for me :)

$customConfig = @{
"fileUris" = @("https://$storageAccountName.blob.core.windows.net/scripts/script.ps1");
"commandToExecute" = "PowerShell -ExecutionPolicy Unrestricted .\script.ps1";
};
 $vmss = Get-AzureRmVmss -ResourceGroupName $resourceGroup -VMScaleSetName $vmssname
Add-AzureRmVmssExtension -VirtualMachineScaleSet $vmss -Publisher Microsoft.Compute -Type CustomScriptExtension -TypeHandlerVersion 1.8 -Name "runscript" -Setting $customConfig
# Send the new config to Azure
Update-AzureRmVmss -ResourceGroupName $resourceGroup -Name $vmssname -VirtualMachineScaleSet $vmss
JonnyD
  • 59
  • 1
  • 5