0% found this document useful (0 votes)
16 views

Lab23 - Understanding Availability set and Load balancer - Azure

Uploaded by

raj0000kaml
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Lab23 - Understanding Availability set and Load balancer - Azure

Uploaded by

raj0000kaml
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 164

Cloud Computing - Azure

Lab23– Understanding Availability Set and Load balancer – Azure


Availability set

An Availability Set is a logical grouping capability that you can use in Azure
to ensure that the VM resources you place within it are isolated from each
other when they are deployed within an Azure datacenter. Azure ensures
that the VMs you place within an Availability Set run across multiple physical
servers, compute racks, storage units, and network switches. If a hardware
or Azure software failure occurs, only a subset of your VMs are impacted, and
your overall application stays up and continues to be available to your
customers. Availability Sets are an essential capability when you want to
build reliable cloud solutions.

Let’s consider a typical VM-based solution where you might have four front-
end web servers and 2 back-end VMs. With Azure, you’d want to define two
availability sets before you deploy your VMs: one availability set for the web
tier and one availability set for the back tier. When you create a new VM you
can then specify the availability set as a parameter to the az vm create
command, and Azure automatically ensures that the VMs you create within
the available set are isolated across multiple physical hardware resources. If
the physical hardware that one of your Web Server or back-end VMs is
running on has a problem, you know that the other instances of your Web
Server and back-end VMs remain running because they are on different
hardware.

Use Availability Sets when you want to deploy reliable VM-based solutions in
Azure.

Load Balancer

With Azure Load Balancer, you can scale your applications and create high
availability for your services. Load Balancer supports inbound and outbound
scenarios, provides low latency and high throughput, and scales up to
millions of flows for all TCP and UDP applications.

Load Balancer distributes new inbound flows that arrive on the Load
Balancer's frontend to backend pool instances, according to rules and health
probes.

Page 1 of 164
Cloud Computing - Azure

Additionally, a public Load Balancer can provide outbound connections for


virtual machines (VMs) inside your virtual network by translating their
private IP addresses to public IP addresses.

Azure Load Balancer is available in two SKUs: Basic and Standard. There are
differences in scale, features, and pricing. Any scenario that's possible with
Basic Load Balancer can also be created with Standard Load Balancer,
although the approaches might differ slightly. As you learn about Load
Balancer, it is important to familiarize yourself with the fundamentals and
SKU-specific differences.
Why use Load Balancer?
You can use Azure Load Balancer to:

 Load-balance incoming internet traffic to your VMs. This configuration is known


as a Public Load Balancer.
 Load-balance traffic across VMs inside a virtual network. You can also reach a
Load Balancer front end from an on-premises network in a hybrid scenario.
Both scenarios use a configuration that is known as an Internal Load Balancer.
 Port forward traffic to a specific port on specific VMs with inbound network
address translation (NAT) rules.
 Provide outbound connectivity for VMs inside your virtual network by using a
public Load Balancer.

Note

Azure provides a suite of fully managed load-balancing solutions for your


scenarios. If you are looking for Transport Layer Security (TLS) protocol
termination ("SSL offload") or per-HTTP/HTTPS request, application-layer
processing, review Application Gateway. If you are looking for global DNS
load balancing, review Traffic Manager. Your end-to-end scenarios might
benefit from combining these solutions as needed.

Page 2 of 164
Cloud Computing - Azure

Topology:

Page 3 of 164
Cloud Computing - Azure

In Azure portal, click “Resource groups”.

Page 4 of 164
Cloud Computing - Azure

Click “Add”.

Page 5 of 164
Cloud Computing - Azure

While create “Resource group”,

Type “Resource group name” as “SansboundAzureClass”.

Select “Resource group location” as “CentralUS”.

Click “Create”.

Page 6 of 164
Cloud Computing - Azure

Click “All services”,

Page 7 of 164
Cloud Computing - Azure

In “All services”,

Click “Availability sets”.

Page 8 of 164
Cloud Computing - Azure

