GithubHelp home page GithubHelp logo

web_infra's Introduction

Web Application Architecture

This project establishes a resilient AWS environment featuring an auto-scaling EC2 configuration supported by a load balancer and an RDS instance. The architecture prioritizes secure communication between these components.

Project Highlights

  • Architecture : Leverage Terraform and Terragrunt to craft an adaptive AWS setup. This includes an auto-scaling EC2 arrangement complemented by a load balancer and an RDS instance, ensuring both scalability and security.
  • Modularity : The project is structured into two pivotal modules — the Network Module and the Auto Scaling Group Module. This separation streamlines development and management.
  • Terragrunt Benefits : The integration of Terragrunt simplifies module deployment and administration, enabling enhanced reusability and configuration control.

Project Structure

The project structure is as folows:

├── dev
│   ├── auto_sg
│   │   └── terragrunt.hcl
│   ├── common.hcl
│   ├── db.tfvars
│   ├── network
│   │   └── terragrunt.hcl
│   └── terragrunt.hcl
├── modules
│   ├── auto_sg
│   │   ├── alb.tf
│   │   ├── bastion.tf
│   │   ├── cloudwatch_alarm.tf
│   │   ├── db.tf
│   │   ├── keys.tf
│   │   ├── launch_template.tf
│   │   ├── scaling_group.tf
│   │   ├── scaling_policy.tf
│   │   ├── userdata
│   │   │   ├── bastion.sh
│   │   │   └── httpd.sh
│   │   └── variables.tf
│   └── network
│       ├── igw.tf
│       ├── nat.tf
│       ├── output.tf
│       ├── routes.tf
│       ├── securitygroups.tf
│       ├── subnets.tf
│       ├── variables.tf
│       └── vpc.tf
├── .gitignore
└── README.md

Architecture

architecture

The main components of the project are as follows:

  1. Network Module : Located within the modules/network directory, this module establishes the foundational networking components. It encompasses the creation of a Virtual Private Cloud (VPC), the configuration of subnets, the integration of an Internet Gateway (IGW) for external connectivity, and the setup of a Network Address Translation (NAT) Gateway for private subnet access to the internet.
  2. Auto Scaling Group Module : Found in the modules/auto_sg directory, this module orchestrates the auto-scaling EC2 instances with a launch template, load balancers, a bastion host if enabled, cloudwatch alarms and scaling policies, and an RDS database. It ensures the environment's elasticity by dynamically adjusting the number of instances based on traffic. The module's components collaborate seamlessly to provide high availability, responsive user experiences, and scalability.
  3. Terragrunt Integration : Terragrunt empowers the efficient deployment of modules by encapsulating configurations. Utilized within the dev directory, it simplifies and enhances the process by managing environment-specific settings and enabling consistent deployment practices. Terragrunt provides an abstraction layer that streamlines module usage and maintenance.

Getting Started

To deploy the architecture using Terragrunt:

  1. Clone the repository to your local environment.
  2. Navigate to the dev directory.
  3. Adjust environment-specific variables in .hcl and .tfvars files. Set a .tfvars file in the root of dev dir to handle the rds credetional variables.
  4. Apply the configurations using Terragrunt:
terragrunt run-all apply

web_infra's People

Watchers

 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.