GithubHelp home page GithubHelp logo

test-interns-endava-2's Introduction

AWS Infrastructure Deployment with Terraform ๐ŸŒŸ

๐Ÿš€ Overview:

This repository showcases a Terraform-based deployment of a scalable and secure AWS infrastructure, designed as a practical test for DevOps skills in Infrastructure as Code (IaC) and AWS Cloud services.

๐Ÿ’ก Objective:

The aim is to automate the deployment of a multi-server environment on AWS using Terraform, focusing on cost-efficiency by leveraging AWS's free tier resources. This project tests the candidate's ability to create a functional and secure cloud infrastructure within specified constraints.

๐Ÿ› ๏ธ Technology Stack:

  • Terraform: ๐ŸŒ For provisioning and managing AWS resources as code.
  • AWS EC2: ๐Ÿ’ป Two instances, one with Nginx and another with Apache, to demonstrate a multi-server setup.
  • AWS Application Load Balancer (ALB): ๐Ÿ”„ To distribute incoming traffic between the two EC2 instances.
  • AWS Security Groups: ๐Ÿ”’ To define traffic rules for the EC2 instances and the ALB, ensuring security best practices.

๐Ÿ“š Documentation

This README offers a step-by-step guide on deploying the infrastructure, with detailed explanations of the Terraform configurations used.

๐Ÿ“– Index


๐Ÿ—๏ธ Solution Architecture

The designed infrastructure aims to provide a basic, scalable, and secure web application environment on AWS.

๐Ÿ”ง Infrastructure Components

  1. Application Load Balancer (ALB): ๐Ÿ”„ Directs traffic to EC2 instances based on rules.
  2. EC2 Instances:
    • Server 01: ๐ŸŸข Runs Nginx.
    • Server 02: ๐Ÿ”ต Runs Apache.
  3. Security Groups: ๐Ÿ”’ Separate groups for ALB and EC2 instances to adhere to the principle of least privilege.

โš™๏ธ Terraform Configuration

The Terraform setup is organized into multiple files for better manageability:

  • ALB-application.tf: Configures the ALB.
  • ec2instance-apache.tf & ec2instance-nginx.tf: Provisions the EC2 instances.
  • security-group-*.tf: Defines the security groups and their rules.

๐Ÿš€ Provisioning and Deployment

๐Ÿ”‘ Prerequisites

  • AWS Account ๐ŸŒ
  • Terraform installed ๐Ÿ› ๏ธ
  • AWS CLI configured ๐Ÿ”ง

๐Ÿ› ๏ธ Deployment Steps

  1. Initialize Terraform: ๐ŸŒฑ
    terraform init
  2. Plan the Deployment: ๐Ÿ“ˆ:
    terraform plan
  3. Apply the Configuration: โœ…
    terraform apply

๐Ÿงช Testing the Infrastructure

After deployment, the ALB's DNS name, provided as a Terraform output, serves as the entry point for testing.

๐Ÿ•ต๏ธโ€โ™‚๏ธ Access the ALB URL:

The ALB URL is output by Terraform upon successful deployment. Look for an output variable named something like alb_dns_name.

๐Ÿš€ Test the Load Balancing:

Use a browser or a tool like curl to make requests to the ALB URL. You should see responses alternately from the Nginx and Apache servers, indicating successful load balancing.

curl -X GET <alb_dns_name>

test-interns-endava-2's People

Contributors

mnlops avatar fabiopalumbo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.