In “Availability sets”,

Click “Add”.

Page 9 of 164
Cloud Computing - Azure

While create availability set,

Type “Name” as “Sans-Cluster”.

Select “Subscription” as “Free Trial”.

Select “Resource group” as “SansboundAzureClass”.

Select “Location” as “Central US”.

Default fault domain as “2” for (Free Trial account).

Update domains : Reserved : 5 No’s

Ensure “Use Managed disks” as “Yes”.

Page 10 of 164
Cloud Computing - Azure

In “Availability sets”,

Click “Refresh” to view Availability sets.

You have required to click “Virtual networks”.

Page 11 of 164
Cloud Computing - Azure

Click “Add”.

Page 12 of 164
Cloud Computing - Azure

While create network,

Type “Name” as “SANS-VNET”.

Type “Address range” as 10.0.0.0/16.

Page 13 of 164
Cloud Computing - Azure

Select “Subscription” as “Free Trial”.

Select “Resource group” as “SansboundAzureClass”.

Select “Location” as “Central US”.

Type “Subnet” name as “SANS-PubSubnet”.

Select “Address range” as 10.0.1.0/24.

Click “Create”,

Page 14 of 164
Cloud Computing - Azure

Click “Dashboard”.

Page 15 of 164
Cloud Computing - Azure

Click “All services” in left side panel.

Page 16 of 164
Cloud Computing - Azure

In “All services”,

Page 17 of 164
Cloud Computing - Azure

Click “Network security group”.

In “Network security groups”,

Page 18 of 164
Cloud Computing - Azure

Click “Add”.

While create network security group,

Page 19 of 164
Cloud Computing - Azure

Type “Name” as “Front-EndNSG”.

Select “Subscription” as “Free Trial”.

Select “Resource group” as “SansboundAzureClass”.

Select “Location” as “Central US”.

Click “Create”.

Page 20 of 164
Cloud Computing - Azure

Page 21 of 164
Cloud Computing - Azure

Click “Refresh”.

Page 22 of 164
Cloud Computing - Azure

In “Network security groups”,

Click “Front-EndNSG”.

In “Front-EndNSG”,

Page 23 of 164
Cloud Computing - Azure

Click “Inbound security rules”.

Page 24 of 164
Cloud Computing - Azure

In “Inbound security rules”,

Click “Add”.

While “Add inbound security rule”,

Page 25 of 164
Cloud Computing - Azure

Select “Source” as “Any”.

Select “Source port ranges” as “*”.

Select “Destination” as “Any”.

Select “Destination port ranges” as “80”.

Click “Protocol” as “TCP”.

Ensure “Priority” as “100”

Type “Name” as “AllowHTTP”.

Click “Add”.

Page 26 of 164
Cloud Computing - Azure

Now you are able to see that inbound security rules has been created for “100”.

Page 27 of 164
Cloud Computing - Azure

Click “Add”.

While “Add inbound security rule”,

Select “Source” as “Any”.

Page 28 of 164
Cloud Computing - Azure

Select “Source port ranges” as “*”.

Select “Destination” as “Any”.

Select “Destination port ranges” as “22”.

Click “Protocol” as “TCP”.

Ensure “Priority” as “110”

Type “Name” as “AllowSSH”.

Click “Add”.

Page 29 of 164
Cloud Computing - Azure

In “Front-EndNSG”,

Page 30 of 164
Cloud Computing - Azure

Click “Subnets”.

In “Subnets”,

Page 31 of 164
Cloud Computing - Azure

Click “Associate” to associate the subnet to “Front-EndNSG” network security group.

While “Associate subnet”,

Page 32 of 164
Cloud Computing - Azure

Click “Choose a virtual network”,

Click “SANS-VNET” to select the virtual network.

Page 33 of 164
Cloud Computing - Azure

To “Choose a subnet” click “SANS-PubSubnet”.

Page 34 of 164
Cloud Computing - Azure

Click “Ok”.

