How to manage Application version for VM 39 s in Azure Autoscaling group

0 votes

I am running an application with autoscaled Azure VM. Let's suppose the current version of application is 1.0 is being served by 4 VM's as per the current load on application. Now, if I have a patch update and release a new version of application,i.e 2.0, then how will this new version of application updated to the currently VM's running? If load increases, and new VM gets started, they all will be having this new version of application 2.0, but the previously running 4 VM's, will they have this new version of application? And if yes, how? Can anyone solve my query?

Thanks

Apr 23, 2018 in DevOps on Cloud by Atul
• 10,240 points
1,154 views

1 answer to this question.

0 votes

First of all, You have to launch Azure VMSS from ARM Template which will be having Custom Image as Source Image instead of Image from Marketplace. If you want to update application on VMs, again create a Custom image of VM having updated application and then update this new VM in VMSS with Powershell. Azure VMSS then automatically update all VMs in Scale Set with updated Image. Below is the code for Updating existing VMSS with new Custom Image.

  $rgname = "myrg"
    $vmssname = "myvmss"
    # get the VMSS model
    $vmss = Get-AzureRmVmss -ResourceGroupName $rgname -VMScaleSetName $vmssname
    # set the new version in the model data
    $vmss.virtualMachineProfile.storageProfile.imageReference.id = $newImageReference
    # update the virtual machine scale set model
    Update-AzureRmVmss -ResourceGroupName $rgname -Name $vmssname -VirtualMachineScaleSet $vmss
    # now start updating instances
    Update-AzureRmVmssInstance -ResourceGroupName $rgname -VMScaleSetName $vmssname -InstanceId $instanceId
I hope this will work for you.

answered Apr 24, 2018 by shubham
• 7,340 points

Related Questions In DevOps on Cloud

0 votes
1 answer

How to use specific node version for yarn setup in AWS deployment?

You should be able to set your ...READ MORE

answered Jul 20, 2018 in DevOps on Cloud by Kalgi
• 52,350 points
1,011 views
0 votes
1 answer
0 votes
0 answers
0 votes
1 answer

How to control development/prod/staging application settings using azure functions?

You should use a build-release system like ...READ MORE

answered May 11, 2018 in DevOps on Cloud by ajs3033
• 7,300 points
1,505 views
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
3,925 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,034 views
+2 votes
3 answers

How do I deploy Scala PlayFramework Project to IBM Bluemix

It seems that they are more than ...READ MORE

answered Oct 18, 2018 in DevOps on Cloud by lina
• 8,220 points
1,226 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP