1

I have created a Azure Scale Set upto 3 Linux VMs using the Azure Portal. I have successfully installed java, maven and git on the first VM. I was able to run my App on the first VM.

I have a fan out trigger at 60% and fan in at 25%. Whenever my processing exceeds 60% a new VM is started.

But how do I deploy my app on the second VM? I have gone through this and found the second option custom VM image suitable for my purpose. But I fail to understand how it is achieved.

Is there a easier way or do I have to manually install everything that I did on my first VM?

amitection
  • 2,696
  • 8
  • 25
  • 46

2 Answers2

2

You have several options available to do this, detailed here

  • From a single image that you keep refreshing each time you update the app or the os
  • using a VM Extension - refresh the extension url each time you want to update the vms, and then issue a ps or rest command to roll out the updates
  • use something like puppet/chef/dsc to pull updates from somewhere and install them - you could use msdeploy for example
  • use msdeploy from a script that iterates your vms and remote deploys.

I'm sure there are other ways too...

Russell Young
  • 2,033
  • 1
  • 14
  • 12
1

To do this, you will need to create a generalized VM image, put it into a storage account, then create a scale set based on that image.

Here are instructions for creating a generalized Windows VM image, see here: https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-classic-createportal/ For Linux, see here: https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-upload-vhd/

Once the image is in a storage account, you can use this example template to deploy it in a scale set (assumes Windows image): https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-windows-customimage

Hope this helps! :)

Neil Sant Gat
  • 857
  • 6
  • 10
  • Thanks! got it working. Used [this](https://msftstack.wordpress.com/2016/06/20/how-to-convert-an-azure-virtual-machine-to-a-vm-scale-set/) as a reference. – amitection Oct 12 '16 at 04:32