Giter VIP home page Giter VIP logo

ubaid4j / cloud-native-app-spring-boot Goto Github PK

View Code? Open in Web Editor NEW
30.0 4.0 14.0 18.48 MB

A Cloud Native App with Spring Coud Security with KeyCloak Auth Server, API Gateway Server, Naming Server, Config Server and Distributed Tracing and ELK Stack hosted in K8s

License: MIT License

Java 82.90% Dockerfile 0.65% Shell 3.22% HTML 0.83% CSS 0.20% JavaScript 12.21%
zipkin-sleuth rabbitmq eureka-server eureka-client spring-boot cloud-native feign-client micro-service elk-stack openfeign

cloud-native-app-spring-boot's Introduction

Abstract

  • This repo represents a basic currency conversion cloud native-app which convert currency from given country code to targeted country code.
  • I am using the following stack for this cloud native app.
    • Microservice Architecture with API-GATEWAY along with Discovery Server
    • Spring Security with OAuth2 and KeyCloak Server
    • ELK Stack
    • Distributed Tracing
  • Following are the Tools and technologies which I am using:
    • Java 17
    • Spring Boot 2.6.4
    • Spring Cloud 2021.0.1 (Security, Config Server, Service Discovery and Distributed Tracing)
    • KeyCloak Server (Authorization Server) 16.1.1
    • Zipkin Version 2.23.16 (Distribute Tracing)
    • Rabbit MQ Version 3.9.13-management(Message Broker)
    • ELK Stack Version 7.17.1

Requirements

  • Add the line 127.0.0.1 auth-server in the last of your hosts file.
    • For Linux/Unix based system, its location is at: /etc/hosts
    • For Windows, its location is at: c:\Windows\System32\Drivers\etc\hosts
  • Docker 20.xx.x or later

How to Run: Watch Video

  • git clone https://github.com/UbaidurRehman1/Cloud-Native-App-Spring-Boot
  • cd Cloud-Native-App-Spring-Boot/envcn
  • ./run-multi-stage.sh (it will run all tools which our services needs such as keycloak server, discovery server, databases, zipkin, rabbitmq and elk-stack)
  • cd ..
  • ./run-multi-stage.sh (it will up the microservices)
  • Access Web Client UI
  • Access Swagger Client UI

About

  • This App basically converts a currency from given country code to targeted country code by following the cloud native approach.
  • api-gateway provides a gateway for end clients (web browsers, mobiles) to interact the resource servers (micro-services)
  • An Actor (React Client, React Native Client) can interact with the micro-services through the api-gateway
  • Micro Service Architecture
  • In above diagram, We can see:
    • An End Client can access the resource servers through the api-gatewy
    • There are five resource servers:
      1. currency-conversion service abstract the functions of getting exchange rate from currency-exchange service and converting this exchange rate by the help of math service.
      2. currency-exchange service return the exchange rate between two currencies.
      3. math service convert the currency to another currency using the exchange rate.
      4. country service return all countries
      5. user service is related about user information
    • An api-gateway exposes its URLs to Clients
    • Keycloak Server (For OAuth2 Authentication and Authorization)
    • Discovery Server (For services discovery)
    • Distributed Tracing Stack, for request tracing in micro-service architecture
    • ELK Stack, for Centralized Logging
    • Config Server to get distributed app configurations (hosted in github/public-repo) for each micro-service

Kibana Dashboard (For Centralized Logging)

Micro-Services

Servers

Config Repo

Note

cloud-native-app-spring-boot's People

Contributors

dependabot[bot] avatar ubaid4j avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cloud-native-app-spring-boot's Issues

Test limit service for its dependencies

  1. remove dependency and see whether its works or not
  2. write documentation about it. About each dependency why it is necessary.
  3. write test cases (junit or mockito) or both.

update config server

  • update cloud version to 8
  • remove mvn stuff
  • change readme to md
  • change docker file to use dev profile
  • run in docker-compose dev

Refactor limits-service

  1. Add local, dev, prod env in limits-service
  2. Update pom.xml to upgrade, add profiles
  3. add lombok
  4. refactor code in the favor of lombok

readme.md

  • remove ./envcn/run.sh
  • add cd envcn & ./run.sh & cd ../

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.