SlideShare a Scribd company logo
1 of 68
Download to read offline
Three
Tier
Architecture
Project using AWS
by Ayomide Ogunsanya (TheCloudLord)
What is a three-tier
architecture?
A three-tier application is a type of software
architecture that divides an application into three
logical layers: presentation, application (or logic), and
data. Each layer serves a specific purpose and
communicates with the other layers to perform
various functions within the application.
1.
Parts of a three-tier
architecture
Presentation Tier (Front-end)
This layer is responsible for handling user interactions
and displaying information to users.
It includes user interfaces, such as web pages, mobile
apps, or desktop interfaces.
The presentation tier communicates with the
application tier to request and receive data, but it
doesn't directly interact with the data storage.
2.
Parts of a three-tier
architecture
Application Tier (Middle-tier or Logic Tier)
This layer contains the core logic and functionality of the
application.
It processes user requests from the presentation tier,
executes business logic, and interacts with the data tier to
retrieve or update data.
The application tier acts as an intermediary between the
presentation tier and the data tier, ensuring separation of
concerns and modularity.
3.
Parts of a three-tier
architecture
Data Tier (Back-end)
This layer manages the storage and retrieval of data used
by the application.
It typically consists of databases or other data storage
systems.
The data tier stores and organizes data, handles data
retrieval and manipulation requests from the application
tier, and ensures data integrity and security.
4.
Now Lets
Dive Straight
into it!
5.
The
Architectural
Diagram drawn
using Lucid.app
d
6.
On your AWS Console, Search for 'VPC', Click on create VPC.
Now, on the 'VPC Settings' option, select 'VPC and more', go to Name tag option
and put in a VPC name, Lets leave the IPv4 CIDR Block at default for this project
7.
8.
Select [No ipv6 CIDR Block], Leave the [tenancy] at default, in this case we are
using 2 availiability zones which we are going to set as [us-east-1a] and [us-east-1b]
9.
Set [Public Subnet] at 2, [Private Subnets] at 4 which makes a total of 6 subnets for
the 2 availability zones. Now, leave the [NAT Gateway] at none in this case
10.
Now, lets Customize the CIDR ranges using the IPs as shown
11.
Select these Options and click on the create [VPC button] when done.
Now, after VPC Parameters is created, click on the [View VPC] Button
12.
Your VPC should be created like this showing the parameters.
You could also Check the [Resource map] to view your created VPC.
13.
Now, lets enable Auto asign Public IPv4 address in both public subnets, this is
necessary so our application can be accessed publicly. Click on Subnets - Select
Subnet ID - Click on Actions - Select Edit Subnet Settings
14.
Now, Check the Enable auto assign public IPv4 address box -
Scroll Down and Click Save. Now repeat the same action for the
other Public Subnet
15.
Select Internet gateways and confirm it's attached automatically to
your VPC build.
16.
Select Route Tables and confirm it is associated with the public
subnets
17.
Select Route Tables and confirm it is associated with the public
subnets also verify the same for the private subnets.
18.
"We have
Successfully Created
our backbone of the
Architecture !
Now Lets Deploy the
Web Tier"
19.
Now, go to EC2 - Launch Template - Create Launch Template
20.
Now Insert Template name - Template Version description - Check
Auto Scaling Guidiance
21.
Scroll to Application and OS images AMI - Select Amazon Linux -
Select Amazon Linux 2 Free Tier Instance type
22.
Scroll to Instance type - Click rop down arrow - Select t2 micro - Scroll
to key pair login - Select Create new key pair
23.
Type in Keypair name - Click on Create Key Pair
(Make sure you save yo
ur downloaded keypair in a secure place )
24.
Now, lets create our security groups - Scroll to Network Settings - Select Create
Security Groups - Input Name - Input Description - Select our created VPC
25.
Click Add Security Group Rule - Under Type select All ICMP IPv4 - For source
type, we are selecting Anywhere for this project - Now lets add another
Security Group Rule click on it.
26.
Now perform the same procedure but this time setting the type at HTTP. Now
click on add Security Group Rule again for the 3rd one
C
27.
This time set the type to SSH - Click Advance Network Configuration - Click
Add Network Interface
28.
Set Auto-assign public IP to Enable - Scroll down to
Advanced Details and click on it
29.
Now Scroll down to user data and paste the bash script as seen (I'll leave the
Bash script in the N
ext Page, modify as you wish) - Click Launch Template
30.
#!/bin/bash
# get admin privileges
sudo su
# install httpd
yum update -y
yum install -y httpd.x86_64
systemctl start httpd.service
systemctl enable httpd.service
echo "<center><h1><a href='https://www.solavisetech.com/'>Practice
Website</a><h1></center> " > /var/www/html/index.html
31.
Click View Launch Template - Now to your left, Scroll down
to Auto Scaling Groups and Click on it.
32.
Click on create Auto Scaling Group.
33.
Give Auto Scaling Group name -Select your Created Template -
On Version, Select Latest - Scroll down and Click on Next
34.
Scroll down to Network - VPC - Select your Created VPC - On
Avaliability Zones and Subnets, Select all Public subnets - Click Next
35.
Now Click the Hamburger Icon by you left and scroll down to Load
Balancing - Select Target Groups - Click on Create Target Group
36.
Scroll down and input Target Group Name - Select your VPC - Scroll to
the end and Click Next
37.
Scroll down and and click on Create Target Group
38.
On your Left, Scroll down to Load Balancers click on it - Click on
Create Load Balancer
39.
We are using an ALB - Click Create
40.
Now Scroll down - Input ALB Name - Select Your VPC - Select the
Subnet Boxes and ensure they are on public subnets
41.
On Security Groups, Click on Create a New Security Group
42.
Now, Give a Security Group Name - Same as Description - Select your VPC -
Set inbound rules as clicking Add rule - Select Type as indicated and select
source as anywhere IPv4
43.
Click Create Security Group - Now return to your ALB Settings and update the security
group to the just created one NB: if it doesnt come up, refresh with the Refresh Icon
44.
Scroll to Listeners and routing - Select your Created Target Group - Scroll down
and Click Create Load Balancer - Click Veiw Load Balancer to see
45.
Give a few minutes for the provisioning process to be completed for the Load
Balancer to be Active - Go back to youe EC2 - Auto Scaling Groups step 3 and click on
Attach to an existing load balancer View page 33 -35 if you've forgotten the steps
46.
Select your already Existing Load Balancer target group - Turn on Elastic Load
Balancing health checks - Scroll Down and Click Next
47.
Now, Configure the Group Sizes as seen
48.
Set limits on how much your desired capacity can be increased or decreased as seen
- select Target tracking scaling policy
49.
Set limits on how much your desired capacity can be increased or decreased as seen
- select Target tracking scaling policy - Scroll down and Click on Next - Keep clicking next
till you get to the Review Page - At the Review page, scroll down and Click Create auto
scaling group
50.
Now we have our ASG Created Sucessfully. Weldone! Now we have 2 instances running. to
confirm this, go to your EC2 - select instances to view how many instances are running.
51.
You can see the two instances are running - Now Copy the Public IPv4 IP address, create a new
tab on your browser and paste to check if the website loads from the instance. Do the same for
the other instance.
52.
The IP Address Opens up the website - Click on the Link to Open up the Site
53.
Paste the DNS Name in your Browser to access the site through the LB
54.
Now, Lets Create the app tier - Go to EC2 - Launch
template - Enter template name - enter template
version description - Click on Auto Scaling Guidance -
Go to AMI - Select Amazon Linux - Select Amazon Linux
2 free tier - for instance type Select t2 micro - for key
pair, select the existing key pair we created at the
beginning - Click create security group - Give a security
group name - put description - for VPC use the one we
created - Click add security group rule - For type select
Custom ICMP IPv4 - For source type, select Anywhere -
Click on Add security group rule again - this time for
type click on SSH - Source type is Custom - for source,
select your Webtier security group - Click on Create
Launch Template - click launch template
55.
Now, we have our Created App template
56.
Now lets create the Back-end auto scaling Group - Click
on the Hamburger Sign go to Auto scaling group -
input Auto scaling group name - Select Our Launch
template for the App tier - under version click Latest -
Click Next - Now for Network Chose Our VPC - Under
AZ and Subnets, Select (Us east 1a) private 1 subnet and
(Us east 1b) private 2 subnet - Click Next - on Load
Balancing, Click attach to an existing Load Balancer -
for this, lets duplicate our tab, go to Load Balancing -
Target groups - instances - give target group name -
scroll down to VPC and select our VPC - Click on Next
57.
Scroll down and click on Create target group - Now go
to Load Balancer - Click Create Load Balancer - on the
load Balancer type click create button on ALB - input
Load Balancer name - on scheme, select internal - Go to
network mapping and select our VPC - on mappings,
make sure you select the private subnets for the app
tier - Go to security group - click on the create a new
security group link - input name - input description -
select our VPC - click on inbound rules - for type click
HTTP
58.
- for Source select Custom and Search for the Security
group ID of the web tier and select that - CLICK add
rule again - for type click All ICMP IPv4 - for Source
select Custom and Search for the Security group ID of
the web tier and select that
- Scroll down and Click Create Security Group - Go back
to the Application Load Balancer page - on Security
group option click on the refresh icon on the right, now
click the drop down arrow and select our just created
security group for the app tier - on Listeners and
routing go to default action click the drop down arrow
and click on the created target group - Scroll down
amd click on Create Load Balancer
59.
Now lets go to Our Auto Scaling Group Page - existing
load Balancer target groups - click the refresh icon -
click the drop down icon and select our created target
group for the App tier - Enable Health Checks - Click on
Next - Now on Configure group size and scaling policies
- desired capacity 2 - minimum capacity 2 - Maximum
Capacity 4 - Now go to Automatic Scaling - select
Target tracking Scaling policy - Scroll down and Keep
Clicking on Next till you get to the Review page - Scroll
down and click on Create Auto Scaling group - you
should see it successfully created. Now you should See
4 total instances when you go to your EC2 instances.
60. Now lets Create
our Database tier
61.
Now on the AWS Search Bar, Search for RDS - Click on it - click on Subnet Groups first
62.
Now follow the process as seen
63.
Now, for Availability Zones Click us east 1a and us east 1b -
Under Subnets Choose the private subnets assigned for
database tier which on my case is private subnet 3 and 4 -
Now, click Create - Now click on Databases - Click on Create
Database - on the Engine Options select MySQL engine - Scroll
to Template and Click Free Tier option - Scroll down and Give
Database name (DB instance identifier) - scroll down and input
master password - on the instance configuration area, I'll
chose a t2 micro - Scroll down, Enable auto scaling - Change
the VPV to our created VPC - Scroll down to VPC Security
group firewall - click create new - enter VPC Security group
name - Select Availability Zone as us east 1a (the other
automatically acts as a standby) - Scroll down and Click on
Create Database
64.
Now go to your EC2 console go to Security Groups - Locate the Database
Security group - click inbound rules - click edit inbo
und rules
65.
Click on add rule - Set the type to
All traffic - Set the Source to
Custom, search and select out our
Database Security group - Click
Create security group rule.
66.
Now you can test by Pinging any of the private instances through
the public instances using EC2 instance connect, Gitbash etc
67.
Thanks For
Following
Lets Connect
Gmail : ayomideogunsanya@gmail.com
LinkedIn : https://www.linkedin.com/in/thecloudlord/
X : https://twitter.com/TheCloudLord_

