chenfengjun / alibabacloud-microservice-demo

An Alibaba Cloud native microservice demo powered by Apache Dubbo and Spring Cloud Alibaba

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introcution

This is a demo project to showcase running microservices on Alibaba Cloud.

This demo is powered by the following projects and products:

  • Apache Dubbo for Remote Procedure Call
  • Spring Cloud Alibaba for Service to Service Call
  • Nacos for Service Discovery and Configuration management
  • Alibaba Cloud EDAS for deployment and hosting
  • Alibaba Cloud ARMS for monitoring
  • Alibaba Cloud SAE for deployment and hosting without being aware of the underlying infrastrcuture.

Live Demo

You can visit http://47.93.130.78:8080 for an live demo, which is hosted on Alibaba Cloud SAE.

Architecture

This project contains the following applications (more applications are ong the way):

  • frontend: A Java application with SpringMVC and thymeleaf as template engine.
  • cartservices: A Java application that provides basic operations to add products to shopping carts, which is powered by Apache Dubbo.
  • productservice: A Java application that provies basic operations to list all the products and query product by ID, which is powered by Spring Cloud Alibaba.

Build

Build docker image

You need to go to the src directory, for each sub module, there is a build.sh file, just run it to build the docker image for each module.

./build.sh

Deploy

Deploy with docker-compose

This project can be deployed to docker with the following command

docker-compose -f docker-compose.yaml up

If you want to undeploy, use the following command

docker-compose -f docker-compose.yaml down

Deploy to Kubernetes cluster

This project can be deployed to Kubernetes cluster with the following command:

cd kubernetes-manifests/
for i in *.yaml; do kubectl apply -f $i; done

If you want to delete the deployment, please use the following command:

for i in *.yaml; do kubectl delete -f $i; done

Deploy with helm

This project can be deployed to Kubernetes cluster with helm chart:

helm install ./helm-chart  --name  microservice-demo

If you want to delete the deployment with helm, use the following command:

helm delete microservice-demo

Credit

This project is originiated from GoogleCloudPlatform/microservice-demo

About

An Alibaba Cloud native microservice demo powered by Apache Dubbo and Spring Cloud Alibaba

License:Apache License 2.0


Languages

Language:Java 56.5%Language:HTML 29.2%Language:JavaScript 11.5%Language:Dockerfile 1.3%Language:CSS 1.1%Language:Shell 0.4%