A blog microservices written in Golang, which can be deployed in an Istio-enabled kubernetes cluster.
A blog microservices written in Golang, which can be deployed in an Istio-enabled kubernetes cluster.
A blog microservices written in Golang, which can be deployed in an Istio-enabled kubernetes cluster. If you’re using this demo, please ★Star this repository to show your interest!
This demo refers to the following project layout:
| Command | Description |
|---|---|
make init |
go install protoc-gen-*, wire, migrate and mockgen |
make protoc |
generate *pb.go |
make wire |
generate wire_gen.go |
make mock |
generate mock file |
make test |
go test |
make migrate-up |
migrate up databases |
make migrate-down |
migrate down databases |
make migrate-refresh |
migrate down and up databases |
make blog-server |
start blog server in local |
make user-server |
start user server in local |
make post-server |
start post server in local |
make comment-server |
start comment server in local |
make auth-server |
start auth server in local |
make dtm-server |
start dtm server in local,please see the dtm docs |
make docker-build |
build docker images |
make kube-deploy |
deploy blog, user, post, comment, auth and dtm server in kubernetes cluster |
make kube-delete |
delete all servers in kubernetes cluster |
make kube-redeploy |
redeploy all servers in kubernetes cluster (⚠ not including database servers️) |
This is a list of development environment in local for macOS:
Install the Docker Desktop,and enable Kubernetes cluster, See the docker docs
# install Go
brew install go
# install MySQL without a root password
brew install mysql
# install Protobuf
brew install protobuf
# install Buf
brew install bufbuild/buf/buf
# install istioctl
brew install istioctl
# ensure you change the context so that kubectl is pointing to docker-desktop
kubectl config use-context docker-desktop
# install and enable istio
istioctl install -y
kubectl label namespace default istio-injection=enabled# build docker images
make docker-build
# deploy all services
make kube-deployGet All Pod Resources:
kubectl get pods -AReturns:
…Get All Service Resources:
kubectl get services -AReturns:
…Install the BloomRPC, select the api/protobuf/blog/v1/blog.proto file and start making
requests! No extra steps or configuration needed.
Sign Up:
Create a post:
No open issues yet, or sync has not completed.