More Related Content

Similar to Three Tier Architecture Project Using AWS.pdf

Handouts for east coast hands on exercises v1
Handouts for east coast hands on exercises v1Handouts for east coast hands on exercises v1
Handouts for east coast hands on exercises v1ozkan01
 
Aws project jenkins-build-server
Aws project jenkins-build-serverAws project jenkins-build-server
Aws project jenkins-build-serversaifam
 
Step by step installation of microsoft dynamics 365 finance and operations on...
Step by step installation of microsoft dynamics 365 finance and operations on...Step by step installation of microsoft dynamics 365 finance and operations on...
Step by step installation of microsoft dynamics 365 finance and operations on...Umesh Pandit
 
GigaSpaces CCF Quick Tour - 2.3.6
GigaSpaces CCF Quick Tour - 2.3.6GigaSpaces CCF Quick Tour - 2.3.6
GigaSpaces CCF Quick Tour - 2.3.6Shay Hassidim
 
Cisco ASA Firepower
Cisco ASA FirepowerCisco ASA Firepower
Cisco ASA FirepowerAnwesh Dixit
 
WASPNEWServerDecoumentation
WASPNEWServerDecoumentationWASPNEWServerDecoumentation
WASPNEWServerDecoumentationJames Willis
 
Writing simple web services in java using eclipse editor
Writing simple web services in java using eclipse editorWriting simple web services in java using eclipse editor
Writing simple web services in java using eclipse editorSantosh Kumar Kar
 
