GithubHelp home page GithubHelp logo

bahadauriaabhay / counterapp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from munipravy/counterapp

0.0 0.0 0.0 38 KB

Counter app - Deployed on Kubernetes cluster and designed blue and green deployment

Shell 79.77% Java 18.53% Dockerfile 1.70%

counterapp's Introduction

Counterapp

  1. write an http api with endpoints defined as below

    a) /counter:

     GET will return +1 of existing count
    
     POST will return +2 of existing count
    
     DELETE will return -1 of existing count
    

    b) /info:

      GET will return
    
         - git commit hash
    
         - branch name of the source code
    
         - environment name of the app
    
         - hostname
    
    • environment name to be determined based config or system variable during run time
  2. Dockerize the app with minimal foot print

    preferably using multi stage building

  3. Create a script which will allow

    a) install dependencies

    b) create Docker image - Docker tags either can be given as an argument or determine based on git hash

  4. Create a README.MD file to describe how to run the app in local environment.

  5. Design and document CI/CD work flow and code promotion

    ex: - dev/qa/stress test/staging/prod etc.

  6. Create helm chart for deploying the application.

helm install

  1. Modify the script on task 3) to use the helm chart to deploy the application to target environment.

  2. Create helm chart and modify the script 3) to do blue green switch.

  3. Add function in script 3) to increase or decrease the pods for the deployment on target enviroment.

  4. Implement sticky session for the api so requests will always go to the same pod during blue green traffic shift

  5. Update the read me files to explain how to use the script

Instructions to run

1.I have created two deployment scripts under templates directory blue.yml and green.yml

2.I have used selectors and labels for switching blue/green deployments

3.# sh run-app.sh to use helm tool to configure the application

4.# sh run-kube.sh to use kubectl commnds to perform expected tasks

To perform blue/green deployment

a.Please switch to helm/counterapp/template/service.yml. And change version number to 1.1

b.For this deployment I have used Kubernetes cluster with 3vcpus and 11 GB ram.

c.Used Ingress as Gate way to route traffic instead Haproxy

counterapp's People

Contributors

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