Page 35 of 164
Cloud Computing - Azure

Click “Virtual machines”,

Page 36 of 164
Cloud Computing - Azure

While create virtual machine,

Page 37 of 164
Cloud Computing - Azure

Select “Subscription” as “Free Trial”.

Select “Resource group” as “SansboundAzureClass”.

Type “Virtual machine name” as “Linux”.

Select “Region” as “Central US”.

Select “Image” as “Ubuntu Server 18.04”.

Change “VM size” as “Standard B1s”.

In “Administrator Account”,

Page 38 of 164
Cloud Computing - Azure

Set “Authentication type” as “Password”.

Type “Username” as “sansbound” and type password for the virtual machine.

Click “Next : Disks”.

Page 39 of 164
Cloud Computing - Azure

In “Disks”,

Page 40 of 164
Cloud Computing - Azure

Expand “Advanced”,

Ensure “Use managed disks” as “Yes”.

Click “Next : Networking >”.

Page 41 of 164
Cloud Computing - Azure

In “Networking”,

Page 42 of 164
Cloud Computing - Azure

Ensure “Virtual network” as “SANS-VNET”.

Ensure “Subnet” as “SANS-PubSubnet”.

Ensure Public IP is selected.

Ensure “NIC network security group” as “None”.

Click “Next : Management”.

Page 43 of 164
Cloud Computing - Azure

In “Management”,

Page 44 of 164
Cloud Computing - Azure

Click “Next : Guest config”.

In “Guest config”,

Page 45 of 164
Cloud Computing - Azure

Click “Next : Tags >”.

In “Tags”,

Page 46 of 164
Cloud Computing - Azure

Click “Next : Review + create”.

Click “Create”.

Page 47 of 164
Cloud Computing - Azure

Click “Go to resource”.

Page 48 of 164
Cloud Computing - Azure

Page 49 of 164
Cloud Computing - Azure

Kindly note the public IP address of Linux / Ubuntu.

Page 50 of 164
Cloud Computing - Azure

From your local machine, launch “putty.exe” to connect the Ubuntu.

Type Pubic IP address of Ubuntu in putty and click “Open” to connet.

Page 51 of 164
Cloud Computing - Azure

Type username as “sansbound” and press “Enter”.

Page 52 of 164
Cloud Computing - Azure

Type “Password” of Ubuntu and press “Enter”.

Page 53 of 164
Cloud Computing - Azure

You have successfully logged into Ubuntu server.

Page 54 of 164
Cloud Computing - Azure

Type “sudo –i” and press “Enter” to login Ubuntu as a root account.

Page 55 of 164
Cloud Computing - Azure

Type “apt-get update” and press “Enter” to update the packages.

Page 56 of 164
Cloud Computing - Azure

You have successfully updated Ubuntu packages from internet.

Page 57 of 164
Cloud Computing - Azure

Type “apt-get install apache2” and press “Enter”.

Page 58 of 164
Cloud Computing - Azure

Type “y” and press “Enter”.

Page 59 of 164
Cloud Computing - Azure

Type public IP address of Ubuntu in browser and press “Enter”.

Page 60 of 164
Cloud Computing - Azure

In Ubuntu virtual machine,

Click “Capture” to capture the virtual machine as image.

Page 61 of 164
Cloud Computing - Azure

While “create image”,

Type “Name” as “Sans-Webserver”.

Select “Resource group” as “SansboundAzureClass”.

Need to check “Automatically delete tis virtual machine after creating the image”.

In “Zone resilency” click “On”.

Page 62 of 164
Cloud Computing - Azure

Click “Create”.

Page 63 of 164
Cloud Computing - Azure

Click “Virtual machines” in left side panel.

Page 64 of 164
Cloud Computing - Azure

In “Virtual machines”,

Click “Add”.

Page 65 of 164
Cloud Computing - Azure

Type “Virtual machine name” as “webserver01”.

Select “Region” as “Central US”.

Select “Availability options” as “Availability Set”.

