Coder Social home page Coder Social logo

application-terraform's Introduction

Provisioning the Amazon EKS cluster using Terraform

This repository contains the terraform file code, which we can use to provision the Amazon EKS cluster as part of Project 4 of our 10WeeksofCloudOps series! In this comprehensive hands-on project, we dive deep into the world of GitOps and ArgoCD, demonstrating how to implement these essential DevOps practices step by step by dockerizing the application and provisioning the infrastructure using Terraform(this repo).

💪Complete Hands-on video tutorial for this project. Click here 👇

GitOps , ArgoCD, Terraform

Architecture Diagram

Architecture Diagram

Installation of Terraform

Follow the below steps to Install the Terraform and another dependency.

1️⃣ Clone the repo

git clone https://github.com/piyushsachdeva/10weeksofcloudops-week4-tf.git

2️⃣ Let's install dependency to deploy the application

cd kube_terraform/ToDo-App/
terraform init

3️⃣ Edit the below file according to your configuration

vim kube_terraform/ToDo-App/backend.tf

add below code

terraform {
  backend "s3" {
    bucket = "S3-BUCKET-NAME"
    key    = "backend/TFSTATE-FILE.tfstate"
    region = "us-east-1"
    dynamodb_table = "DYNAMODB-TABLE-NAME"
  }
}

Let's set up the variable for our Infrastructure and create one file with the name of terraform.tfvars inside kube_terraform/ToDo-App/backend.tf and add the below conntent into that file.

REGION          = "us-east-1"
PROJECT_NAME    = "ToDo-App"
VPC_CIDR        = "10.0.0.0/16"
PUB_SUB1_CIDR   = "10.0.1.0/24"
PUB_SUB2_CIDR   = "10.0.2.0/24"
PRI_SUB3_CIDR   = "10.0.3.0/24"
PRI_SUB4_CIDR   = "10.0.4.0/24"

Please note that the above file is crucial for setting up the infrastructure, so pay close attention to the values you enter for each variable.

It's time to build the infrastructure

The below command will tell you what terraform is going to create.

terraform plan

Finally, HIT the below command to create the infrastructure...

terraform apply

type yes, and it will prompt you for permission or use --auto-approve in the command above.

This project contains Three GitHub repositories

➡️ [App Code] (https://github.com/piyushsachdeva/AppCode)

➡️ [Terraform code] (https://github.com/piyushsachdeva/10weeksofcloudops-week4-tf)

➡️ [Manifest Repo] (https://github.com/piyushsachdeva/kube_manifest)

application-terraform's People

Contributors

maryayobami avatar

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.