Yenchu / Microservices Demo
Using Spring Cloud to develop microservices and deploy to Kubernetes
Stars: ✭ 21
Programming Languages
java
68154 projects - #9 most used programming language
Projects that are alternatives of or similar to Microservices Demo
Apollo
Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
Stars: ✭ 26,052 (+123957.14%)
Mutual labels: spring-boot, spring-cloud
Spring Cloud Examples
Examples of microservice instrastructures
Stars: ✭ 11 (-47.62%)
Mutual labels: spring-boot, spring-cloud
Spring Boot Examples
about learning Spring Boot via examples. Spring Boot 教程、技术栈示例代码,快速简单上手教程。
Stars: ✭ 26,812 (+127576.19%)
Mutual labels: spring-boot, spring-cloud
Chaos Monkey Spring Boot
Chaos Monkey for Spring Boot
Stars: ✭ 646 (+2976.19%)
Mutual labels: spring-boot, spring-cloud
Spring Cloud Examples
Spring Cloud 学习案例,服务发现、服务治理、链路追踪、服务监控等
Stars: ✭ 5,829 (+27657.14%)
Mutual labels: spring-boot, spring-cloud
Weixin Shop Spring Cloud
微信商城SpringCloud版本 - 前端vue-shop
Stars: ✭ 717 (+3314.29%)
Mutual labels: spring-boot, spring-cloud
Taroco
整合Nacos、Spring Cloud Alibaba,提供了一系列starter组件, 同时提供服务治理、服务监控、OAuth2权限认证,支持服务降级/熔断、服务权重,前端采用vue+elementUI+webpack,可以很好的解决转向Spring Cloud的一系列问题。
Stars: ✭ 545 (+2495.24%)
Mutual labels: spring-boot, spring-cloud
Springcloud Learning
Spring Cloud基础教程,持续连载更新中
Stars: ✭ 6,839 (+32466.67%)
Mutual labels: spring-boot, spring-cloud
Sso
cas单点登录系统,其中包括cas认证服务,配置中心,监控平台,服务管理的高可用项目
Stars: ✭ 797 (+3695.24%)
Mutual labels: spring-boot, spring-cloud
Brpc Java
Java implementation for Baidu RPC, multi-protocol & high performance RPC.
Stars: ✭ 647 (+2980.95%)
Mutual labels: spring-boot, spring-cloud
Spring Cloud Book
《使用Spring Cloud与Docker实战微服务》开源书。讨论QQ群:731548893。配套代码:https://github.com/eacdy/spring-cloud-study
Stars: ✭ 886 (+4119.05%)
Mutual labels: spring-boot, spring-cloud
Spring Cloud Contract
Support for Consumer Driven Contracts in Spring
Stars: ✭ 569 (+2609.52%)
Mutual labels: spring-boot, spring-cloud
Simplemall
基于SpringCloud的微服务架构实战案例项目,以一个简单的购物流程为示例,融合spring cloud 相关组件,如spring-cloud-netflix、swagger等
Stars: ✭ 687 (+3171.43%)
Mutual labels: spring-boot, spring-cloud
Spring Cloud Platform
🔥🔥🔥国内首个Spring Cloud微服务化RBAC的管理平台,核心采用Spring Boot 2.4、Spring Cloud 2020.0.0 & Alibaba,前端采用d2-admin中台框架。 🔝 🔝 记得上边点个star 关注更新
Stars: ✭ 5,514 (+26157.14%)
Mutual labels: spring-boot, spring-cloud
Spring Cloud Consul
Spring Cloud Consul
Stars: ✭ 703 (+3247.62%)
Mutual labels: spring-boot, spring-cloud
Spring Cloud Study
SpringBootLearning,SpringCloudStudy,学习SpringBoot2/SpringCloud2的项目,包含Eureka/Zuul/JPA/Mybatis Plus/Feign/WebSocket/JMS/POI-TL/Redis Cache/UDP/SecurityJWT/elasticSearch/Drools
Stars: ✭ 544 (+2490.48%)
Mutual labels: spring-boot, spring-cloud
Spring Cloud Release
Spring Cloud Release Train - dependency management across a wide range of Spring Cloud projects.
Stars: ✭ 543 (+2485.71%)
Mutual labels: spring-boot, spring-cloud
Mica
Spring Cloud 微服务开发核心工具集。工具类、验证码、http、redis、ip2region、xss 等,开箱即用。 🔝 🔝 记得右上角点个star 关注更新!
Stars: ✭ 749 (+3466.67%)
Mutual labels: spring-boot, spring-cloud
Localstack Spring Boot
Spring Boot AutoConfiguration for LocalStack
Stars: ✭ 22 (+4.76%)
Mutual labels: spring-boot, spring-cloud
Microservices Demo
Using Spring Cloud to develop microservices application and deploy to Kubernetes.
- Externalized configuration: Spring Cloud Config
- Service registry and discovery: Eureka
- Client side load balancing: Ribbon, Feign
- API gateway: Zuul, Spring Cloud Gateway
- Circuit breaker: Hystrix, Turbine
- Distributed tracing: Sleuth, Zipkin
Deployment
-
build-images.sh
is used to build docker images. It tags the images with192.168.99.100:5000
prefix for uploading them to a local registry server on192.168.99.100
. Update to the correct address if your registry server's address is not192.168.99.100:5000
. If you don't deploy to Kubernetes, you can remove those prefix. -
push-images.sh
is used to push docker images to the registry server. -
deploy-docker.sh
is used to deploy the demo app to docker usingdocker-compose.yml
. -
undeploy-docker.sh
is used to undeploy the demo app in docker. -
deploy-kubernetes.sh
is used to deploy the demo app to kubernetes. To deploy to Kubernetes, this demo usesMinikube
. -
undeploy-kubernetes.sh
is used to undeploy the demo app in kubernetes. - This demo use Spring Cloud Gateway(cloud-gateway) as its api gateway, if you wants to use Zuul, using api-gateway instead.
There are three ways to deploy this demo application.
Local Deployment
-
You need to provide RabbitMQ and Zipkin services.
-
RabbitMQ:
Please see https://www.rabbitmq.com/download.html
If using docker, you can use the following command:
docker run -d -p 5672:5672 -p 15672:15672 -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=amqp --name rabbitmq rabbitmq:management
-
Zipkin:
Please see https://github.com/openzipkin/zipkin
# Download Zipkin server curl -sSL https://zipkin.io/quickstart.sh | bash -s # Start Zipkin server RABBIT_ADDRESSES=localhost RABBIT_USER=admin RABBIT_PASSWORD=amqp java -jar zipkin.jar
If using docker, you can use the following command:
docker run -d -p 9411:9411 -e RABBIT_ADDRESSES=rabbitmq -e RABBIT_USER=admin -e RABBIT_PASSWORD=amqp --link rabbitmq:rabbitmq --name zipkin openzipkin/zipkin
-
-
Edit
config-server/src/main/resources/application.properties
:- Make sure
RABBITMQ_SERVICE_HOST
,RABBITMQ_SERVICE_PORT
,RABBITMQ_SERVICE_USERNAME
andRABBITMQ_SERVICE_PASSWORD
match your RabbitMQ configuration. - Set
APP_CONFIG_DIR
andAPP_LOGGINH_DIR
to your correct file path.
- Make sure
-
Use
java -jar
to start each service, config-server should be started first, service-registry next, then other services. -
Access services with its URL, eg:
cloud-gateway: http://localhost:8080/
auth-service: http://localhost:9000/
account-service: http://localhost:9010/
service-registry: http://localhost:8761/
config-server: http://localhost:8888/
turbine-server: http://localhost:8989/
monitor-dashboard: http://localhost:7979/
zipkin: http://localhost:9411/
Docker Deployment
- Download rabbitmq:management image.
Tag the image with
192.168.99.100:5000/rabbitmq:management
if you use192.168.99.100:5000
prefix inbuild-images.sh
. - Download openzipkin/zipkin image.
Tag the image with
192.168.99.100:5000/zipkin
if you use192.168.99.100:5000
prefix inbuild-images.sh
. - Edit
microservices-demo/deploy-docker.sh
, setAPP_CONFIG_DIR
andAPP_LOGGINH_DIR
to your correct file path. - Run the script
microservices-demo/build-images.sh
to build docker images. - Run the script
microservices-demo/deploy-docker.sh
to start containers. - Run the script
microservices-demo/undeploy-docker.sh
if you want to stop and remove the containers. - Access a service with its URL (same as Local Deployment)
Kubernetes Deployment (v1.10.0)
- Download rabbitmq:management image.
Tag the image with
192.168.99.100:5000/rabbitmq:management
. - Download openzipkin/zipkin image.
Tag the image with
192.168.99.100:5000/zipkin
. - Edit
microservices-demo/kubernetes/config-pv.yaml
, setspec.hostPath.path
to your correct file path. Editmicroservices-demo/kubernetes/log-pv.yaml
, setspec.hostPath.path
to your correct file path. - Run the script
microservices-demo/build-images.sh
to build docker images. - Run the script
microservices-demo/push-images.sh
to upload docker images to registry server. - Run the script
microservices-demo/deploy-kubernetes.sh
to deploy to Kubernetes. - Run the script
microservices-demo/undeploy-kubernetes.sh
if you want to stop and remove the containers. - Access services using command
minikube service SERVICE_NAME
eg:
minikube service cloud-gateway
minikube service auth-service
minikube service account-service
minikube service service-registry
minikube service config-server
minikube service monitor-dashboard
minikube service zipkin
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].