Select “Availability set” as “Sans-Cluster”.

Page 66 of 164
Cloud Computing - Azure

In “Image” click “Browse all images and disks”.

Page 67 of 164
Cloud Computing - Azure

Click “My Items”.

Page 68 of 164
Cloud Computing - Azure

Click “Sans-Webserver” image.

Page 69 of 164
Cloud Computing - Azure

Ensure that you have selected “Sans-Webserver”.

Page 70 of 164
Cloud Computing - Azure

Change “VM Size” as “Standard B1s”.

Page 71 of 164
Cloud Computing - Azure

In “Administrator account”,

Click “Authentication type” as “Password”.

Type “Username” as “sansbound”.

Type “Password” for the Ubuntu server.

Page 72 of 164
Cloud Computing - Azure

Ensure “Inbound port rules” as “None”.

Because associated subnet for “Front-EndNSG”.

Page 73 of 164
Cloud Computing - Azure

Click “Next : Disks >”.

Page 74 of 164
Cloud Computing - Azure

In “Disks”,

Click “Next : Networking >”.

Page 75 of 164
Cloud Computing - Azure

In “Networking”,

Ensure “Virtual network” as “SANS-VNET”.

Ensure “Subnet” as “SANS-PubSubnet”.

Ensure “Pubic IP” is selected.

Ensure “NIC network security group” as “None”.

Page 76 of 164
Cloud Computing - Azure

Click “Next : Management >”.

Page 77 of 164
Cloud Computing - Azure

In “Management”,

Click “Next : Guest config >”.

Page 78 of 164
Cloud Computing - Azure

Click “Next : Tags >”.

Page 79 of 164
Cloud Computing - Azure

In “Tags”,

Click “Next : Review + create”.

Page 80 of 164
Cloud Computing - Azure

Click “Create”.

Page 81 of 164
Cloud Computing - Azure

Click “Virtual machines” in left side panel.

Page 82 of 164
Cloud Computing - Azure

In “Virtual machines”,

Click “Add”.

Page 83 of 164
Cloud Computing - Azure

Select “Subscription” as “Free Trial”.

Select “Resource group” as “SasboundAzureClass”.

Type “Virtual machine name” as “webserver02”.

Select “Region” as “Central US”.

In “Availability Options” select “Availability set”.

In “Availability set” select “Sans-Cluster”.

Page 84 of 164
Cloud Computing - Azure

Click “Browse all images and disks”.

Page 85 of 164
Cloud Computing - Azure

Click “My Items”.

Page 86 of 164
Cloud Computing - Azure

In “My Items”,

Click “Sans-Webserver” to select the captured image.

Page 87 of 164
Cloud Computing - Azure

Ensure that you have selected captured image as “Image”.

Page 88 of 164
Cloud Computing - Azure

Change “VM size” as “Standard B1s”.

Page 89 of 164
Cloud Computing - Azure

In “Administrator Account”,

Set “Authentication type” as “Password”.

Type “Username” as “sansbound”.

Type “Password” for Ubuntu.

Ensure that “Inbound Port rules” as “None”.

Page 90 of 164
Cloud Computing - Azure

Click “Next : Disks >”.

Page 91 of 164
Cloud Computing - Azure

In “Disks”,

Click “Next : Networking >”.

Page 92 of 164
Cloud Computing - Azure

In “Networking”

Ensure “Virtual network” as “Sans-VNET”.

Ensure “Subnet” as “SANS-PubSubnet”.

Select “Public IP” is selected.

Ensure “NIC network security group” as “None”.

Page 93 of 164
Cloud Computing - Azure

Click “Next : Management >”.

Page 94 of 164
Cloud Computing - Azure

In “Management”,

Click “Next : Guest config >”.

Page 95 of 164
Cloud Computing - Azure

Click “Next : Tags >”.

Page 96 of 164
Cloud Computing - Azure

Click “Next : Review + create >”.

Page 97 of 164
Cloud Computing - Azure

