微服务框架ServiceComb一 Service-Center集群安装部署
环境 :
操作系统 [ CentOS release 6.4 (Final) ]
服务器地址:[master:172.17.34.10 node2:172.17.34.09 node3:172.17.34.08]
GOLANG1.8安装
1、下载Go1.8.1 wget https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz tar zxvf go1.8.1.linux-amd64.tar.gz mv go /usr/fubitechal/ 2、部署Go1.8.1 vi /etc/profile 在最后进入 export GOROOT=/usr/local/golang/go export GOPATH=/app/gopath export PATH=$PATH:$GOROOT/bin save,并执行command使其见效。 source /etc/profile 3、检查 go version
ETCD 集群搭建
etcd介绍,以及适用场景,参考:http://www.infoq.com/cn/artic...
etcd的项目:https://github.com/coreos/etc...
下载ETCD 并解压.
因为我已经启动过了 所有会多一个infra0.etcd 文件夹,里面保存了我的节点信息.
手动启动:
nohup etcd --name infra0 --initial-advertise-peer-urls http://172.17.34.10:2380 --listen-peer-urls http://172.17.34.10:2380 --listen-client-urls http://172.17.34.10:2379,http://127.0.0.1:2379 --advertise-client-urls http://172.17.34.10:2379 --initial-cluster-token etcd-cluster-1 --initial-cluster infra0=http://172.17.34.10:2380,infra1=http://172.17.34.09:2380,infra2=http://172.17.34.08:2380 --initial-cluster-state new --auto-tls --peer-auto-tls & nohup etcd --name infra1 --initial-advertise-peer-urls http://172.17.34.09:2380 --listen-peer-urls http://172.17.34.09:2380 --listen-client-urls http://172.17.34.09:2379,http://127.0.0.1:2379 --advertise-client-urls http://172.17.34.09:2379 --initial-cluster-token etcd-cluster-1 --initial-cluster infra0=http://172.17.34.10:2380,infra1=http://172.17.34.09:2380,infra2=http://172.17.34.08:2380 --initial-cluster-state new --auto-tls --peer-auto-tls & nohup etcd --name infra2 --initial-advertise-peer-urls http://172.17.34.08:2380 --listen-peer-urls http://172.17.34.08:2380 --listen-client-urls http://172.17.34.08:2379,http://127.0.0.1:2379 --advertise-client-urls http://172.17.34.08:2379 --initial-cluster-token etcd-cluster-1 --initial-cluster infra0=http://172.17.34.10:2380,infra1=http://172.17.34.09:2380,infra2=http://172.17.34.08:2380 --initial-cluster-state new --auto-tls --peer-auto-tls &
测试是否正常:
查看集群情况,可以看到 172.17.34.10这台机器已经是leader了
Service-Center 注册中心集群部署
需要注意的点是配置文件
registry_plugin 这个配置:
embeded_etcd : 是指运行service-center内置的etcd,而我们是自己搭建的etcd集群,所以这部使用 etcd,对应的下面manager_cluster配置要注意不能带http:// 否则会报错
检查service-center是否启动成功
相关推荐
lenchio 2020-06-04
sushuanglei 2020-11-12
xingyuzhe 2020-09-21
newcome 2020-09-09
XiaoMuFireAnt 2020-09-02
gracecxj 2020-08-25
zyshappy 2020-08-16
我爱熊猫 2020-08-07
luvzhan 2020-07-28
HelloC先生 2020-07-27
wanjichun 2020-07-26
clmngu 2020-07-26
shenxiuwen 2020-07-16
枫叶上的雨露 2020-07-04
yang0cs 2020-06-28
bruce 2020-06-28
middleware0 2020-06-27
luotuo 2020-06-26
shenzhenzsw 2020-06-26