Convert a Single Virtual Machine into a Resilient Application That Uses Autoscale
This IT Pro Challenge helps learners understand how to use the Azure Portal to verify the configuration of a web application, create a custom virtual machine image, create a custom scale set for the image with high availability and autoscaling, and use an Azure Custom Script Extension to deploy an application update to the virtual machines.
Already have an account? Sign In »
In this IT Pro Challenge, learners will understand how to use RDP to connect to an existing virtual machine, use the Sysprep command to generalize, deallocate, and configure an Out Of Box Experience, create a custom virtual machine image, create a custom scale set with high availability and autoscaling, use an Azure Custom Script Extension to deploy an application update to the virtual machines, and use a browser to verify that the application and any changes are implemented properly. The skills acquired in this lab are useful for those pursuing a career as an Azure administrator.
The scenario for this virtual lab is that you are an Azure administrator, and you need to use availability zones and autoscaling to configure high availability. You currently use an Azure resource group with a single virtual machine that hosts a web application, and you need to convert into a scale set that uses availability zones for high availability. Then you need to configure autoscaling and use an Azure Custom Script Extension to deploy an update to the scale set.
Autoscaling is based on the concept of load balancing by providing a means of scaling up/down the computing resources for an application based on need.
High Availability refers to the ability of a system to run at peak levels for a longer than normal period. It allows systems to continue to run even if a component fails.
Availability sets allow you to distribute virtual machines across multiple servers and networks within the same Azure datacenter (location). Using availability sets lowers the impact of any failures on the virtual machines included in the set.
Scale sets are similar to availability sets; they allow you to distribute virtual machines across different fault domains. But, with a scale set, the virtual machines have to be identical in configuration and load balancing. Scale sets allow you to add/remove virtual machines from the scale set, depending on demand.
The Azure Custom Script Extension executes scripts on virtual machines, which is useful for software installation and configuration management.
Verify the web application on a single virtual machine
To begin, you will login to the Azure Portal and get the public IP address of the web application hosted on the virtual machine. You will then verify that the web application is configured correctly by using a browser to navigate to the IP address.
Create a custom virtual machine image
Now you are going to use RDP (Remote Desktop Protocol) to connect to the virtual machine. You will then use the Sysprep command (C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /shutdown) to deallocate, generalize, configure an Out Of Box Experience (OOBE), and shut down the virtual machine. You will then create an image from that virtual machine.
Create a virtual machine scale set that uses autoscale
Now you will create a custom scale set that uses the custom image you created in the previous step of this lab. You need to specify username/password, configure high availability, create a standard load balancer, and then place that load balancer into a new virtual network. Then you will create an autoscale profile that is associated with the scale set you just created. You will create two autoscale rules (scale in/scale out).
Verify network connectivity
Next, you need to create an inbound port rule in the Network Security Group (NSG) associated with the network interfaces of the instances in the scale set you created. Obtain the public IP address of the scale set and verify it in a browser.
Deploy an application update
Finally, to update all of the virtual machine instances in the scale set, you need to add a Custom Script Extension to the virtual machine scale set. Obtain the public IP address of the scale set and verify your changes by navigating to the IP address in a browser.
This section of the lab allows you to validate the work you have done so far to ensure that you followed the steps correctly.
By taking this hands-on lab, you will learn how to use the Azure Portal to verify a web application hosted on a virtual machine, use RDP to create a custom image from the virtual machine, create a virtual machine scale set that has high availability and autoscaling, and use a Custom Script Extension to deploy an application update to all of the virtual machine instances in the scale set.