Cloud Vendor | Microsoft Azure |
Proficiency Level | Cloud Enthusiast |
Tags | Application GatewayLoad BalancerWeb Server |
Summary
In this lab, you will provision an Application Gateway in Microsoft Azure. You will configure the Application Gateway to balance web traffic between two web servers deployed on Microsoft Virtual Machines.
Each exercise below builds upon the previous one. You should start each new exercise from the last step of the previous exercise unless it is explicitly written otherwise.
Learning Objectives
After completion of this lab, you will be able to:
- Provision an Application Gateway in Microsoft Azure
- Configure the Application Gateway to balance web traffic between Virtual Machines
Prerequisites
To complete this lab, you will need the following:
- Reliable internet connection
- A work, school or personal Microsoft Account used to access Microsoft Azure Management Portal
- A subscription for Microsoft Azure
- You will need to complete the Creating Virtual Network and Subnets in Azure lab
- You will need to create two virtual machines following the Azure VM with Ubuntu and NGINX Web Server lab. When creating the virtual machines, you need to implement the changes described in the Changes in the VM Creation section below.
Changes in the VM Creation
When following the instructions for the Azure VM with Ubuntu and NGINX Web Server lab, implement the following changes:
- In Exercise #1: Provision a Linux VM in Microsoft Azure, do the following changes:
- In Step 6, for the Resource group, select the resource group
networkinglab01-rg
you have created in the Creating Virtual Network and Subnets in Azure lab instead creating a new resource group - In Step 7, use
computelab01-vm02
for the Name of the second Virtual Machine - In Step 14, select the Virtual Network
networkinglab01-vnet
you have created in the Creating Virtual Network and Subnets in Azure lab instead creating a new Virtual Network
Note: Make sure that the Virtual Network and the Virtual Machine are in the same Region - In Step 14, select the
private (10.1.2.0/24)
Subnet you have created in the Creating Virtual Network and Subnets in Azure lab instead creating a new virtual network
- In Step 6, for the Resource group, select the resource group
- In Exercise #5: Modify the web server’s home page, do the following changes:
- In Step 4, type the following
Hello, <code>computelabadmin!</code>! I am virtual machine #01
for the first virtual machine, and
Hello again, <code>computelabadmin!</code>! I am virtual machine #02
for the second virtual machine
- In Step 4, type the following
Exercise #1: Provision an Application Gateway in Microsoft Azure
In this exercise, you will provision an Application Gateway in Microsoft Azure. The Gateway will be provisioned in the already created Virtual Network.
Steps
-
- Sign into the Microsoft Azure Management Portal at http://portal.azure.com using your Microsoft Account
- Click on
in the upper left corner right under the logo
- In the search box search for Application Gateway
- Click on the
button
- On the Create an application gateway blade, on the Basics tab, in the Project details section, fill in the following information:
Resource group →networkinglab01-rg
- In the Instance details section, fill in the following information:
Application gateway name →networkinglab01-ag
Region →(US) West US 2
Tier →Standard V2
Enable autoscaling →No
Instances →2
Availability zone →None
HTTP/2 →Disabled
- In the Configure virtual network section, fill in the following information:
Virtual network →networkinglab01-vnet
Subnet →public (10.1.1.0/27)
- Click on the
button, and fill in the following information:
Frontend IP address type →Public
Public IP address →Create new
Public IP address Name →networkinglab01-ip
- Click on the
button
- Click on the
link
- On the Add a backend pool blade, fill in the following information:
Name →networkinglab01-ag-bepool
- In the Backend targets section, select
Virtual Machine
as the target type - Select
computelab01-vm01
in the first row - Repeat Step 12 and Step 13 for
computelab01-vm02
in the second row - Milestone step: At this point, you have learned how to add a backend pool to the Application Gateway
- Click on the
button
- Click on the
button
- Click on the
button
- On the Add a routing rule blade, fill in the following information:
Name →http-rule
- On the Add a routing rule blade, on the Listener tab, fill in the following information:
Name →http-listener
Frontend IP →public
Protocol →HTTP
Port →80
Listener type →Basic
Error page URL →No
- On the Add a routing rule blade, on the Backend targets tab, fill in the following information:
Backend target →networkinglab01-ag-bepool
HTTP settings →Create new
- On the Add an HTTP setting blade, fill in the following information:
Name →http-besetting
- Click on the
link
- Milestone step: At this point, you have learned how to add a routing rule to the Application Gateway
- Click on the
button
- Click on the
button
- On the Tags tab, add the following tags:
Role →web
Lab →networkinglab01
Owner →<your name>
OwnerEmail →<your email>
- Click on the
button
- Review the summary and click on the
button
- Wait until the deployment is completed
- Once the deployment is completed, click on
in the left-hand menu list
networkinglab01-rg
resource group in the list and click on it
the - Milestone step: At this point, you have learned how to provision and configure an Application Gateway in the Microsoft Azure cloud. Note that although you requested the creation of a single resource, multiple were created. Verify that you have the following resources in your
networkinglab01-rg
resource group:
networkinglab01-ag
Application Gateway
networkinglab01-ip
Public IP Address
Exercise #2: Testing an Application Gateway in Microsoft Azure
In this exercise, you will test the Application Gateway that you created in Microsoft Azure. You can test the Application Gateway by accessing its IP address from a browser.
Steps
- Click on the
networkinglab01-ag
Application Gateway resource - In the Overview tab, note the Frontend public IP address
- Open a new browser window, and paste the above IP address in the Address Bar
- Milestone step: The page shows the home page of the NGINX server on
computelab01-vm01
- Refresh the page in the browser
- Milestone step: The page shows the home page of the NGINX server on
computelab01-vm02
Note: Depending on your browser’s caching settings, you may need to refresh the page more than once to see the second home page
Last Update: October 28, 2019
You must be logged in to post a comment.