go_micro和容器以及K8S相关书签

https://micro.mu/docs/cn/index.html

gomicro文档

 

https://github.com/micro/go-micro

gomicro代码

 

https://www.zhihu.com/question/65502802

关于微服务架构,这个里面JobYuan的答复非常的好,有很多的方案推荐

 

https://www.zhihu.com/question/30461290
系统学习GO,推荐几本靠谱的书?

https://tour.go-zh.org/list
Go 指南

https://tour.go-zh.org/moretypes/17

gomicro文档
https://micro.mu/docs/cn/index.html
https://micro.mu/docs/toolkit.html#consul
https://github.com/micro/examples/tree/master/service

https://www.jianshu.com/p/dba4c7a6d608

 

windows安装

1.go get github.com/micro/protoc-gen-micro

2.wget https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protoc-3.7.1-win64.zip

3.go get -u github.com/golang/protobuf/protoc-gen-go

 

gprc安装

go get google.golang.org/grpc 报错

参考:https://www.jianshu.com/p/dba4c7a6d608

步骤:

git clone https://github.com/grpc/grpc-go.git $GOPATH/src/google.golang.org/grpc

    git clone https://github.com/golang/net.git $GOPATH/src/golang.org/x/net

    git clone https://github.com/golang/text.git $GOPATH/src/golang.org/x/text

    go get -u github.com/golang/protobuf/{proto,protoc-gen-go}

    git clone https://github.com/google/go-genproto.git $GOPATH/src/google.golang.org/genproto

    cd $GOPATH/src/

    go install google.golang.org/grpc

 

启动

consul(参考:https://micro.mu/docs/toolkit.html#consul) :

consul   agent  -dev

hashi-ui-windows--amd64(https://github.com/jippi/hashi-ui):

./hashi-ui-windos-amd64 --consul-enable

然后http://127.0.0.1:3000/

应用服务:

set MICRO_REGISTRY=consul

micro list services

go run main.go(https://github.com/micro/examples/tree/master/service

micro list services(这里需要另开窗口首先重新设置MICRO_REGISTRY环境变量)

 

这篇K8S的初学者视角的文章不错

https://blog.csdn.net/TM6zNf87MDG7Bo/article/details/79621510

 

容器工具,weave scope方便登录,查看拓扑

安装:

每个虚机(容器宿主)上面,

sudo curl -x proxyxa.zte.com.cn:80 -L git.io/scope -o /usr/local/bin/scope

sudo chmod a+x /usr/local/bin/scope

启动后,随便一个主机上连接http:ip:4040,就可以看到拓扑和一些操作。

sudo scope launch 192.168.122.171 192.168.122.177 192.168.122.130 192.168.122.216 192.168.122.49 192.168.122.62 192.168.122.86 192.168.122.151 192.168.122.134 192.168.122.101 192.168.122.119 192.168.122.127

posted @ 2019-04-21 17:01  友善的狗W  阅读(556)  评论(0编辑  收藏  举报