HYBRID-MULTI-CLOUD (TASK-4)

Deploying WordPress and Database container using AWS -> Network As A Service(NAAS) and Terraform using NAT Gateway.

Objective:

Perform task-3 with an additional feature to be added that is NAT Gateway to provide the internet access to instances running in the private subnet.

Performing the following steps:
1. Write an Infrastructure as code using terraform, which automatically create a VPC.
2. In that VPC we have to create 2 subnets:
>public subnet [ Accessible for Public World! ]
>private subnet [ Restricted for Public World! ]
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 instance can connect to outside world, update and associate it with public subnet.
5. Create a NAT gateway for connect our VPC/Network to the internet world and attach this gateway to our VPC in the public network
6. Update the routing table of the private subnet, so that to access the internet it uses the NAT gateway created in the public subnet
7. Launch an ec2 instance which has WordPress setup already having the security group allowing port 80 so that our client can connect to our WordPress site. Also attach the key to instance for further login into it.
8. Launch an 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. Also attach the key with the same.

Before the task lets talk about some services which we are going to use :- click here…

# Creating a VPC

# Creating a public subnet

# Creating a private subnet

# Creating an Internet Gateway

# Creating a Routing table and adding a route to enter the public world via an Internet Gateway

# Associating this routing table to subnet1

# Creating a Security group for WordPress instance in the public subnet

# Creating a Security group for MySQL instance in a private subnet

# Launching WordPress instance in the public subnet

# Launching MySQL instance in the private subnet

# Setting up the instances to work with the flow

I have uploaded the ssh key to GitHub so that my public instance can download it to ssh into the private instance

Now the infrastructure for AWS -> Network As A Service(NAAS) has been successfully created. We are good to check our WordPress webpage using the public IP assigned to us.

That's it, task-4 completed, for any query feel free to contact me on my LinkedIn profile : https://www.linkedin.com/in/mayank-varshney-62744a163

For the terraform code you can refer to my GitHub : https://github.com/mayank-aly/cloud-task-4.git

Thank You!

--

--

--

I am a forward-thinking individual with exceptional skills in problem-solving, adaptive thinking, automation, and development.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Automated Image Creation Using EC2 Image Builder And Deploying Them To An AutoScaling Group

What it’s like to work as a developer at Talon.One | Talon.One

Header image

ASDAL: The perfect approach in smooth Planning

COMMAND-LINE: THE BACKBONE OF ANY OPERATING SYSTEM.

Kubernetes Namespaces in a Nutshell

An introduction to infrastructure as code with Terraform on AWS

Day 1: 100 Days of Code — 7–5–19

From “Hello, World!” to “Hello, Paycheck!”

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
MAYANK VARSHNEY

MAYANK VARSHNEY

I am a forward-thinking individual with exceptional skills in problem-solving, adaptive thinking, automation, and development.

More from Medium

Security groups for pods

Cloud Foundry Advisory Board Call, Mar 2022: Open Service Broker API

Why are you like this???

Slow down — read the error! Installing Terraform on a windows PC.