close
先用 VIC (VMware vSphere® Integrated Containers™ ) 建立兩台 VCH 192.168.0.71 & 72 ...
PS : 使用 --no-tls ....關閉 TLS .....還是沒用
啥叫 VCH ...請看這篇 ...http://echochio.pixnet.net/blog/post/44901079
# ./vic-machine-linux create --target root@192.168.0.12 --public-network-ip 192.168.0.71/24 --public-network-gateway 192.168.0.2 --no-tls --force --name 'vch-node1' --force # ./vic-machine-linux create --target root@192.168.0.12 --public-network-ip 192.168.0.72/24 --public-network-gateway 192.168.0.2 --no-tls --force --name 'vch-node2' --force
Control 是 CentOS 7 ,,,, IP : 192.168.0.70
# echo "OPTIONS='-g /cutome-path/docker -H tcp://0.0.0.0:2375'" > /etc/sysconfig/docker
重啟 Docker
# systemctl restart docker.service
建立 token ...我得到 3b18078b75c614b0eb8d8955502c62f0
將 71, 72 加入 swarm
# docker run -d swarm join --addr=192.168.0.71:2376 token://3b18078b75c614b0eb8d8955502c62f0 # docker run -d swarm join --addr=192.168.0.71:2376 token://3b18078b75c614b0eb8d8955502c62f0
70 安裝 swarm manage
# docker run -d -p 8888:2375 swarm manage token://3b18078b75c614b0eb8d8955502c62f0
查看 swarm 資訊 ....沒成功 ......Status: Pending ....如正常 docker 是會成功的 ....哈哈
# docker -H 192.168.0.70:8888 info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 0 Server Version: swarm/1.2.6 Role: primary Strategy: spread Filters: health, port, containerslots, dependency, affinity, constraint, whitelist Nodes: 2 (unknown): 192.168.0.72:2376 └ ID: └ Status: Pending └ Containers: 0 └ Reserved CPUs: 0 / 0 └ Reserved Memory: 0 B / 0 B └ Labels: └ UpdatedAt: 2017-04-13T03:01:46Z └ ServerVersion: (unknown): 192.168.0.71:2376 └ ID: └ Status: Pending └ Containers: 0 └ Reserved CPUs: 0 / 0 └ Reserved Memory: 0 B / 0 B └ Labels: └ UpdatedAt: 2017-04-13T03:01:46Z └ ServerVersion: Plugins: Volume: Network: Swarm: NodeID: Is Manager: false Node Address: Kernel Version: 4.10.9-1.el7.elrepo.x86_64 Operating System: linux Architecture: amd64 CPUs: 0 Total Memory: 0B Name: d02c795a2a0e Docker Root Dir: Debug Mode (client): false Debug Mode (server): false Experimental: false Live Restore Enabled: false
全站熱搜
留言列表