Click “Create”.

Page 98 of 164
Cloud Computing - Azure

Click “Virtual machines” in left side panel.

Page 99 of 164
Cloud Computing - Azure

In “Virtual machine”,

Click “webserver01”.

Page 100 of 164


Cloud Computing - Azure

Kindly note IP address of “webserver01”.

Page 101 of 164


Cloud Computing - Azure

From your local machine, launch “putty.exe”.

Type Pubic IP address of “webserver01” and click “Open” to connect webserver01.

Page 102 of 164


Cloud Computing - Azure

Click “Yes”.

Page 103 of 164


Cloud Computing - Azure

Type “username” as “sivaraman” and press “Enter”.

Page 104 of 164


Cloud Computing - Azure

Type “Password” of Ubuntu and press “Enter”.

Page 105 of 164


Cloud Computing - Azure

You have logged on to Ubuntu successfully.

Page 106 of 164


Cloud Computing - Azure

Type “sudo –i” and press “Enter”.

Page 107 of 164


Cloud Computing - Azure

You have successfully logged in as root user.

Page 108 of 164


Cloud Computing - Azure

Type “vi /var/www/html/index.html” and press “Enter”.

Page 109 of 164


Cloud Computing - Azure

Go to line 198,

Press “Insert” key.

Page 110 of 164


Cloud Computing - Azure

Ensure that “Insert” is pressed.

Page 111 of 164


Cloud Computing - Azure

Delete the previous previous text and type “Sansbound Azure Class Webserver01”.

Page 112 of 164


Cloud Computing - Azure

Press “Escape” key.

Page 113 of 164


Cloud Computing - Azure

Type “:wq” and press “Enter”.

Page 114 of 164


Cloud Computing - Azure

Type “webserver01” Public IP address in browser and press “Enter”.

Page 115 of 164


Cloud Computing - Azure

In “virtual machines” from left side panel.

Page 116 of 164


Cloud Computing - Azure

In “Virtual machines”,

Click “webserver02”.

Page 117 of 164


Cloud Computing - Azure

Kindly note public IP address of the “webserver02”.

Page 118 of 164


Cloud Computing - Azure

From your local machine, launch putty.exe.

In Putty, type Public IP address of “Webserver02” and click “Open” to connect.

Page 119 of 164


Cloud Computing - Azure

Click “Yes”.

Page 120 of 164


Cloud Computing - Azure

Type username of Webserver02 as “sansbound” and press “Enter”.

Page 121 of 164


Cloud Computing - Azure

Type password of webserver02 and press “Enter”.

Page 122 of 164


Cloud Computing - Azure

You have successfully logged into webserver02.

Page 123 of 164


Cloud Computing - Azure

Type “sudo –i” and press “Enter” to login as root account.

Page 124 of 164


Cloud Computing - Azure

You have successfully logged in as a root account.

Page 125 of 164


Cloud Computing - Azure

Type “vi /var/www/html/index.html” and press “Enter”.

Page 126 of 164


Cloud Computing - Azure

Go to Line “198” and press “Insert” key.

Page 127 of 164


Cloud Computing - Azure

Ensure that “Insert” key is pressed.

Page 128 of 164


Cloud Computing - Azure

Delete previous values and type as “Sansbound Azure Class Webserver02”.

Page 129 of 164


Cloud Computing - Azure

Press “Escape” key.

Page 130 of 164


Cloud Computing - Azure

Type “:wq” and press “Enter”.

Page 131 of 164


Cloud Computing - Azure

Type public IP address of Webserve02 in browser and press “Enter”.

Page 132 of 164


Cloud Computing - Azure

Click “All services”,

Page 133 of 164


Cloud Computing - Azure

Click “Load balancers”,

Page 134 of 164


Cloud Computing - Azure

Click “Add”.

Page 135 of 164


Cloud Computing - Azure

While create load balancer,

Type “Name” as “Sans-WebLB”.

Click “Type” as “Public”.

