Master Node
1、搭建master节点环境
git clone https://github.com/hyperledger/cello.git
cd cello
make setup-master
SERVER_PUBLIC_IP=自己的master_ip MODE=dev make start
2、构建user-dashboard
make build-user-dashboard-js
Worker Node
1、安装nfs客户端,并挂载master节点的nfs服务器共享目录
yum install -y nfs-utils
systemctl enable rpcbind.service
systemctl start rpcbind.service
mount -t nfs -o vers=4,loud masterIP:/ /opt/cello
ls /opt/cello
fabric-1.0 fabric-1.1 fabric-1.2
如果出现这三个目录说明成功挂载nfs服务器
2、修改docker配置文件
vim /lib/systemd/system/docker.service
把
ExecStart=/usr/bin/dockerd -H unix://
改为
ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 --default-ulimit=nofile=8192:16384 --default-ulimit=nproc=8192:16384
3、配置worker节点
git clone https://github.com/hyperledger/cello.git
cd cello
WORKDER_TYPE=docker MASTER_NODE=master_ip make setup-worker
遇到的问题:
1、ERROR: Service 'build-admin-js' failed to build: OCI runtime create failed: container_linux.go:344: starting container process caused "process_linux.go:293: copying bootstrap data to pipe caused \"write init-p: broken pipe\"": unknown
ERROR: Service 'build-admin-js' failed to build: OCI runtime create failed: container_linux.go:344: starting container process caused "process_linux.go:293: copying bootstrap data to pipe caused \"write init-p: broken pipe\"": unknown
make[2]: *** [build-admin-js] 错误 1
make[2]: 离开目录“/root/cello”
make[1]: *** [start-old] 错误 2
make[1]: 离开目录“/root/cello”
make: *** [start] 错误 2
解决办法:搜索发现是docker-ce的版本问题,运行:
yum remove docker-ce docker-ce-cli containerd.io
yum install -y docker-ce-18.09.0-3.el7 docker-ce-cli-18.09.0-3.el7 containerd.io-1.2.0-3.el7