AZURE AUTOMATION DSC AND SCALESETS
I have been using Azure DSC extension (PowerShell Desired State Configuration) for my Resource Group deployment templates. I have recently started using Automation DSC as the pull server and I must say that I am quite impressed with the way the whole set up works. For my VM scale set, setting up and synchronizing changes has now become a piece of cake.
In addition to this, the PowellShell gallery is a big plus. I found many important DSC modules that allowed me to configure IIS, Network, Firewall and various other parameters of my VMs. If you are still not satisfied most of this is open source so you can download, modify, fork and contribute too. Not only you can install PowerShell modules directly to your automation account from PowerShell gallery but also from the Automation Account you can browse and import modules. You can also upload a PowerShell module in a zip file. The imported modules are available for use and can be referenced in your DSC scripts.
Azure VM scale sets allow for scaling IaaS VMs based on the specified criteria. Since they work by performance counters you can use any built-in counter or custom counters and add them to your ARM template. This allows for specifying those counters for scaling based on you preferred criteria. In my case I am not using the auto scaling feature built into Azure scale sets but instead using Automation account to periodically check and scale it. The reason is the nature of our workloads. It requires that we only de-allocate certain VMs and under certain conditions. When scaling down I only de-allocate VMs so that we do not get any compute costs and when scaling out I start the VMs using the rest API. This way I get very quick scale out performance compared to getting new VMs that need to join domain and install several tools via DSC and Chocolatey. If there are no more pre de-allocated VMs that can be scaled to then I use the API to scale out further.
It is working great so far and since the storage costs are not that high, keeping those additional VMs is not a problem. Given the importance of scaling out quickly and working with some licensing constraints that we have from various suppliers this solution is ideal for us. Despite all this I would not recommend manually scaling out unless the workloads are specialised and require this type of fine grain control. I believe that in most cases the auto scaling mechanisms should suffice.