Page 136 of 164


Cloud Computing - Azure

Click “SKU” as “Basic”.

Click “Public IP address” as “Crete new” type “LB-IP”.

Set “Assignment” as “Static”.

Select “Subscription” as “Free Trial”.

Select “Resource group” as “SansboundAzureClass”.

Select “Location” as “Central US”.

Click “Create”.

Page 137 of 164


Cloud Computing - Azure

Click “Sans-WebLB”.

Page 138 of 164


Cloud Computing - Azure

Click “Backend pools”.

Page 139 of 164


Cloud Computing - Azure

In “Backend pools”,

Page 140 of 164


Cloud Computing - Azure

Click “Add”.

While “Add backend pool”,

Type “Name” as “Webservers”

Page 141 of 164


Cloud Computing - Azure

In “Associated to” select “Availability set”.

Select “Availability set” as “Sans-Cluster”.

Click “Add a target network IP configuration”.

Page 142 of 164


Cloud Computing - Azure

Select “Target virtual machine” as “webserver01”.

Page 143 of 164


Cloud Computing - Azure

Select “Network IP configuration” as “ipconfig1 (10.0.1.5)”.

Click “Add a target network IP configuration”.

Page 144 of 164


Cloud Computing - Azure

You are able to see that “webserver01” has been successfully added in target network IP configuration.

Page 145 of 164


Cloud Computing - Azure

Select “Target virtual machine” as “webserver02”.

Page 146 of 164


Cloud Computing - Azure

Select “Network IP configuration” as “ipconfig1 (10.0.1.6)”.

Click “Ok”.

Page 147 of 164


Cloud Computing - Azure

Page 148 of 164


Cloud Computing - Azure

You are able to see that webserver01 and webserver02 servers are added successfully in Backend pools
of “Sans-WebLB”.

Page 149 of 164


Cloud Computing - Azure

Click “Health probes”.

Page 150 of 164


Cloud Computing - Azure

Click “Add”.

Page 151 of 164


Cloud Computing - Azure

While “Add health probe”,

Type “Name” as “WEB-HP”.

Select “Protocol” as “TCP”.

Select “Port” as “80”.

Type “Interval” as “5” seconds (for check status of virtual machine and 80 port).

Type “Unhealthy threshold” as “2”.

Page 152 of 164


Cloud Computing - Azure

Click “Ok”.

Page 153 of 164


Cloud Computing - Azure

You have successfully created “WEB-HP” health probe.

Page 154 of 164


Cloud Computing - Azure

Click “Load balancing rules”.

Page 155 of 164


Cloud Computing - Azure

In “Load balancing rules”,

Click “Add”.

Page 156 of 164


Cloud Computing - Azure

While “Add load balancing rule”,

Type “Name” as “LB-Rule”.

Ensure IP version as “IPV4”.

Ensure “FrontEnd IP address” is selected with IP address.

Set “Protocol” as “TCP”.

Ensure “Port” as “80” and “Backend port” as “80”.

Ensure “Backendpool” as “Webservers”.

Ensure “Health probe” as “WEB-HP”.

Page 157 of 164


Cloud Computing - Azure

Click “Ok”.

Page 158 of 164


Cloud Computing - Azure

You are able to see the “LBRule”.

Page 159 of 164


Cloud Computing - Azure

In “Sans-WebLB”, kindly note the Public IP address.

Page 160 of 164


Cloud Computing - Azure

From your local machine, paste the public IP in browser and press “Enter”.

I have got the webserver02 page successfully.

Page 161 of 164


Cloud Computing - Azure

In Command prompt,

Type “arp –d” and press “Enter”.

Page 162 of 164


Cloud Computing - Azure

Type “ipconfig /flushdns”.

Page 163 of 164


Cloud Computing - Azure

Click “Refresh” button in “web browser”.

After some try you will get webserver01 page.

Note: You have successfully configured availability set with Load balancer and web traffic has been
load balanced successfully.

Page 164 of 164

You might also like