Azure Infrastructure Solutions

This Azure Infrastructure Solutions IT Pro Challenge helps learners understand some of the services in the Azure platform and develop knowledge of cloud-based management technologies regarding security, governance, procurement, and administration.

Time
1 hour 45 minutes
Difficulty
Beginner
Share
NEED TO TRAIN YOUR TEAM? LEARN MORE
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

This Learn On Demand Pro Series is part of a Career Path: Become an Azure Cloud Engineer
Overview

In this Azure Infrastructure Solutions IT Pro Challenge, learners will understand how to configure virtual machines using custom script extensions and PowerShell DSC extensions, deploy virtual machines with availability sets and scale sets, use managed disks to create snapshots or create managed disks using a snapshot, and configure scale rules and real-time metric alerts. Learners will understand how to test these configurations to verify the proof of concept. The skills acquired in this lab are necessary for careers in knowledge management, program/project management, and technical support.

Overview

This hands-on lab will take you through a series of tasks using Azure services. You’ll begin by deploying virtual machines using the Azure portal and Azure PowerShell. You will also learn about availability sets and how to add virtual machines to availability sets using the Azure portal and Azure PowerShell. The next part of the lab deals with enabling and testing near real-time alerts; you will learn how to create several alerts through the Azure portal, and you will understand the advantage of near real-time alerts over conventional metric alerts.

You will also learn about the Desired State Configuration (DSC) and custom script extensions and how to use them to configure and deploy virtual machines. Next, you will learn about managed disks and disk snapshots and how to use them to configure and deploy virtual machines. Finally, you will learn how to use autoscaling, scale sets, and how to create rules for scale sets and test those rules.

Configure Azure Cloud Shell

To begin this virtual lab, you will log in to the Azure portal, launch Cloud Shell, and then PowerShell to create a new file share.

Deploy highly available virtual machines by using Azure portal and Azure PowerShell

In this part of the lab, you will use the Azure portal to create highly available virtual machines. To do this, you will create an availability set, and then you will create and add virtual machines to the availability set using two methods: Azure portal and Azure PowerShell.

High Availability refers to the ability of a system to run at peak levels for a longer than standard 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.

Add a virtual machine to the availability set by using Azure portal

In this step, you will use the Azure portal to create a virtual machine and associate it with the availability set you created in the previous task.

NOTE: Once created, you cannot move a virtual machine in/out of an availability set. If you need to change the virtual machine’s availability set, you have to provision a new virtual machine.

Add a virtual machine to the availability set by using Azure PowerShell

Now you will use PowerShell to provision a new (second) virtual machine that is associated with the availability set that you created at the beginning of the lab.

Enable near real-time alerts

Near real-time alerts is an improvement over the typical metric alert. With near real-time alerts, you can monitor metric alerts as often as every 1 minute, create a rule that monitors multiple metrics, and use action groups to send texts or emails when an alert is triggered.

In the Azure portal, select the resource that you want to monitor. Then, you add the near real-time alert and select the metric that you want to monitor and the frequency.

Test the alert

To test the alert you just created, you need to create a condition that will trigger the alert you just created.

Configure virtual machines by using custom script extensions and Desired State Configuration (DSC)

Custom script extensions and Desired State Configuration (DSC) are used when you need to ensure that the configurations of virtual machines have identical configurations.

You will first use a custom script extension to configure one of the virtual machines that you deployed earlier in the lab. The script you’re using creates a firewall rule to allow HTTP traffic, installs IIS (a Windows web server), and updates the default webpage of the web server.

Configure a virtual machine by using a DSC

Now you are going to use DSC to configure one of the virtual machines that you deployed earlier in the lab. This configuration will be identical to the one you created in the previous step using custom script extensions.

Confirm the IIS installation on BackendVM01 and BackendVM02

To confirm the installation of IIS on the virtual machine(s), you need to select the virtual machine from the Azure portal menu and obtain the public IP address. Then, open a browser window and go to the IP address.

Deploy a virtual machine by using a DSC in an ARM template

Another way to ensure that virtual machines have identical configurations is to automate virtual machine deployments using an ARM template.

The Azure Resource Manager (ARM) is a management service that allows you to manage Azure resources. One of the things that ARM allows you to do is use templates rather than scripts to manage resources and infrastructure. An ARM template is a JavaScript Object Notation (JSON) file that contains the resources that you want to deploy to Azure.

Confirm deployment of BackendVM03

Now you are going to use Azure portal to confirm the deployment of one of the virtual machines you created earlier. When you look at the Availability + scaling settings, you should see the virtual machine with the right availability set. Then, you’ll open a browser and paste the public IP address of the virtual machine to verify the deployment.

Work with managed disk snapshots

Azure managed disks are storage volumes used by virtual machines. You will create a snapshot from a managed disk, create a second managed disk, and then use the managed disk to create a virtual machine.

To prepare for the next few tasks, you first need to prepare the virtual machines by stopping (deallocating) them.

Create a disk snapshot

In the Azure portal, you will use Azure Marketplace to search for Snapshot and then create a disk snapshot.

Create a managed disk from a snapshot

Now you will search for Managed Disks in Azure Marketplace and create a managed disk from the snapshot you created in the previous step.

Deploy a virtual machine by using a managed disk

In the Azure portal, navigate to the blade for the managed disk you just created and create a virtual machine. The image name of the virtual machine should be the name of the managed disk.

Confirm deployment of BackendVM04

To verify the deployment of the virtual machine that you just created, obtain the public IP address of the machine, and use a browser to navigate to the IP. If you get a success message, you know that the deployment was successful.

Deploy a scalable virtual machine infrastructure

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 give you flexibility because they allow you to add/remove virtual machines from the scale set depending on demand.

You can use the Azure portal, Azure CLI, Azure PowerShell, or ARM templates to deploy scale sets. For this lab, you will use an ARM template to deploy a scale set that supports autoscaling, create an alert rule, configure an autoscale rule, and then test the alert and autoscale rules.

Before proceeding, you need to create a custom ARM template deployment and use the ARM template to create a scale set and define the autoscale settings.

Disable autoscaling rules

Autoscaling is based on the premise of load balancing by providing a means of scaling up/down the computing resources for an application based on need. When you disable autoscaling, it allows you to manually control the number of instances or invoke scale up/scale down events via external management or monitoring software.

Configure an autoscaling rule

In this task, you will use the Azure portal to create a custom autoscale rule based on several thresholds and scale conditions.

Test the alert and the scale set rules

Finally, you will navigate to the resource group and select the scale set you just created. To test the alert and the scale set rules, you will trigger a series of scale up and scale down events.

Summary Conclusion

By taking this virtual lab, you will become comfortable with several Azure services and methodologies, including:

  • Deploying highly available virtual machines that use availability sets.
  • Deploying a scalable virtual machine infrastructure with virtual machines that use scale sets.
  • Configuring scale rules for scale sets.
  • Configuring virtual machines by using custom script extensions.
  • Configuring virtual machines by using PowerShell DSC extensions.
  • Deploying virtual machines by using DSC extensions defined in ARM templates.
  • Using managed disks to create snapshots, managed disks from snapshots, and virtual machines using managed disks.
  • Configuring real-time metric alerts.

LEARN MORE. ACHIEVE MORE.

Follow A Path

Deciphering the essentials to enter a new career is hard, so we did it for you!

Focus on building your skills and take this learn on demand pro series in a guided Career Path.

Learning Partner
Comprehensive Learning

See the full benefits of our immersive learning experience with interactive courses and guided career paths.