Deploy VM Scale Set with Python Bottle server & AutoScale

Azure Public Test Date Azure Public Test Result

Azure US Gov Last Test Date Azure US Gov Last Test Result

Best Practice Check Cred Scan Check

Self-contained Ubuntu autoscale example which includes a Python Bottle server to do work. The VM Scale Set scales up when average CPU across all VMs > 60%, scales down when avg CPU < 30%.

Bicep Version

Deploy To Azure Deploy To Azure US Gov Visualize

  • Deploy the scale set with an instance count of 1.
  • After it's deployed look at the resource group public IP address resource (in portal or resources explorer). Get the IP or domain name.
  • Browse to the website of vm#0 (port 9000), which shows the current backend VM name.
  • To start doing work on the first VM browse to dns:9000/do_work.
  • After a few minutes the VM Scale Set capacity will increase. Note that the first scale out takes longer than subsequent scale outs while the autoscale pipeline gets initialized. For example, wait up to 30 minutes before you conclude there's a problem.
  • You can stop doing work by browsing to dns:9000/stop_work.

To learn more about how to deploy the template, see the quickstart article.

Tags: Microsoft.Network/virtualNetworks, Microsoft.Network/publicIPAddresses, Microsoft.Network/loadBalancers, Microsoft.Compute/virtualMachineScaleSets, CustomScript, Microsoft.Insights/autoscaleSettings, ChangeCount