Lab 12:Two instances with Application Load Balancer
Launching instance in Application Load Balancer
Create Security Group for alb and Ec2 instances
Admin will connect to webserver --ssh port --22
End user will connect to web server --http port -80
Now create Security Group for alb and webserver
Go to the EC2 dashboard and select Security Group and select on create Security Group
Create Security Group for alb
http-80-anywhere
Create Security Group for webserver
Now create webservers
Go to the EC2 dashboard ,select load balancer
Create alb load balancer
Select alb load balancer
Give a name to load balancer
Leave as default
Come Availability zone select all Availability zone
Then click on Security settings
Leave as default click on configure Security Group
Select an existing Security Group
select alb Security Group click on next
Next click on routing setting
Give a name to target group
In health check give index.html
Click on next register targets
Click on Review
Click on Create
Now create webservers
Go to the EC2 dashboards
Click on launch instance and create an instance
Select redhat linux
Go with t2 micro instance
Click on configuration settings
Give no of instances 2 and leave all as default
Click on add storage
Next click on add tags
Click on Configure Security Group
Select Existing Security Group
Click on review and launch
Click on launch
Create a key pair
Download the key pair
click on launch instance
Go to the git bash
Connect to webserver and install apache
Switch to root user and install apache
Start the service
Now test the page in browser by giving webserver IP address
Now connect to webserver 2 install apache as did for the webserver
Go to load balancer
select the load balancer
Got the target group click on target
Edit register target
Select the webserver
click on add register and save
Now take load balancer end point and check the page
Comments
Post a Comment