Slide 1

Slide 1 text

Microservices with Docker and Weave Johann Romefort

Slide 2

Slide 2 text

About me… • Startup guy, last past 7 years in SF • Consulting/training in the container space @ http://containera.io • Organizer of Docker/CoreoS meetup in Munich/Berlin

Slide 3

Slide 3 text

Microservices? - Martin Fowler “Microservices are an approach to developing a single application as a suite of small, connected, services” “Loosely coupled service orientated architecture with bounded contexts” - Adrian Cockcroft

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

Microservices • Small units, composable • Single purpose • Separation of concerns

Slide 8

Slide 8 text

Containers • Easy to use • Single Purpose environment • Fully encapsulated • Lightweight (vs VM which are ok for monoliths) • BUT: Getting complicated when you move from single host to multi-host

Slide 9

Slide 9 text

Containers for Microservices Deployement • Scale from laptop to cloud • Many can be run on a single host without impacting each other • Quick to launch and kill • Easy to integrate in your CI solution • Containers are portable and lightweight

Slide 10

Slide 10 text

Weave • Allows containers to all behave as if they were connected to the same physical network switch With the same interface and no application changes

Slide 11

Slide 11 text

Single Host

Slide 12

Slide 12 text

Multiple Hosts

Slide 13

Slide 13 text

Multiple Clouds

Slide 14

Slide 14 text

Real World Deployment

Slide 15

Slide 15 text

Weave Philosophy • No need to learn an API or change your application • Software network layer 2 and 3. You can use your regular operational tools • No assumption about anything like which Weave node should start before another

Slide 16

Slide 16 text

Weave Philosophy • Not a system of record: No consensus/ synchronization protocol • Nodes don’t have to agree, things can start in any order • If your application depends on some synchronization/election, then go one level above and use Zookeeper, etcd, consul

Slide 17

Slide 17 text

Weave features • Multi-Datacenter support • Traverse firewalls • Encrypted links • Multi-hop routing • Container mobility • Fault tolerance • Multicast

Slide 18

Slide 18 text

What about Service Discovery in Microservices? • Service Discovery is key to micro services • DNS is a good way to keep it simple

Slide 19

Slide 19 text

WeaveDNS • No need to do port mapping - eliminate use cases for service discovery • Automatically (de)register services using DNS • Container Health - WeaveDNS monitor container and remove it if it dies

Slide 20

Slide 20 text

WeaveDNS • DNS for containers • Nothing to configure • nothing to maintain • no change request to submit when you need a new name for your microservice.

Slide 21

Slide 21 text

WeaveDNS

Slide 22

Slide 22 text

Demo Time?

Slide 23

Slide 23 text

Demoing these features: • Extending local dev environment with Multi-host networking • Multi-Datacenter support • Multi-hop routing • Container mobility • Fault tolerance

Slide 24

Slide 24 text

DEMO • Container linked on a local weave • Launch Weave on localhost • Service1 (weave run) ping service2 • Service2 (weave attach)

Slide 25

Slide 25 text

Extending localhost with multi-host networking 10.2.1.1 10.2.1.2 10.2.1.3 Weave Router Weave Router localhost Azure Cloud

Slide 26

Slide 26 text

Container Mobility • kill Service2 and move it to cloud • Launch weave on Azure(weave connect from localhost to Azure) • launch Service2 with same ip as localhost

Slide 27

Slide 27 text

Container Mobility 10.2.1.1 10.2.1.3 Weave Router Weave Router 10.2.1.2 localhost Azure Cloud Kill 10.2.1.2 on localhost and re-instantiate it on Azure

Slide 28

Slide 28 text

WeaveDNS Demo • Launch weaveDNS • Create service1 on localhost • Create service2 on Azure • ping service2 from service1

Slide 29

Slide 29 text

WeaveDNS demo service1 service2 Weave Router Weave Router Weave DNS Weave DNS localhost Azure Cloud

Slide 30

Slide 30 text

Failover with WeaveDNS • create service2 on DigitalOcean • kill service2 on Azure • ping service2 from service1 and see how service is still ping-able but IP changed

Slide 31

Slide 31 text

FailOver using WeaveDNS service1 service2 Weave Router Weave Router Weave DNS Weave DNS localhost Azure Cloud service2 Weave Router Weave DNS DigitalOcean

Slide 32

Slide 32 text

Weave Roadmap • IP Allocation Manager (IPAM): remove the burden of having to allocate IP for each containers • Fast Data path, improve network performance by using OpenVSwitch module in linux kernel. • Working with Docker team to create an extension API, removing need for a weave script that wrap the docker command

Slide 33

Slide 33 text

Thank you! twitter: @romefort email: [email protected] http://news.containera.io

Slide 34

Slide 34 text

http://weave.works