Giter Site home page Giter Site logo

salmanspice / blue-green-deployment Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rogamboa/blue-green-deployment

0.0 0.0 0.0 29 KB

A project demonstrating a CI/CD pipeline using a Blue/Green deployment strategy using Jenkins, Docker and Kubernetes.

Shell 40.21% Python 20.31% Makefile 10.55% HTML 23.19% Dockerfile 5.75%

blue-green-deployment's Introduction

Blue Green Deployment

Project Summary

This project demonstrates a CI/CD pipeline using a Blue/Green deployment strategy using Jenkins, Docker and kubernetes/EKS (using eksctl).

The sample Flask web app used in this project is sourced from here.

Note: The pipeline relies on a kubernetes cluster pre-deployed outside of the pipeline. This implementation uses EKS and is deployed using eksctl.

Project Contents

  • flask-app - sample Flask web app files
  • infrastructure
    • deploy-eks.sh - script to deploy an EKS cluster using eksctl
    • cfn-template-sample/eks-cluster.yml - sample Cloudformation template of eks cluster stack
  • jenkins
    • Jenkinsfile - jenkins pipeline configuration file
    • scripts - contains scripts for pipeline

Pipeline Workflow

Workflow found in jenkins/Jenkinsfile

Stages

  • integration test
    • Performs lint tests on web app and Dockerfile in flask-app
      • uses scripts: install-dependencies.sh and lint.sh
  • build image and push to repo
    • Builds docker image according to Dockerfile and uploads image to ECR repository
  • run kubeconfig
    • Updates kubeconfig to allow for kubectl usage on eks cluster

Following stages only executes on commits made to blue branch

  • deploy blue container to eks cluster
    • Deploys container to eks cluster using kubectl
    • uses scripts/deploy-container.sh
  • update service to redirect traffic blue environment
    • Updates kubernetes service to point to blue containers
    • uses scripts/update-service.sh

Following stages only executes on commits made to green branch

  • deploy green container to eks cluster
    • Deploys container to eks cluster using kubectl
    • uses scripts/deploy-container.sh
  • update service to redirect traffic green environment
    • Updates kubernetes service to point to green containers
    • uses scripts/update-service.sh

Stage only executes when a commit is made to either the blue branch or green branch

  • perform smoke test
    • Performs curl test to confirm succesful deployment
    • uses scripts/smoke-test.sh

blue-green-deployment's People

Contributors

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