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

Lab23 - Understanding Availability set and Load balancer - Azure

Uploaded by

raj0000kaml
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Lab23 - Understanding Availability set and Load balancer - Azure

Uploaded by

raj0000kaml
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 163

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.

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.

Page 1 of 163
Cloud Computing - Azure

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 163
Cloud Computing - Azure

Topology:

Page 3 of 163
Cloud Computing - Azure

In Azure portal, click “Resource groups”.

Page 4 of 163
Cloud Computing - Azure

Click “Add”.

Page 5 of 163
Cloud Computing - Azure

While create “Resource group”,

Type “Resource group name” as “SansboundAzureClass”.

Select “Resource group location” as “CentralUS”.

Click “Create”.

Page 6 of 163
Cloud Computing - Azure

Click “All services”,

Page 7 of 163
Cloud Computing - Azure

In “All services”,

Click “Availability sets”.

Page 8 of 163
Cloud Computing - Azure

In “Availability sets”,

Click “Add”.

Page 9 of 163
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 163
Cloud Computing - Azure

In “Availability sets”,

Click “Refresh” to view Availability sets.

You have required to click “Virtual networks”.

Page 11 of 163
Cloud Computing - Azure

Click “Add”.

Page 12 of 163
Cloud Computing - Azure

While create network,

Type “Name” as “SANS-VNET”.

Type “Address range” as 10.0.0.0/16.

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.

Page 13 of 163
Cloud Computing - Azure

Click “Create”,

Page 14 of 163
Cloud Computing - Azure

Click “Dashboard”.

Page 15 of 163
Cloud Computing - Azure

Click “All services” in left side panel.

Page 16 of 163
Cloud Computing - Azure

In “All services”,

Click “Network security group”.

Page 17 of 163
Cloud Computing - Azure

In “Network security groups”,

Click “Add”.

Page 18 of 163
Cloud Computing - Azure

While create network security group,

Type “Name” as “Front-EndNSG”.

Select “Subscription” as “Free Trial”.

Select “Resource group” as “SansboundAzureClass”.

Select “Location” as “Central US”.

Page 19 of 163
Cloud Computing - Azure

Click “Create”.

Page 20 of 163
Cloud Computing - Azure

Click “Refresh”.

Page 21 of 163
Cloud Computing - Azure

In “Network security groups”,

Click “Front-EndNSG”.

Page 22 of 163
Cloud Computing - Azure

In “Front-EndNSG”,

Click “Inbound security rules”.

Page 23 of 163
Cloud Computing - Azure

In “Inbound security rules”,

Click “Add”.

Page 24 of 163
Cloud Computing - Azure

While “Add inbound security rule”,

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”.

Page 25 of 163
Cloud Computing - Azure

Click “Add”.

Page 26 of 163
Cloud Computing - Azure

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

Click “Add”.

Page 27 of 163
Cloud Computing - Azure

While “Add inbound security rule”,

Select “Source” as “Any”.

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”.

Page 28 of 163
Cloud Computing - Azure

Click “Add”.

Page 29 of 163
Cloud Computing - Azure

In “Front-EndNSG”,

Click “Subnets”.

Page 30 of 163
Cloud Computing - Azure

In “Subnets”,

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

Page 31 of 163
Cloud Computing - Azure

While “Associate subnet”,

Click “Choose a virtual network”,

Page 32 of 163
Cloud Computing - Azure

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

Page 33 of 163
Cloud Computing - Azure

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

Page 34 of 163
Cloud Computing - Azure

Click “Ok”.

Page 35 of 163
Cloud Computing - Azure

Click “Virtual machines”,

Page 36 of 163
Cloud Computing - Azure

While create virtual machine,

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”.

Page 37 of 163
Cloud Computing - Azure

In “Administrator Account”,

Set “Authentication type” as “Password”.

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

Page 38 of 163
Cloud Computing - Azure

Click “Next : Disks”.

Page 39 of 163
Cloud Computing - Azure

In “Disks”,

Expand “Advanced”,

Ensure “Use managed disks” as “Yes”.

Page 40 of 163
Cloud Computing - Azure

Click “Next : Networking >”.

Page 41 of 163
Cloud Computing - Azure

In “Networking”,

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

Ensure “Subnet” as “SANS-PubSubnet”.

Ensure Public IP is selected.

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

Page 42 of 163
Cloud Computing - Azure

Click “Next : Management”.

Page 43 of 163
Cloud Computing - Azure

In “Management”,

Click “Next : Guest config”.

Page 44 of 163
Cloud Computing - Azure

In “Guest config”,

Click “Next : Tags >”.

Page 45 of 163
Cloud Computing - Azure

In “Tags”,

Click “Next : Review + create”.

Page 46 of 163
Cloud Computing - Azure

