[go: up one dir, main page]

0% found this document useful (0 votes)
23 views9 pages

Drupal Build Guide

Drupal

Uploaded by

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

Drupal Build Guide

Drupal

Uploaded by

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

BUILD GUIDE

ON: DRUPAL

BY: Ahmad Wani


Step 1: Create two VPC’s, one for the application and another one for the database

1. Search for VPC in the console.


2. Click on create VPC and add the details

3. Provide a CIDR range and then click on create

Do this for the second vpc as well.

Finally you will have two VPC’s

Step 2: Create 2 subnets in each VPC

For this we are creating 1 public subnet for the web-application, and 1
public and 1 private subnets for the database

How to create a subnet?

1. Go to VPC
2. On the left panel select subnets
3. Next click on create subnet
4. Select the VPC in which you want to create the subnet
5. Name the subnet
6. Select the appropriate CIDR range
7.

After filling the requirements click on create subnet.

Do this for the 4 subnets.

Step 3: Create an internet gateway and attach it to both the VPC’s

1. To create an internet gateway click on the internet gateway option in the left
pannel
2. Click on create and name it
3. Once it is created then click on attach
Step 4: Create a NAT gateway

1. To create a NAT gateway click on the NAT gateway option in the left pannel
2. Click on create
3. Select a subnet, here we are creating it in the public subnet of the Database vpc

Step 5: Create 3 route tables, one for the app VPC and two for the db VPC ( 1 for private
subnet and 1 for the public subnet)

1. Go to route tables in the left panel of the VPC service


2. Click on create route table
3. Give a name to the Route Table
4. Give the appropriate VPC you want to create a route table for
Step 6: Select each route table and edit the routes for them

1. Click on the route table


2. Click on routes
3. Click edit routes
4. Add the IGW route to the public route tables
5. Add nat gateway to the private route table in the db VPC

Step 7: Inorder to establish connection between the two VPC’s we use Transit gateway

1. Go to the transit gateway section create a transit gatew


2. Next create two separate transit gateway attachments one for the APP VPC
and another one for the DB vpc.
3. Once the connection is established go to each route table and edit the routes
4. Click on edit route
5. In the destination provide the CIDR for the other vpc which you want to peer
with
6. Select source as Transit gateway and use the attachment you had created
7. Repeat this for all the route tables (Keep in mind that the destination ip’s
should be correct)

Step 8: Create 2 instance to test the connection

1. Create an instance in the public subnet of the app VPC and another one in the
public subnet of the db VPC
2. Go to ec2
3. Click on launch an instance
4. Give a name, select amazon linux, use t2.micro(optional)
5. Select key pair
6. Next you select the vpc
7. Create a security group, allow ssh and http traffic
8. Create the instance
9. Login to the instance and use ping command to check the connection

Step 9: Create an RDS

1. Go to the RDS section and then create a mysql database


2. Select the appropriate type of instance
3. Give admin as user and password as well
4. Give an initial name to the db
5. One this is done create the db
6. Copy the endpoint

Step 10: Download Drupal

1. Refer to the aws docs for this


2. Before this install http and php
3. Ssh into the ec2 and then follow the docs to install drupal
Link: Module Four

Step 11: After creating the Instance create ALB


1. Go to load balancers and then create load balancer (use application load
balancer)
2. Next give a name and select the target group
3. If you do not have a target group go click on create target group and add the
instance to the target group and click on create
4. Next you select the subnets and create the Load Balancer.

Step 12: Create an ASG

1. Go to asg in the ec2 section


2. Next you create a asg
3. Name the asg
4. It will ask for the launch template.
5. For this you need to create an image of the instance running
6. Go to the running instance click on it go to images and templates then click on
create image
7. Once this is done create the launch template using this image
8. Go back to the ASG
9. Use the created launch template
10. Then add the desired specs for the instances to be created
11. Also add the desired, min and max capacity of the scaling

Step 13: Setup cloudfront for the app

1. Create a distribution
2. Add the arn of the app server
3. Next you create the distribution
4. Go to security and then edit the geographic restrictions
5. In that select block and add Pakistan

Step 14: Setup cloudwatch

1. Go to cloudwatch and then create a dashboard


2. In that select line

3. And then create a graph to monitor CPU Utilization


4. You can add more

Step 15: Setup CloudTrail

1. Search for CloudTrail in the console


2. Name it
3. Select or create a bucket to store the logs
4. Create it
Final output:

You might also like