Giter VIP home page Giter VIP logo

3rdweekofcloudops's Introduction

🚀 3rdWeeksofCloudOps - 2 tier Application throgh terraform

✨This repository is created to learn and deploy 2-tier application on aws cloud through terraform.

🏠 Architecture

Architecture of the application

🖥️ Installation of Terraform

Note: Follow blog to Install the Terraform and other dependency. Terrafrom

👉 let install dependency to deploy the application

cd book_shop_app
terraform init 

Note: we need public key and private key for our server so follow below procedure.

cd modules/key/
ssh-keygen.exe 

above command ask for key name then give client_key it will create pair of keys one public and one private. you can give any name you want but then you need to edit the terraform file

edit below file accoding to your configuration

vim book_shop_app/backend.tf

add below code in book_shop_app/backend.tf

terraform {
  backend "s3" {
    bucket = "BUCKET_NAME"
    key    = "backend/FILE_NAME_TO_STORE_STATE.tfstate"
    region = "us-east-1"
    dynamodb_table = "dynamoDB_TABLE_NAME"
  }
}

🏠Lets setup the variable for our Infrastructure

create one file with the name of terraform.tfvars

vim book_shop_app/terraform.tfvars

add below contents into book_shop_app/terraform.tfvars file

REGION                  = ""
PROJECT_NAME            = ""
VPC_CIDR                = ""
PUB_SUB_1_A_CIDR        = ""
PUB_SUB_2_B_CIDR        = ""
PRI_SUB_3_A_CIDR        = ""
PRI_SUB_4_B_CIDR        = ""
PRI_SUB_5_A_CIDR        = ""
PRI_SUB_6_B_CIDR        = ""
DB_USERNAME             = ""
DB_PASSWORD             = ""
CERTIFICATE_DOMAIN_NAME = ""
ADDITIONAL_DOMAIN_NAME  = ""

✈️ Now we are ready to deploy our application on cloud ⛅

get into project directory

cd book_shop_app

type below command to see plan of the exection

terraform plan

✨Finally, HIT the below command to deploy the application...

terraform apply 

type yes, it will prompt you for permission..

Thank you so much for reading..😅

3rdweekofcloudops's People

Contributors

ankitjodhani 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.