Coder Social home page Coder Social logo

terraform-team-2's Introduction

Terraform project: Team-1 - AWS

Setup input parameters

Before building project set input variables!

  • copy them to ~/.bashrc and reopen your terminal
  • OR run them in CLI before run terraform command

They look like:

export TF_VAR_region=us-west-1
export PKR_VAR_region=$TF_VAR_region
export TF_VAR_domain_name=domain.com
export TF_VAR_db_name=wordpress
export TF_VAR_db_username=admin
export TF_VAR_db_password=Passw0RDforDataBase

To build Project

Run command

bash build.sh

To destroy project

Run command:

bash destroy.sh

VPC group:

Module is published at Terraform Registry (https://registry.terraform.io/modules/rus777777/vpc-t1/aws/latest) :

module "vpc-t1" {
  source  = "rus777777/vpc-t1/aws"
  ...
}

Source code is in the

[email protected]:rus777777/terraform-aws-vpc-t1.git

Project

Project description

Project goals (1 page)

  • Project tasks:

    • create infrustructure architecture
    • the size of the resources (could be parameterized)
    • determine dependencies between groups
    • flexibility of the code
    • make regionless dependency
      • deploy into another region with a few clicks
      • resources should not depend on specific region
  • Team communication:

    • How to negotatate with groups inside team
      • chat channel (telegram)
      • zoom
      • etc
    • which backends we use

Org structure (1 page)

  • Team leader
  • VPC group
  • RDS group
  • ASG group

Infrastructure architecture (1 page)

  • Current infrastructure of our Project - Anelia will share later

  • create primitive model (prototype) of our project to negotiate beetwen groups

VPC (1-3 pages)

  • make base for other groups - RDS, ASG should not wait
  • VPC organise as a Terraform mudule
  • module published in Terraform Registry for public use

VPC

  • 3 public subnets
  • 3 private subnets
  • 1 GW
  • (depend on parameter) NAT GW

RDS

  • RDS instanse - was created as simple model for testing connection
  • Linked with our VPC
  • DB/Login/Password is stored in env (also worked with Parameter Store - commented in code).
  • RDS resides in private subnets, not accessible from Internet.
  • Security Group is allow to access to port 3306
  • using resources Aurora cluster
  • publish in Route53:
    • writer.yourdomain.com
    • reader1.yourdomain.com
    • reader2.yourdomain.com
    • reader3.yourdomain.com

ASG (1-3 pages)

  • Launchned in our VPC

  • Packer - for making golden image for ASG

    • code not depend on region - automative use our region
    • use Amazon Linux 2
  • ASG template - automaticale choose latest golden image

    • use templatefile() for dynamic create file with needed parameters
  • userdata

    • automative script to startup Wordpress and connect to DB
  • ELB in public sunbets

  • ASG in private subnets

  • Security groups:

    • ELB accessable from Internet
    • ASG accessable from ALB
  • wordpress is accessable through ALB by address wordpress.yourdomain.com

Outputs / resume (1 page)

  • we successfully made this project

    • flexibility of the code
    • deploy into another region with a few clicks
    • expirience 3-tire architecture
    • undestood every stage of the project, correlation between groups
  • what we learn from this project

  • how many time (hours) team members contribute to project


Helpful links:

Markdown Cheatsheet

https://github.com/tchapi/markdown-cheatsheet/blob/master/README.md

Reference architecture

https://docs.aws.amazon.com/whitepapers/latest/best-practices-wordpress/reference-architecture.html


terraform-team-2's People

Contributors

rus777777 avatar kikuli avatar emelit1 avatar botasun avatar anelyamk 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.