Spring MSA api gateway & service discovery with consul & Jaeger & Cassandra

Overview

Spring-Cloud-MSA

준비

  • Cassandra 서버를 준비한다

  • table.sql 파일로 keyspace와 테이블을 만들어 둔다

  • Consul 1.11.1버전 기준

  • https://www.consul.io/downloads 에서 1.11.1 버전 운영체제 맞게 다운

  • consul 압축 해제 후 Server로 실행 한다

./consul agent -server -bootstrap -ui -client=0.0.0.0 -data-dir ./data --bind=127.0.0.1 &
  • http://localhost:8500 에서 확인

  • docker compose 설치 후 이 jaeger_all_in_one또는 jaeger_msa의 docker-compose.yml실행

  • docker로 Jaeger Tracing실행한다

docker-compose up

실행

전체 빌드

  • mvn clean install

Gateway 실행

  • mvn -pl gateway spring-boot:run

Config Server

  • mvn -pl config-server spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=dev1"

Service 실행

  • mvn -pl appkey-service spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=dev1"

  • mvn -pl appkey-service spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=dev2"

  • mvn -pl api-service spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=dev1"

  • mvn -pl api-service spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=dev2"

docker-compose로 모두 실행

config 바꾸기

  • appkey-service,api-service 프로젝트의
  • application.yml의 내용을 application-docker1.yml내용으로 바꾼다

전체 빌드

  • mvn -pl gateway clean package spring-boot:repackage
  • mvn -pl gateway docker:build
  • mvn -pl appkey-service clean package spring-boot:repackage
  • mvn -pl appkey-service docker:build
  • mvn -pl api-service clean package spring-boot:repackage
  • mvn -pl api-service docker:build

docker-compose

  • docker-compose up
You might also like...
Template for a modern spring web service.

Spring Service Scaffold A scaffold for a web service operating with a Spring Framework backend, reactjs as frontend and a continuous testing and build

Microservice-arch - Basic micro service architecture using spring boot

Readme 4 applications are created: discovery-service: every application register

This repository contains RabbitMQ Protobuf starters with its usage samples for spring-rabbit and spring-cloud-starter-stream-rabbit modules

This repository contains RabbitMQ Protobuf starters with its usage samples for spring-rabbit and spring-cloud-starter-stream-rabbit modules

Spring-with-maven - Spring Boot App with Postgresql and maven

Spring Boot Api Aplikasi ini dibuat menggunakan bahasa kotlin dan untuk database

Reactive setup with Spring WebFlux , Kotlin, Postgres and Spring Data R2DBC

Reactive Spring with Kotlin and Pg Spring WebFlux with Netty instead of Spring Web with Tomcat Mono and Flux in all layers (controller, service, repo)

Android login spring - Android login against spring backend

Android Jetpack Compose login implementation with JWT tokens against our own bac

API for a library using Kotlin, Spring-boot and covered by test

Library API This API is to create Books and be able to borrow from them I'm using: Spring Boot version 2.5.6 Kotlin 1.5.31 Java 11 I'm implementing us

API Rest With Kotlin And Spring Boot

##API REST WITH KOTLIN AND SPRING BOOT GET Url: http://localhost:8080/customers Response (Status Code: 200 Ok) { "_embedded": { "customer

API que converte uma planilha do excel para o banco de dados, utilizando Kotlin + Spring.

API Excel2DB 📈 Uma API que tem como objetivo facilitar a carga de dados nos formatos .xlsx ou .xls para um banco de dados. Nessa situação, como o foc

Owner
INSUNG CHOI
Backend Developer
INSUNG CHOI
intera.kt is a Kotlin library for interacting with the Discord Interactions API through a gateway service or a REST API.

?? Overview ⚠️ WARNING: intera.kt is a work in progress. It is not yet ready for use. You may encounter bugs and other issues, but please report if yo

Pedro Henrique 1 Nov 30, 2021
intera.kt is a Kotlin library for interacting with the Discord Interactions API through a gateway service or a REST API.

?? Overview ⚠️ WARNING: intera.kt is a work in progress. It is not yet ready for use. You may encounter bugs and other issues, but please report if yo

Pedro Henrique 1 Nov 30, 2021
Spring cloud gateway with kotlin

spring-cloud-gateway gradle 의존성 추가 // https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-netflix-eureka-client

null 1 Dec 7, 2021
Spring-graphql-getting-started - Spring for GraphQL provides support for Spring applications built on GraphQL Java

Getting Started with GraphQL and Spring Boot Spring for GraphQL provides support

Shinya 0 Feb 2, 2022
Cargo service: REST API, Spring Boot, Kotlin, JDBC, PostgreSQL

cargo-jdbc Cargo service, training project with Spring Boot, JDBC and Kotlin. To

Valeriy Emelyanov 1 Dec 7, 2022
The behavior of Couchbase Lite C when attempting to connect to a Sync Gateway

This demo demonstrates the behavior of Couchbase Lite C when attempting to connect to a Sync Gateway, while the process has various numbers of file de

Gabriel Terwesten 0 Nov 29, 2021
Spring-kotlin - Learning API Rest with Kotlin, Spring and PostgreSQL

Kotlin, Spring, PostgreSQL and Liquibase Database Migrations Learning Kotlin for

Andre L S Ferreira 2 Feb 14, 2022
Team management service is a production ready and fully tested service that can be used as a template for a microservices development.

team-mgmt-service Description Team management service is a production ready and fully tested service that can be used as a template for a microservice

Albert Llousas Ortiz 18 Oct 10, 2022
Accessibility-Service - Filter url from browser by using accessibility service

Accessibility Service example Filter url from browser by using accessibility ser

AmirMohammad Yazdanmanesh 8 Nov 29, 2022
Demo Spting REST Service on Kotlin. Works with PostgreSQL via Spring Data. Data initialization provided by liquibase

Spring Boot REST API with Kotlin Spring Boot REST API service. Spring Data with PostgreSQL. Data initialization with Liquibase. Swagger UI Reference D

null 0 Jun 10, 2022