Click “Create”.

Page 47 of 163
Cloud Computing - Azure

Click “Go to resource”.

Page 48 of 163
Cloud Computing - Azure

Kindly note the public IP address of Linux / Ubuntu.

Page 49 of 163
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 50 of 163
Cloud Computing - Azure

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

Page 51 of 163
Cloud Computing - Azure

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

Page 52 of 163
Cloud Computing - Azure

You have successfully logged into Ubuntu server.

Page 53 of 163
Cloud Computing - Azure

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

Page 54 of 163
Cloud Computing - Azure

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

Page 55 of 163
Cloud Computing - Azure

You have successfully updated Ubuntu packages from internet.

Page 56 of 163
Cloud Computing - Azure

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

Page 57 of 163
Cloud Computing - Azure

Type “y” and press “Enter”.

Page 58 of 163
Cloud Computing - Azure

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

Page 59 of 163
Cloud Computing - Azure

In Ubuntu virtual machine,

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

Page 60 of 163
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 61 of 163
Cloud Computing - Azure

Click “Create”.

Page 62 of 163
Cloud Computing - Azure

Page 63 of 163
Cloud Computing - Azure

Click “Virtual machines” in left side panel.

In “Virtual machines”,

Click “Add”.

Page 64 of 163
Cloud Computing - Azure

Type “Virtual machine name” as “webserver01”.

Page 65 of 163
Cloud Computing - Azure

Select “Region” as “Central US”.

Select “Availability options” as “Availability Set”.

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

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

Page 66 of 163
Cloud Computing - Azure

Click “My Items”.

Page 67 of 163
Cloud Computing - Azure

Click “Sans-Webserver” image.

Page 68 of 163
Cloud Computing - Azure

Ensure that you have selected “Sans-Webserver”.

Page 69 of 163
Cloud Computing - Azure

Change “VM Size” as “Standard B1s”.

Page 70 of 163
Cloud Computing - Azure

In “Administrator account”,

Page 71 of 163
Cloud Computing - Azure

Click “Authentication type” as “Password”.

Type “Username” as “sansbound”.

Type “Password” for the Ubuntu server.

Ensure “Inbound port rules” as “None”.

Page 72 of 163
Cloud Computing - Azure

Because associated subnet for “Front-EndNSG”.

Click “Next : Disks >”.

Page 73 of 163
Cloud Computing - Azure

In “Disks”,

Page 74 of 163
Cloud Computing - Azure

Click “Next : Networking >”.

In “Networking”,

Page 75 of 163
Cloud Computing - Azure

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

Ensure “Subnet” as “SANS-PubSubnet”.

Ensure “Pubic IP” is selected.

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

Click “Next : Management >”.

Page 76 of 163
Cloud Computing - Azure

In “Management”,

Page 77 of 163
Cloud Computing - Azure

Click “Next : Guest config >”.

Page 78 of 163
Cloud Computing - Azure

Click “Next : Tags >”.

In “Tags”,

Page 79 of 163
Cloud Computing - Azure

Click “Next : Review + create”.

Click “Create”.

Page 80 of 163
Cloud Computing - Azure

Page 81 of 163
Cloud Computing - Azure

Click “Virtual machines” in left side panel.

In “Virtual machines”,

Page 82 of 163
Cloud Computing - Azure

Click “Add”.

Select “Subscription” as “Free Trial”.

Page 83 of 163
Cloud Computing - Azure

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 163
Cloud Computing - Azure

Click “Browse all images and disks”.

Page 85 of 163
Cloud Computing - Azure

Click “My Items”.

Page 86 of 163
Cloud Computing - Azure

In “My Items”,

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

Page 87 of 163
Cloud Computing - Azure

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

Page 88 of 163
Cloud Computing - Azure

Change “VM size” as “Standard B1s”.

Page 89 of 163
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 163
Cloud Computing - Azure

Click “Next : Disks >”.

Page 91 of 163
Cloud Computing - Azure

In “Disks”,

Click “Next : Networking >”.

Page 92 of 163
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 163
Cloud Computing - Azure

Click “Next : Management >”.

Page 94 of 163
Cloud Computing - Azure

In “Management”,

Click “Next : Guest config >”.

Page 95 of 163
Cloud Computing - Azure

Click “Next : Tags >”.

Page 96 of 163
Cloud Computing - Azure

Click “Next : Review + create >”.

Page 97 of 163
Cloud Computing - Azure

Click “Create”.

Page 98 of 163
Cloud Computing - Azure

Click “Virtual machines” in left side panel.

Page 99 of 163
Cloud Computing - Azure

In “Virtual machine”,

Click “webserver01”.

Page 100 of 163


Cloud Computing - Azure

Kindly note IP address of “webserver01”.

Page 101 of 163


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 163


