AWS-Task 3

AWS-Task 3

Create a vpc Infrastructure and Host a wordpress Application with Mysql

Finally completed!!! . In this task we have to create a web portal for our company with all security as much as possible. So , we use Wordpress software with mysql database server. Mysql should not be accessible from the outside world for security purposes. we only need to public the wordpress to clients.

Task is divided in 6 steps:

1-write a Infrastructure as code using terraform, which automatically create a VPC.

2- In that VPC we have to create two subnets:-- a) Public subnet b) Private subnet

3- create a public facing internet gateway for connect our VPC/Network to the internet world and attach this gateway to our vpc.

4- create a routing table for internet gateway so that insatnce can connect to outside world , update and associate it with public subnet.

5- Launch a EC2 instance which has wordpress setup already having the security group allowing port 80 so that our client can connect to our wordpress site.

6- Launch a EC2 instance which has Mysql setup already with security group allowing port 3306 in private subnet so that our wordpress vm can connect with the same.

* First we have to choose aws as provider.

No alt text provided for this image

* then we create our own VPC . don't forgot to enable DNS hostname.

No alt text provided for this image

* In that VPC we have to create two subnets:-- public subnet and private subnet. And in public subnet don't forget to enable public ip .

No alt text provided for this image

* then we create internet gateway for connect our vpc to internet world and attach this gateway to our vpc.

No alt text provided for this image

* we have to create a routing table so that our instance can connect to outside world and associate it with public subnet.

No alt text provided for this image

* we create security group for wordpress application which allowing port 80 so that our client can connect to our wordpress site. And create key which can attach to instance for login.

No alt text provided for this image
No alt text provided for this image

* Launch an EC2 instance in public subnet which has wordpress setup and attach key to instance.

No alt text provided for this image

* create security group for Mysql which allowing port 3306. So that our wordpress instance can connect with the same .

No alt text provided for this image

* Launch an EC2 instance in private subnet which has Mysql setup and attach key with the same.

No alt text provided for this image

* For build this terraform code run following commands:-

1.- terraform init-- for installation of required plugins

2.- terraform apply -- which run our code

No alt text provided for this image

Thank You!!!





To view or add a comment, sign in

More articles by Twinkle Purohit

  • Task 6

    Deploy the WordPress application on Kubernetes and AWS using Terraform and RDS What is Kubernetes? Kubernetes is a…

  • AWS-Task 4

    In this task perform task-3 with an additional feature to be added that is NAT Gateway to provide the internet access…

  • AWS-Task 2

    Automate AWS cloud using TERRAFORM TASK 2 Description Create Security group which allow the port 80. Launch EC2…

  • AWS-Task 1

    What is Cloud Computing? Cloud computing is the on-demand availability of computer system resources, especially data…

  • Deployment of WordPress and Mysql on the top of K8S Cluster using Amazon EKS Service

    INTRODUCTION OF EKS Amazon Elastic Kubernetes Service (Amazon EKS) is a fully managed Kubernetes Service. Customers…

Insights from the community

Others also viewed

Explore topics