1
votes

Not sure if anyone has interest on this.

After reading the doc about Virtual Machine Scale set(VMSS) and I have tried to deploy the quickstart template. It runs pretty well. But I have a question: Do I have to deploy my app to every one of the instances?

For example, I want to deploy an IIS server hosting website. Do I have to deploy it to every VM auto scaled by VMSS? Or it is similar to Azure Web App service, which I only have to deploy once and the service will do it for me when auto scaling?

In that quickstart template, an installation script is triggered when deploying the template. Do I have to do the same?

"extensionProfile": {
  "extensions": [
  {
    "name": "lapextension",
    "properties": {
      "publisher": "Microsoft.OSTCExtensions",
      "type": "CustomScriptForLinux",
      "typeHandlerVersion": "1.3",
      "autoUpgradeMinorVersion": true,
      "settings": {
      "fileUris": [
        "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-vmss-lapstack-autoscale/install_lap.sh",
        "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-vmss-lapstack-autoscale/index.php",
        "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-vmss-lapstack-autoscale/do_work.php"
       ],
       "commandToExecute": "bash install_lap.sh"
     }
   }
 }
1

1 Answers

1
votes

The basic premise behind scale sets is that you deploy a functional server, and the build script that you have takes care of bringing it to that state.

So if you want a set of NGINX servers, you would have a build script that installed NGINX, copied config files, certificates. Then connected to / copied data.

The idea is that the scale set will automatically build and destroy machines as needed, but it needs to know what it has to build to do that. So when a new machine needs building it will refer to the build template to understand what needs to be done.

Its not as automatic as Azure Websites, but once you have the initial build working it is very much a case of deploy and forget.

If you have any further questions, ask in comments and I'll incorporate it into the answer...