Automation of web attacks from advisories to create real world exploits
Automation of web attacks from advisories to create real world exploitsAutomation of web attacks from advisories to create real world exploits
Automation of web attacks from advisories to create real world exploitsMunir Njiru
 
9. virtualization virtualization
9. virtualization virtualization9. virtualization virtualization
9. virtualization virtualizationSagarR24
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 serversMark Myers
 
Activity 9 Working with AWS CloudTrail.pdf
Activity 9 Working with AWS CloudTrail.pdfActivity 9 Working with AWS CloudTrail.pdf
Activity 9 Working with AWS CloudTrail.pdfstirlingvwriters
 
Cloud Delivery
Cloud DeliveryCloud Delivery
Cloud DeliveryStelligent
 
Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2IMC Institute
 

Similar to Three Tier Architecture Project Using AWS.pdf (20)

Handouts for east coast hands on exercises v1
Handouts for east coast hands on exercises v1Handouts for east coast hands on exercises v1
Handouts for east coast hands on exercises v1
 
Aws project jenkins-build-server
Aws project jenkins-build-serverAws project jenkins-build-server
Aws project jenkins-build-server
 
Client Server Live Hosting Documentation
Client Server Live Hosting Documentation Client Server Live Hosting Documentation
Client Server Live Hosting Documentation
 
