简介
本文档介绍在安装程序中切换默认网桥的过程,以便其不与专用网络冲突,并且可以完成安装。
问题
默认的Suite Docker网桥使用IP范围172.18.0.0/16,这可能会干扰专用网络。当安装程序加载时,从安装程序到专用网络的情况可能变得不可路由。您可以通过以下方式查看此网桥:
ip address show
登录安装程序VM时。您还可以通过以下方式在docker中看到此网桥:
docker network ls
它应类似于以下内容:
[root@rcdn-ccs-repo ~]# docker network ls
NETWORK ID NAME DRIVER SCOPE
eadee20d76ce bridge bridge local
3a009a3d7747 host host local
f4ca595dfac5 none null local
5b0dbc510082 suite bridge local
先决条件
1.部署安装程序VM(ova或qcow2)时,必须能够登录到它,因此,如果使用VMware,则在部署OVA并添加公钥或密码时,必须更改default-instance-id和主机名。
2.如果使用Openstack,只需输入密钥。
解决方案
步骤1.登录安装程序。
步骤2.通过以下方式将套件安装程序容器从当前网桥断开:
docker network disconnect suite suite-prod-mgmt
docker network disconnect suite suite-nginx
docker network disconnect suite suite-installer-ui
docker network disconnect suite suite-k8s-mgmt
步骤3.如果有任何其他容器连接到套件网桥,您也必须以类似方式断开它们。
步骤4.从网桥断开所有容器后,必须通过以下方式移除网桥:
docker network rm suite
步骤5.现在,您必须创建一个名称相同但不同/16网络的新Docker网桥,以避免与专用网络冲突。在此命令示例中,使用192.168.0.0/16:
docker network create --driver=bridge --subnet=192.168.0.0/16 --gateway=192.168.0.1 suite
注意:它必须是/16网络,并且必须命名为suite。
步骤6.通过以下方式重新启动安装程序VM:
shutdown -r now
步骤7.重新登录VM。
步骤8.通过以下方式验证套件安装程序的容器是否已启动并运行:
docker ps
应该如下所示:
[root@rcdn-ccs-repo ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8d437dab65b9 devhub-docker.cisco.com/multicloudsuite-release/suite-nginx:5.0.0-RC2.8 "/entrypoint.sh" 13 days ago Up 13 days 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp suite-nginx
6bbffff3c248 devhub-docker.cisco.com/multicloudsuite-release/suite-prod-mgmt:5.0.0-RC2.8 "/entrypoint.sh" 13 days ago Up 13 days 8080/tcp suite-prod-mgmt
515754611a28 devhub-docker.cisco.com/multicloudsuite-release/suite-k8s-mgmt:5.0.0-RC2.8 "/entrypoint.sh" 13 days ago Up 13 days 8080/tcp suite-k8s-mgmt
8cd9d0c6ddb4 devhub-docker.cisco.com/multicloudsuite-release/suite-installer-ui:5.0.0-RC2.8 "npm start" 13 days ago Up 13 days 8080/tcp suite-installer-ui
步骤9.然后,您可以验证*NEW*套件网桥在以下方面是否工作正常:
docker network inspect suite
其*NEW* ip范围应与此类似,作为IPv4地址:
[root@rcdn-ccs-repo ~]# docker network inspect suite
[
{
"Name": "suite",
"Id": "5b0dbc51008296cccbc766cfd44da1ce95e2cc803fd208e28af60b7931737485",
"Created": "2019-02-14T20:41:25.323694587Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "192.168.0.0/16",
"Gateway": "192.168.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Containers": {
"515754611a28d25ad43cb028ca133755fe7fe97609efe62f142c77607167844b": {
"Name": "suite-k8s-mgmt",
"EndpointID": "9e9e3860e284548a8634eef0dfc208da26532a0d5f696ad60aba0edf9a05ba73",
"MacAddress": "02:42:ac:12:00:03",
"IPv4Address": "192.168.0.3/16",
"IPv6Address": ""
},
"6bbffff3c24848028c0ea9b4294dcf47e78486acdaa0895747adbaed93aee83a": {
"Name": "suite-prod-mgmt",
"EndpointID": "d3f7b14f0c5101df9a17ca857d7b6fb1bbbd47063d3538cdfcad982c01f120e0",
"MacAddress": "02:42:ac:12:00:04",
"IPv4Address": "192.168.0.4/16",
"IPv6Address": ""
},
"8cd9d0c6ddb4424af25898131b68d22ca531c954c032d345981a25c90e9a3777": {
"Name": "suite-installer-ui",
"EndpointID": "47bf559917bb044b4a06a1010685b2388a670c29979fa4201d922445f31da63e",
"MacAddress": "02:42:ac:12:00:02",
"IPv4Address": "192.168.0.2/16",
"IPv6Address": ""
},
"8d437dab65b9ec19307f194ed50201163c486f5f2aff5133d8ecd4a7c014a656": {
"Name": "suite-nginx",
"EndpointID": "1a445b1b0d7208921e29fd64605992b259c5d1071513434768ec39ca68509cd9",
"MacAddress": "02:42:ac:12:00:05",
"IPv4Address": "192.168.0.5/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]
步骤10.从此,您应该能够转到https://<INSTALLER_VM_IP>并加载安装程序,并且没有私有/内部网络冲突。