PioneersIO - Networking with Docker

Post on 20-Jan-2017

147 views 0 download

transcript

Networking with DockerPioneers.Paris

Adrien Blind, Laurent Grangeau

Who are we ?

Adrien BlindDevOps coach, Banking Industry

@adrienblind adrien@blind-net.fr

Laurent GrangeauDevOps coach, Finaxys

@laurentgrangeau laurent.grangeau@gmail.com

The container paradigm « A technology which standardize packaging

and facilitates operations of applications »

IsolationVirtualisation

VM VMVM

Hypervisor

Hardware

App.

MDW

App.

MDW

App.

MDW

Kernel Kernel Kernel

OSbase

OSbase

OSbase

Kernel

Hardware or VM

Container

App.

OSbase

MDW

Container

App.

OSbase

MDW

Container

App.

MDW

OSbase

PO DI LI SORTABLE SPOSABLE VE CIAL

Docker’s observable properties

Spreading docker on multiple host

You will probably not leverage on a single host...

Creating a docker hosting capability will generate additionnal challenges Topology Orchestration Networking : clustering, multi-tenancy, etc.

Let’s now focus on the networking challenges

Overlay networks Virtual networks ‘floating’ on top of the base network

Host

Physical network

Host

Tenant #1 networkApp server App server App server DB

Tenant #2 networkDB App server

Major competitors

OpenVSwitch & pipework… SocketPlane Weave

Laptop

Demo using Weave

Virtual host Virtual Host

Tenant #110.0.100.0/24

App server10.0.100.2

eth0

DB server10.0.100.1

Tenant #210.0.200.0/24

DB server10.0.200.1

Appserver10.0.200.2

#1 Vagrant delivers virtual hosts having

Docker Engine installed

#3 Containers are popped through

weave run command (wrap docker run)

#2 Weave launches a special container used

as a network router

Weave Weave

eth0 eth0

Virtual network

Cloud DevOps

Opportunities

Conclusion

Appendix

• Launch Weave– host1:~$ sudo weave launch– host2:~$ sudo weave launch 172.17.8.101

• Create DB containers– host1:~$ sudo weave run 10.0.100.1/24 -itd -e

MYSQL_ROOT_PASSWORD=mysecretpassword mariadb– host2:~$ sudo weave run 10.0.200.1/24 -itd -e

MYSQL_ROOT_PASSWORD=mysecretpassword mariadb

Appendix

• Link APP containers to DB containers– host1:~$ sudo weave run 10.0.200.2/24 -itd -e

WORDPRESS_DB_HOST=10.0.200.1 -e WORDPRESS_DB_PASSWORD=mysecretpassword -p 8080:80 wordpress

– host2:~$ sudo weave run 10.0.100.2/24 -itd -e WORDPRESS_DB_HOST=10.0.100.1 -e WORDPRESS_DB_PASSWORD=mysecretpassword -p 8080:80 wordpress