Git Product home page Git Product logo

todo-app-infra's Introduction

TODO APP INFRA

Terraform Check Docker compose Validate K8s Deployment validate

Repo contain IAC to deploy todo-app in different environment

TASK LIST

  • Todo App deployment on local using docker-compose
  • Todo App deployment on local using swarm
  • Todo App deployment on local k8s using Helm
  • Todo App deployment on AWS on EC2
  • Todo App deployment on AWS using eks

Deploy

  1. Deployment using docker-compose

    • Install

       $ docker-compose --env-file=env/<env>/Docker.env up -d 
      
       # Override default docker-compose configuration
       $ docker-compose --env-file=env/<env>/Docker.env -f docker-compose.yaml -f env/<env>/docker-compose-override.yml up -d
    • Access

      http://localhost:8081 # get access_token

      http://localhost:8080/webjars/swagger-ui/index.html # use access_token to access the API(s)

    • Uninstall

      $ docker-compose down

    Configuration

    The following table lists the configurable parameters of the TodoApp swarm cluster and their default values.

    Parameter Description Default
    TODO_IMAGE Image tag for Todo-App ``
    EDGE_SERVICE_IMAGE Image tag for Edge Service ``
    CONFIG_SERVER_IMAGE Image tag for Config Server ``
    MONGO_DATA_SRC_PATH Host path for persistence mongo data ``
  2. On swarm cluster using docker stack Swarm

  3. On k8s using minikube K8s

  4. On EC2 using packer EC2

  5. On EKS EKS

todo-app-infra's People

Contributors

ayashbaral avatar ayashkantbaral avatar devraghv avatar raghav2211 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

todo-app-infra's Issues

Use one Dockerfile instead of two for maven & gradle

Is your feature request related to a problem? Please describe.
Currently two Dockerfile for separate maven & gradle image construction

Describe the solution you'd like
One Dockerfile with args to remove multiple Dockerfile

Run TodoApp run as system service rather than plain java command directly from user data

Is your feature request related to a problem? Please describe.
Currently todo app running through direct command https://github.com/Raghav2211/psi-lab/blob/e3b0c2da2b5010f1580cfc8237ebbedb934a6e2a/todo-app/aws/3-tier-app/lab/services/todo/app/templates/deployment.tpl#L9

Describe the solution you'd like
Run as system service so that if application goes down after ec2 creation debug would be easy & we can restart the application without put any release in any env (mostly in dev)

Add resources limitation in local deployment for todo-app

Is your feature request related to a problem? Please describe.
No resource limitation

Describe the solution you'd like
Resource limitation should be apply in every local deployment (swarm, k8s)

Resources

Additional Context
https://blog.nebrass.fr/playing-with-the-jvm-inside-docker-containers/

Configure aws deployment with eks

Is your feature request related to a problem? Please describe.
N/A

Describe the solution you'd like
Configure aws deployment of todo app with mysql on eks using terraform

Add best practices for secrets for local deployment

Is your feature request related to a problem? Please describe.
Currently all secrets are static

Describe the solution you'd like
Add best practice to pass secrets tp app/database/github

Describe alternatives you've considered
Can add vault

Deploy Todo App on local swarm cluster

Is your feature request related to a problem? Please describe.
N/A

Describe the solution you'd like
After #43 Todo app should be deploy on local swarm cluster

Describe alternatives you've considered
N/A

Additional context
N/A

Configure docker compose build in github action

Is your feature request related to a problem? Please describe.
Currently git build action check maven & gradle build is successful or not

Describe the solution you'd like
Need to configure action with docker compose build & verify

Use Case for Microservice Stack

Is your feature request related to a problem? Please describe.
Use Case for Microservice Stack.
Describe the solution you'd like
High level use case diagram where microservice stack could be implemented.

Describe alternatives you've considered
NA

Additional context
NA

OSX/Win support in CI build for todo-app

Is your feature request related to a problem? Please describe.
Only linux is supported for CI build

Describe the solution you'd like
OSX/Win should also be support

Cleanup README

Description
Need to cleanup README

Expected behavior
All steps & information for k8s, docker-compose, docker-swarm deployment should be included in README

Configurable docker compose

Description
Mysql username/password/database & BasicAuth username/password are hardcoded in docker-compose.yaml

Reproduce
Mysql username/password/database & BasicAuth username/password are hardcoded in docker-compose.yaml

Expected behavior
Mysql username/password/database & BasicAuth username/password should be configurable

Spring retry connection until datasource is available

Description
Docker deployment fail if mysql not available before Todo App

Reproduce

  1. mvn clean package -DskipTests
  2. docker build --tag psi-todo:1.0.0 .
  3. docker-compose --env-file=env/local/Docker.env up -d

Expected behavior
Application to be able to handle this case on its own, and not immediately exit when it cannot reach the database address

Replace klab from psi in whole repo

Description
After change project name from kubernetes-lab to psi-lab , need to change all packages & deployment naming convention

Reproduce
N/A

Expected behavior
Replace all occurrence of klab from psi

Update MySQL Dialect as per the version

Description
Update MySQL Dialect as per the version

Reproduce
Yes, With out update dialect application will not be up and running

Expected behavior
Application should be up without any issue

Add Validator for Rest API endpoints and Update swagger accordingly

Is your feature request related to a problem? Please describe.
Add Validator for Rest API endpoints and Update swagger accordingly

Describe the solution you'd like
Add JSR validator for all the endpoints

  • Validate Request Payload
  • Validate Request Parameter
  • Validate Path Variable
  • Update Swagger for respective endpoints

Junit for all layers

Is your feature request related to a problem? Please describe.
Junit for all layers

Describe the solution you'd like
Junit for all layers

  • Controller
  • Service

Add script to boot local minikube cluster

Is your feature request related to a problem? Please describe.
Add script to boot minikube cluster to remove manual steps

Describe the solution you'd like
Add script to boot minikube & install all dependencies

Todo Create API should not include 'Id' in request payload

Description

Todo Create API should not include 'Id' in request payload.

Reproduce

  1. Run Todo App
  2. From Post man if you run Create API and you would see the 'Id' in request payload is different than 'Id' in response payload

Expected behavior
'Id' should not be there in Create API request payload
Additional context
NA

Spring basic auth should be configurable

Is your feature request related to a problem? Please describe.
Currently todo-app has no disable functionality over spring basic auth

Describe the solution you'd like
Spring security basic-auth should be configurable

Update Swagger API doc for Todo Rest endpoints to include authorization error

Description
Update Swagger API doc for Todo Rest endpoints to include authorization error.

Reproduce
Run Todo App and go to Swagger UI you won't find API doc with authorization error response code and message

Expected behavior
Run Todo App and go to Swagger UI you should find API doc with authorization error response code and message

Use helm chart for local todo app

Is your feature request related to a problem? Please describe.
Use helm manager instead of kubectl command to provide vase variety of features like easy sharing, rollbacks, easy releases , easy updates etc.

Describe the solution you'd like
Use helm https://helm.sh/

Update k8s/README.md

Description
Cover all properties & steps for deployment on local

Reproduce

  1. No config properties mention in README
  2. Helm upgrade/uninstall/lint/debug/test commands are missing from doc

Expected behavior

  1. Provide short summary for all config properties
  2. Support every helm command

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.