GithubHelp home page GithubHelp logo

huntersudo / blog-microservices Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jxlwqq/blog-microservices

0.0 2.0 0.0 9.25 MB

blog microservices deployed in an Istio-enabled kubernetes cluster.

License: MIT License

Makefile 5.84% Dockerfile 4.72% Go 89.44%

blog-microservices's Introduction

blog-microservices

test

blog microservices deployed in an Istio-enabled kubernetes cluster.

架构

architecture

目录结构

主要遵循 Standard Go Project Layout 推荐的目录分层。

使用的依赖:

Makefile 简介

命令 说明
make init 安装各类 protoc-gen-* 、 wire 以及 migrate
make protoc 基于 *.proto 文件,生成各类 *_pb.go
make wire 基于 wire.go 文件,生成 wire_gen.go
make test 测试
make migrate-up 迁移数据库
make migrate-down 回滚数据库
make blog-server 启动 blog 服务(本地开发环境)
make user-server 启动 user 服务(本地开发环境)
make post-server 启动 post 服务(本地开发环境)
make comment-server 启动 comment 服务(本地开发环境)
make auth-server 启动 auth 服务(本地开发环境)
make dtm-server DTM 为外部依赖,启动本地服务,请浏览 官方文档
make docker-build 构建 Docker 镜像
make kube-deploy 在集群中部署 blog、user、post、comment、auth 以及 dtm 服务
make kube-delete 在集群中删除上述服务
make kube-redeploy 在集群中重新部署服务(数据库服务不删除)

本地环境搭建

  • docker-desktop >= 4.3.2
  • kubernetes >= 1.22.4
  • go >= 1.17
  • istioctl >= 1.12.1
  • protobuf >= 3.19.1

下载安装 Docker Desktop ,并启动内置的 Kubernetes 集群。

# 安装 Go
brew install go
# 安装 Protobuf
brew install protobuf
# 安装 Istio
brew install istioctl
kubectl config use-context docker-desktop
istioctl install -y
kubectl label namespace default istio-injection=enabled

访问服务

推荐使用 BloomRPC 或者 Insomnia

blog-microservices's People

Contributors

jxlwqq avatar wizardpro avatar

Watchers

 avatar  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.