AWS essentials EC2
AWS essentials EC2AWS essentials EC2
AWS essentials EC2
 
Client deployment
Client deploymentClient deployment
Client deployment
 
Step by step installation of microsoft dynamics 365 finance and operations on...
Step by step installation of microsoft dynamics 365 finance and operations on...Step by step installation of microsoft dynamics 365 finance and operations on...
Step by step installation of microsoft dynamics 365 finance and operations on...
 
Solace Integration with Mulesoft
Solace Integration with MulesoftSolace Integration with Mulesoft
Solace Integration with Mulesoft
 
GigaSpaces CCF Quick Tour - 2.3.6
GigaSpaces CCF Quick Tour - 2.3.6GigaSpaces CCF Quick Tour - 2.3.6
GigaSpaces CCF Quick Tour - 2.3.6
 
Cisco ASA Firepower
Cisco ASA FirepowerCisco ASA Firepower
Cisco ASA Firepower
 
WASPNEWServerDecoumentation
WASPNEWServerDecoumentationWASPNEWServerDecoumentation
WASPNEWServerDecoumentation
 
Writing simple web services in java using eclipse editor
Writing simple web services in java using eclipse editorWriting simple web services in java using eclipse editor
Writing simple web services in java using eclipse editor
 
Microsoft Lync Server 2010 Installation
Microsoft Lync Server 2010 InstallationMicrosoft Lync Server 2010 Installation
Microsoft Lync Server 2010 Installation
 
Automation of web attacks from advisories to create real world exploits
Automation of web attacks from advisories to create real world exploitsAutomation of web attacks from advisories to create real world exploits
Automation of web attacks from advisories to create real world exploits
 
AWS DataSync.pdf
AWS DataSync.pdfAWS DataSync.pdf
AWS DataSync.pdf
 
Lampstack (1)
Lampstack (1)Lampstack (1)
Lampstack (1)
 
9. virtualization virtualization
9. virtualization virtualization9. virtualization virtualization
9. virtualization virtualization
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 servers
 
