Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NGINX Instance Deployment using Terraform

Overview

This setup demonstrates the deployment of a Dockerized NGINX instance using Terraform and AWS resources. The goal is to set up an NGINX server that is publicly accessible and displays the text “yo this is nginx” when accessed. The deployment uses a combination of AWS infrastructure, Docker, and Terraform to achieve this.

AWS Infrastructure Setup

  • Virtual Private Cloud (VPC): Contains public and private subnets.
  • EC2 Instance: Deployed in the private subnet with dockerized NGINX.
  • Security Groups: To ensure secure communication.
  • Internet Gateway: Grants public subnets access to the internet.
  • NAT Gateway: Allows private subnet to reach the internet without directly exposing it.
  • Application Load Balancer (ALB): Balances incoming traffic to the EC2 instance.

Infrastructure Diagram

diagram-export-30-07-2024-16_24_28

Prerequisites

  • Install Terraform
  • Install and configure AWS CLI
  • AWS Account with sufficient permissions

Deployment Steps

  1. Clone the repository.
git clone https://github.com/Saddff2/Moveo_Assignment.git
cd Moveo_Assignment
  1. Deploy Infrastructure
terraform init
terraform apply
  1. Verify Deployment

Once the deployment is complete, access the public DNS of the Application Load Balancer (ALB) in your web browser. You should see the text “yo this is nginx” displayed.

  1. Clean Up
terraform destroy

Final Results

  1. A deployed instance of the application accessible from the public.
Screenshot
  1. Dockerized Nginx that can run locally.
Screenshot

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages