February 25, 2016 Β· 8 min Β· Russ Mckendrick | Suggest Changes
I have been quiet on here as I am in the process of writing again, one of things I have been looking at is Dockers new networking features. This gave me an excuse to have a play with Weave. Rather than go into too much detail here, lets go all click bait because you wonβt believe what happened next.
I launched two hosts in Digital Oceanβ, one in London and then one in New York City using Docker Machine;
Docker Networking Magic 1/9
Once both hosts were up and running I downloaded the Weave binaries on each host;
Docker Networking Magic 2/9
Once the binary was on each host, I launched Weave on each host making sure I provided a password so that traffic between the host machines would be encrypted;
Docker Networking Magic 3/9
Now Weave is running on both my hosts, I instructed the mesh-nyc host to connect to the IP address of the mesh-london host;
Docker Networking Magic 4/9
and finally check the status of the Weave cluster;
Docker Networking Magic 5/9
There should be two peers and 2 established connections.
This is where it gets interesting. Launching a NGINXβcontainer on the New York City host by running;
Docker Networking Magic 6/9
and then on the London host, try wgetting the page being served by NGINX (its just a plain one which says Hello from NGINX);
Docker Networking Magic 7/9
and then finally ping the NGINX container;
Docker Networking Magic 8/9
If you canβt be bothered to run it yourself, and who can blame you, here is anasciicinemaβrecording;
As you can see, with no effort on my part other than the commands above I had encrypted, multi-host container networkingΒ !!!
Donβt forget to get teardown the twoDigital Oceanβhosts if you brought them up;