Docker Weave 应用条件
- 官方文档:https://www.weave.works/docs/net/latest/install/installing-weave
使用前提:
1. 确保Linux内核版本3.8+,Docker1.10+。
2. 节点之间如果有防火墙时,必须彼此放行TCP 6783和UDP 6783/6784端口,这是Weave控制和数据端口。
3. 主机名不能相同
内核版本升级方案:https://www.cnblogs.com/xiangsikai/p/9899844.html
Docker Weave 网络连接部署
1、下载安装weave
- Weave
- 百度云下载:https://pan.baidu.com/s/11C7DAd3vPWvHchmxIWEkTg
- 密码:0azq
# 1、加入可执行权限 chmod +x weave # 2、下载到本地,存入指定命令文件目录下 mv weave /usr/bin/
2、创建网络环境
# 节点1:启动并与其他主机建立连接,启动weave并下载镜像 weave-01:~# weave launch # 节点2:进行连接 IP连接对端服务器 weave-02:~# weave launch <ip address>
命令:weave status Version: 2.0.4 (failed to check latest version - see logs; next check at 2018/11/02 14:12:39) Service: router Protocol: weave 1..2 Name: 52:e7:9f:3c:61:a0(weave01) Encryption: disabled PeerDiscovery: enabled Targets: 1 # 建立连接 Connections: 1 (1 established) # 2 表示有两个节点 Peers: 2 (with 2 established connections) TrustedSubnets: none Service: ipam Status: idle Range: 10.32.0.0/12 DefaultSubnet: 10.32.0.0/12 Service: dns Domain: weave.local. Upstream: 192.168.1.1, 8.8.8.8 TTL: 1 Entries: 0 Service: proxy Address: unix:///var/run/weave/weave.sock Service: plugin (legacy) DriverName: weave