Cloud Computing - Azure

Click “Yes”.

Page 103 of 163


Cloud Computing - Azure

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

Page 104 of 163


Cloud Computing - Azure

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

Page 105 of 163


Cloud Computing - Azure

You have logged on to Ubuntu successfully.

Page 106 of 163


Cloud Computing - Azure

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

Page 107 of 163


Cloud Computing - Azure

You have successfully logged in as root user.

Page 108 of 163


Cloud Computing - Azure

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

Page 109 of 163


Cloud Computing - Azure

Go to line 198,

Press “Insert” key.

Page 110 of 163


Cloud Computing - Azure

Ensure that “Insert” is pressed.

Page 111 of 163


Cloud Computing - Azure

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

Page 112 of 163


Cloud Computing - Azure

Press “Escape” key.

Page 113 of 163


Cloud Computing - Azure

Type “:wq” and press “Enter”.

Page 114 of 163


Cloud Computing - Azure

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

Page 115 of 163


Cloud Computing - Azure

In “virtual machines” from left side panel.

Page 116 of 163


Cloud Computing - Azure

In “Virtual machines”,

Click “webserver02”.

Page 117 of 163


Cloud Computing - Azure

Kindly note public IP address of the “webserver02”.

Page 118 of 163


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 163


Cloud Computing - Azure

Click “Yes”.

Page 120 of 163


Cloud Computing - Azure

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

Page 121 of 163


Cloud Computing - Azure

Type password of webserver02 and press “Enter”.

Page 122 of 163


Cloud Computing - Azure

You have successfully logged into webserver02.

Page 123 of 163


Cloud Computing - Azure

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

Page 124 of 163


Cloud Computing - Azure

You have successfully logged in as a root account.

Page 125 of 163


Cloud Computing - Azure

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

Page 126 of 163


Cloud Computing - Azure

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

Page 127 of 163


Cloud Computing - Azure

Ensure that “Insert” key is pressed.

Page 128 of 163


Cloud Computing - Azure

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

Page 129 of 163


Cloud Computing - Azure

Press “Escape” key.

Page 130 of 163


Cloud Computing - Azure

Type “:wq” and press “Enter”.

Page 131 of 163


Cloud Computing - Azure

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

Page 132 of 163


Cloud Computing - Azure

Click “All services”,

Page 133 of 163


Cloud Computing - Azure

Click “Load balancers”,

Page 134 of 163


Cloud Computing - Azure

Click “Add”.

Page 135 of 163


Cloud Computing - Azure

While create load balancer,

Type “Name” as “Sans-WebLB”.

Click “Type” as “Public”.

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”.

Page 136 of 163


Cloud Computing - Azure

Click “Create”.

Page 137 of 163


Cloud Computing - Azure

Click “Sans-WebLB”.

Page 138 of 163


Cloud Computing - Azure

Click “Backend pools”.

Page 139 of 163


Cloud Computing - Azure

In “Backend pools”,

Click “Add”.

Page 140 of 163


Cloud Computing - Azure

While “Add backend pool”,

Type “Name” as “Webservers”

In “Associated to” select “Availability set”.

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

Page 141 of 163


Cloud Computing - Azure

Click “Add a target network IP configuration”.

Page 142 of 163


Cloud Computing - Azure

Select “Target virtual machine” as “webserver01”.

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

Page 143 of 163


Cloud Computing - Azure

Click “Add a target network IP configuration”.

Page 144 of 163


Cloud Computing - Azure

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

Page 145 of 163


Cloud Computing - Azure

Select “Target virtual machine” as “webserver02”.

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

Page 146 of 163


Cloud Computing - Azure

Click “Ok”.

Page 147 of 163


Cloud Computing - Azure

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

Page 148 of 163


Cloud Computing - Azure

Click “Health probes”.

Page 149 of 163


Cloud Computing - Azure

Click “Add”.

Page 150 of 163


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 151 of 163


Cloud Computing - Azure

Click “Ok”.

Page 152 of 163


Cloud Computing - Azure

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

Page 153 of 163


Cloud Computing - Azure

Click “Load balancing rules”.

Page 154 of 163


Cloud Computing - Azure

In “Load balancing rules”,

Click “Add”.

Page 155 of 163


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 156 of 163


Cloud Computing - Azure

Click “Ok”.

Page 157 of 163


Cloud Computing - Azure

You are able to see the “LBRule”.

Page 158 of 163


Cloud Computing - Azure

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

Page 159 of 163


Cloud Computing - Azure

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

I have got the webserver02 page successfully.

Page 160 of 163


Cloud Computing - Azure

In Command prompt,

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

Page 161 of 163


Cloud Computing - Azure

Type “ipconfig /flushdns”.

Page 162 of 163


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 163 of 163

You might also like