Git Product home page Git Product logo

kubewebapp's Introduction

Web application DevOps pipeline using EKS and Github actions

  • webapp folder - Express.js API application and dockerfile for generating an image. This image will be used in Helm Chart
  • webappchart folder - Helm chart for deploying Express.js API application with mysql database on existing EKS cluster
  • .github/workflows folder
    • publish_ecr.yml - Publish images to Amazon ECR public repository. This workflow will be triggered on a successful merge into main branch
    • deploy_webapp.yml - Deploy infrastructure using terraform. This workflow will be triggerred on successful completion of publish_ecr workflow
  • main.tf - Infrastructure required for EKS cluster. Creation of VPC and configuring S3 remote backend
  • output.tf - Terraform output providing EKS cluster details and cluster endpoint
  • webapp-dev-eks.tf - Deploy EKS cluster with one AWS managed worker node
  • helm_release.tf - Deploy application helm chart from webappchart folder on existing EKS cluster
  • tf_apply.sh - Bash script to guide terraform apply command

Author

  • Pratik Thakkar

Instructions

Create Amazon S3 bucket for storing terraform state file as remote backend
Create Amazon DynamoDB table for state locking mechanism
Update terraform backend mechanism in main.tf with S3 bucket name and DynamoDB table name
terraform {
  backend "s3" {
    bucket         = "<S3 bucket name>"
    key            = "terraform.tfstate"
    region         = "<S3 bucket and DynamoDB region>"
    dynamodb_table = "<DynamoDB table name>"
    encrypt        = true
  }
}
Store an IAM user access key in GitHub Actions secrets named 'AWS_ACCESS_KEY_ID' and 'AWS_SECRET_ACCESS_KEY'
Create a branch and update the settings as per requirement. Create pull request and merge it. Github workflow will be triggered on successful merge with main branch

Demo

final.mp4

kubewebapp's People

Contributors

pratik-thakkar avatar

Watchers

James Cloos avatar  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.