Activity 9 Working with AWS CloudTrail.pdf
Activity 9 Working with AWS CloudTrail.pdfActivity 9 Working with AWS CloudTrail.pdf
Activity 9 Working with AWS CloudTrail.pdf
 
Cloud Delivery
Cloud DeliveryCloud Delivery
Cloud Delivery
 
Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2
 

Recently uploaded

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 

Recently uploaded (20)

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 

Three Tier Architecture Project Using AWS.pdf

  • 1. Three Tier Architecture Project using AWS by Ayomide Ogunsanya (TheCloudLord)
  • 2. What is a three-tier architecture? A three-tier application is a type of software architecture that divides an application into three logical layers: presentation, application (or logic), and data. Each layer serves a specific purpose and communicates with the other layers to perform various functions within the application. 1.
  • 3. Parts of a three-tier architecture Presentation Tier (Front-end) This layer is responsible for handling user interactions and displaying information to users. It includes user interfaces, such as web pages, mobile apps, or desktop interfaces. The presentation tier communicates with the application tier to request and receive data, but it doesn't directly interact with the data storage. 2.
  • 4. Parts of a three-tier architecture Application Tier (Middle-tier or Logic Tier) This layer contains the core logic and functionality of the application. It processes user requests from the presentation tier, executes business logic, and interacts with the data tier to retrieve or update data. The application tier acts as an intermediary between the presentation tier and the data tier, ensuring separation of concerns and modularity. 3.
  • 5. Parts of a three-tier architecture Data Tier (Back-end) This layer manages the storage and retrieval of data used by the application. It typically consists of databases or other data storage systems. The data tier stores and organizes data, handles data retrieval and manipulation requests from the application tier, and ensures data integrity and security. 4.
  • 8. On your AWS Console, Search for 'VPC', Click on create VPC. Now, on the 'VPC Settings' option, select 'VPC and more', go to Name tag option and put in a VPC name, Lets leave the IPv4 CIDR Block at default for this project 7.
  • 9. 8. Select [No ipv6 CIDR Block], Leave the [tenancy] at default, in this case we are using 2 availiability zones which we are going to set as [us-east-1a] and [us-east-1b]
  • 10. 9. Set [Public Subnet] at 2, [Private Subnets] at 4 which makes a total of 6 subnets for the 2 availability zones. Now, leave the [NAT Gateway] at none in this case
  • 11. 10. Now, lets Customize the CIDR ranges using the IPs as shown
  • 12. 11. Select these Options and click on the create [VPC button] when done. Now, after VPC Parameters is created, click on the [View VPC] Button
  • 13. 12. Your VPC should be created like this showing the parameters. You could also Check the [Resource map] to view your created VPC.
  • 14. 13. Now, lets enable Auto asign Public IPv4 address in both public subnets, this is necessary so our application can be accessed publicly. Click on Subnets - Select Subnet ID - Click on Actions - Select Edit Subnet Settings
  • 15. 14. Now, Check the Enable auto assign public IPv4 address box - Scroll Down and Click Save. Now repeat the same action for the other Public Subnet
  • 16. 15. Select Internet gateways and confirm it's attached automatically to your VPC build.
  • 17. 16. Select Route Tables and confirm it is associated with the public subnets
  • 18. 17. Select Route Tables and confirm it is associated with the public subnets also verify the same for the private subnets.
  • 19. 18. "We have Successfully Created our backbone of the Architecture ! Now Lets Deploy the Web Tier"
  • 20. 19. Now, go to EC2 - Launch Template - Create Launch Template
  • 21. 20. Now Insert Template name - Template Version description - Check Auto Scaling Guidiance
  • 22. 21. Scroll to Application and OS images AMI - Select Amazon Linux - Select Amazon Linux 2 Free Tier Instance type
  • 23. 22. Scroll to Instance type - Click rop down arrow - Select t2 micro - Scroll to key pair login - Select Create new key pair
  • 24. 23. Type in Keypair name - Click on Create Key Pair (Make sure you save yo ur downloaded keypair in a secure place )
  • 25. 24. Now, lets create our security groups - Scroll to Network Settings - Select Create Security Groups - Input Name - Input Description - Select our created VPC
  • 26. 25. Click Add Security Group Rule - Under Type select All ICMP IPv4 - For source type, we are selecting Anywhere for this project - Now lets add another Security Group Rule click on it.
  • 27. 26. Now perform the same procedure but this time setting the type at HTTP. Now click on add Security Group Rule again for the 3rd one C
  • 28. 27. This time set the type to SSH - Click Advance Network Configuration - Click Add Network Interface
  • 29. 28. Set Auto-assign public IP to Enable - Scroll down to Advanced Details and click on it
  • 30. 29. Now Scroll down to user data and paste the bash script as seen (I'll leave the Bash script in the N ext Page, modify as you wish) - Click Launch Template
  • 31. 30. #!/bin/bash # get admin privileges sudo su # install httpd yum update -y yum install -y httpd.x86_64 systemctl start httpd.service systemctl enable httpd.service echo "<center><h1><a href='https://www.solavisetech.com/'>Practice Website</a><h1></center> " > /var/www/html/index.html
  • 32. 31. Click View Launch Template - Now to your left, Scroll down to Auto Scaling Groups and Click on it.
  • 33. 32. Click on create Auto Scaling Group.
  • 34. 33. Give Auto Scaling Group name -Select your Created Template - On Version, Select Latest - Scroll down and Click on Next
  • 35. 34. Scroll down to Network - VPC - Select your Created VPC - On Avaliability Zones and Subnets, Select all Public subnets - Click Next
  • 36. 35. Now Click the Hamburger Icon by you left and scroll down to Load Balancing - Select Target Groups - Click on Create Target Group
  • 37. 36. Scroll down and input Target Group Name - Select your VPC - Scroll to the end and Click Next
  • 38. 37. Scroll down and and click on Create Target Group
  • 39. 38. On your Left, Scroll down to Load Balancers click on it - Click on Create Load Balancer
  • 40. 39. We are using an ALB - Click Create
  • 41. 40. Now Scroll down - Input ALB Name - Select Your VPC - Select the Subnet Boxes and ensure they are on public subnets
  • 42. 41. On Security Groups, Click on Create a New Security Group
  • 43. 42. Now, Give a Security Group Name - Same as Description - Select your VPC - Set inbound rules as clicking Add rule - Select Type as indicated and select source as anywhere IPv4
  • 44. 43. Click Create Security Group - Now return to your ALB Settings and update the security group to the just created one NB: if it doesnt come up, refresh with the Refresh Icon
  • 45. 44. Scroll to Listeners and routing - Select your Created Target Group - Scroll down and Click Create Load Balancer - Click Veiw Load Balancer to see
  • 46. 45. Give a few minutes for the provisioning process to be completed for the Load Balancer to be Active - Go back to youe EC2 - Auto Scaling Groups step 3 and click on Attach to an existing load balancer View page 33 -35 if you've forgotten the steps
  • 47. 46. Select your already Existing Load Balancer target group - Turn on Elastic Load Balancing health checks - Scroll Down and Click Next
  • 48. 47. Now, Configure the Group Sizes as seen
  • 49. 48. Set limits on how much your desired capacity can be increased or decreased as seen - select Target tracking scaling policy
  • 50. 49. Set limits on how much your desired capacity can be increased or decreased as seen - select Target tracking scaling policy - Scroll down and Click on Next - Keep clicking next till you get to the Review Page - At the Review page, scroll down and Click Create auto scaling group
  • 51. 50. Now we have our ASG Created Sucessfully. Weldone! Now we have 2 instances running. to confirm this, go to your EC2 - select instances to view how many instances are running.
  • 52. 51. You can see the two instances are running - Now Copy the Public IPv4 IP address, create a new tab on your browser and paste to check if the website loads from the instance. Do the same for the other instance.
  • 53. 52. The IP Address Opens up the website - Click on the Link to Open up the Site
  • 54. 53. Paste the DNS Name in your Browser to access the site through the LB
  • 55. 54. Now, Lets Create the app tier - Go to EC2 - Launch template - Enter template name - enter template version description - Click on Auto Scaling Guidance - Go to AMI - Select Amazon Linux - Select Amazon Linux 2 free tier - for instance type Select t2 micro - for key pair, select the existing key pair we created at the beginning - Click create security group - Give a security group name - put description - for VPC use the one we created - Click add security group rule - For type select Custom ICMP IPv4 - For source type, select Anywhere - Click on Add security group rule again - this time for type click on SSH - Source type is Custom - for source, select your Webtier security group - Click on Create Launch Template - click launch template
  • 56. 55. Now, we have our Created App template
  • 57. 56. Now lets create the Back-end auto scaling Group - Click on the Hamburger Sign go to Auto scaling group - input Auto scaling group name - Select Our Launch template for the App tier - under version click Latest - Click Next - Now for Network Chose Our VPC - Under AZ and Subnets, Select (Us east 1a) private 1 subnet and (Us east 1b) private 2 subnet - Click Next - on Load Balancing, Click attach to an existing Load Balancer - for this, lets duplicate our tab, go to Load Balancing - Target groups - instances - give target group name - scroll down to VPC and select our VPC - Click on Next
  • 58. 57. Scroll down and click on Create target group - Now go to Load Balancer - Click Create Load Balancer - on the load Balancer type click create button on ALB - input Load Balancer name - on scheme, select internal - Go to network mapping and select our VPC - on mappings, make sure you select the private subnets for the app tier - Go to security group - click on the create a new security group link - input name - input description - select our VPC - click on inbound rules - for type click HTTP
  • 59. 58. - for Source select Custom and Search for the Security group ID of the web tier and select that - CLICK add rule again - for type click All ICMP IPv4 - for Source select Custom and Search for the Security group ID of the web tier and select that - Scroll down and Click Create Security Group - Go back to the Application Load Balancer page - on Security group option click on the refresh icon on the right, now click the drop down arrow and select our just created security group for the app tier - on Listeners and routing go to default action click the drop down arrow and click on the created target group - Scroll down amd click on Create Load Balancer
  • 60. 59. Now lets go to Our Auto Scaling Group Page - existing load Balancer target groups - click the refresh icon - click the drop down icon and select our created target group for the App tier - Enable Health Checks - Click on Next - Now on Configure group size and scaling policies - desired capacity 2 - minimum capacity 2 - Maximum Capacity 4 - Now go to Automatic Scaling - select Target tracking Scaling policy - Scroll down and Keep Clicking on Next till you get to the Review page - Scroll down and click on Create Auto Scaling group - you should see it successfully created. Now you should See 4 total instances when you go to your EC2 instances.
  • 61. 60. Now lets Create our Database tier
  • 62. 61. Now on the AWS Search Bar, Search for RDS - Click on it - click on Subnet Groups first
  • 63. 62. Now follow the process as seen
  • 64. 63. Now, for Availability Zones Click us east 1a and us east 1b - Under Subnets Choose the private subnets assigned for database tier which on my case is private subnet 3 and 4 - Now, click Create - Now click on Databases - Click on Create Database - on the Engine Options select MySQL engine - Scroll to Template and Click Free Tier option - Scroll down and Give Database name (DB instance identifier) - scroll down and input master password - on the instance configuration area, I'll chose a t2 micro - Scroll down, Enable auto scaling - Change the VPV to our created VPC - Scroll down to VPC Security group firewall - click create new - enter VPC Security group name - Select Availability Zone as us east 1a (the other automatically acts as a standby) - Scroll down and Click on Create Database
  • 65. 64. Now go to your EC2 console go to Security Groups - Locate the Database Security group - click inbound rules - click edit inbo und rules
  • 66. 65. Click on add rule - Set the type to All traffic - Set the Source to Custom, search and select out our Database Security group - Click Create security group rule.
  • 67. 66. Now you can test by Pinging any of the private instances through the public instances using EC2 instance connect, Gitbash etc
  • 68. 67. Thanks For Following Lets Connect Gmail : ayomideogunsanya@gmail.com LinkedIn : https://www.linkedin.com/in/thecloudlord/ X : https://twitter.com/TheCloudLord_