GithubHelp home page GithubHelp logo

pramod6019 / reactive-microservices Goto Github PK

View Code? Open in Web Editor NEW

This project forked from achalise/reactive-microservices

0.0 1.0 0.0 304 KB

Angular front end with event driven microservices - SpringBoot, Kafka, Kubernetes

JavaScript 1.44% Java 29.39% TypeScript 60.89% CSS 1.46% HTML 6.82%

reactive-microservices's Introduction

online banking example

Example project showcasing:

  • SpringBoot microservices with reactive streams
  • Kafka for messaging between microservices
  • OAuth2 security
  • Angular 5 front end
  • All deployed in local kubernetes cluster (minikube)
  • Finally Instructions on how to deploy on AWS

To use local docker daemon within minikube, eval $(minikube docker-env)

To run kafka locally and test producer and consumer on console:

  • Run bin/zookeeper-server-start.sh config/zookeeper.properties bin/kafka-server-start.sh config/server.properties bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic baeldung --from-beginning

The application comprises of following microservices:

  1. CardsService
  2. CashService
  3. MortgageService
  4. CustomerService

Cash Service

To build docker image of cashservice docker build -t achalise/cash-service:0.0.1 .

for gateway service using the dockerfile-maven-plugin, ./mvnw dockerfile:build

Create a spring boot starter project with start.spring.io selecting reactive web and reactive MongoDB options.

Order to run:

  1. zookeeper-services.yaml (kubectl create -f kafka/zookeeper-services.yaml)
  2. zookeeper-cluster.yaml
  3. kafka-service.yaml
  4. kafka-cluster.yaml
  5. mongo-cash.yaml
  6. cash-service.yaml
  7. gateway-service.yaml

uninstall all:

kubectl delete -f gateway/k8s/gateway-service.yaml

kubectl delete -f cash-service/k8s/cash-service.yaml kubectl delete -f cash-service/k8s/mongo-cash.yaml

kubectl delete -f card-service/k8s/card-service.yaml kubectl delete -f card-service/k8s/mongo-card.yaml

kubectl delete -f kafka/kafka-cluster.yaml kubectl delete -f kafka/kafka-service.yaml

kubectl delete -f kafka/zookeeper-cluster.yaml kubectl delete -f kafka/zookeeper-services.yaml

install all:

eval $(minikube docker-env) kubectl create -f kafka/namespace-kafka.yaml kubectl config set-context kafka --namespace=kafka-cluster --user=cluster-admin kubectl config use-context kafka

kubectl create -f kafka/zookeeper-services.yaml kubectl create -f kafka/zookeeper-cluster.yaml

kubectl create -f kafka/kafka-service.yaml kubectl create -f kafka/kafka-cluster.yaml

kubectl create -f cash-service/k8s/mongo-cash.yaml kubectl create -f cash-service/k8s/cash-service.yaml

kubectl create -f card-service/k8s/mongo-card.yaml kubectl create -f card-service/k8s/card-service.yaml

kubectl create -f gateway/k8s/gateway-service.yaml

***** during minikube upgrade if there are issues, try

  • removing .minikube, .kube
  • upgrading virtual box - if not current
  • upgrading docker - if not current

For the front end

  • Install Angular cli globally npm install -g @angular/cli
  • When there are multiple modules in the project, and using ng generate, specify module like this: ng generate component payment/from-account --module=app.module

reactive-microservices's People

Contributors

achalise avatar

Watchers

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