Docker Networking with No External Cluster Store: Announcing Weave 1.4 Plugin
All other Docker networking plugins, including Docker’s own “Overlay” driver, require that you set up Docker with a cluster store – a central database like Consul or Zookeeper – before you can use them. As well...
Weaveworks Donates Project Kured to the CNCF
Celebrating 100 team members at Weaveworks
Weaveworks Welcomes Jane Silber to its Board of Directors
All other Docker networking plugins, including Docker’s own “Overlay” driver, require that you set up Docker with a cluster store – a central database like Consul or Zookeeper – before you can use them. As well as being harder to set up, maintain and manage, every Docker host must be in constant contact with the cluster store: if you lose the connection, even temporarily, then you cannot start or stop any containers.
In Weave Net 1.4, we provide a new Docker Network plugin that doesn’t require an external cluster store, so you can get started straight away, and you can start and stop containers even when there are network connectivity problems.
How to use the Weave Net 1.4 Docker networking plugin
Simply launch the Weave Net router on each host and tell it to connect to some other hosts:
host1$ weave launch host2
host2$ weave launch host1
then run your containers using the Docker command-line:
host1$ docker run --net=weave -ti ubuntu root@1458e848cd90:/# hostname -i 10.32.0.2
host2$ docker run --net=weave -ti ubuntu root@8cc4b5dc5722:/# ping 10.32.0.2 PING 10.32.0.2 (10.32.0.2) 56(84) bytes of data. 64 bytes from 10.32.0.2: icmp_seq=1 ttl=64 time=0.116 ms 64 bytes from 10.32.0.2: icmp_seq=2 ttl=64 time=0.052 ms
How to bypass the need for a central cluster store when building Docker apps
To run a Docker cluster without a central database, we need to do three things:
- Run in “local” scope, which tells Docker we don’t want it to do any cross-host coordination
- Have weave do all the cross-host coordination and set up the networks; this is done by the
- Provide an IP Address Management (IPAM) driver, which links to Weave Net’s own IPAM system
All cross-host coordination is handled by Weave Net’s “mesh” communication, using gossip and eventual consistency to avoid the need for constant communication and dependency on a central cluster store.
Anything else I should know?
More details about features and limitations of the plugin are in the plugin docs.
Other features of Weave Net, such as optional encrypted links, multicast and service discovery via WeaveDNS, are automatically available when using this plugin. See the weave docs for full details.
This Weave Net 1.4 release represents a big step forward in simplicity and flexibility for Docker networking.
(Whale image by Zoran Kovacevic, used under Creative Commons licence)