Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Docker Swarm

Docker Swarm

What's news in Docker Swarm since the alpha release

Victor Vieux

March 19, 2015
Tweet

More Decks by Victor Vieux

Other Decks in Technology

Transcript

  1. Docker Swarm
    @vieux - @docker
    Docker Meetup at 500 Startups

    View full-size slide

  2. Running containers on
    multiple hosts

    View full-size slide

  3. Today
    Docker
    CLI
    Docker
    CLI
    Docker
    CLI

    View full-size slide

  4. Introducing Docker Swarm
    us-west us-east
    Docker
    CLI
    Docker
    CLI
    Swarm

    View full-size slide

  5. Swarm in a nutshell
    • Docker REST API (>80%)
    • Resource management (CPU, Mem, Networking)
    • Advanced scheduling with constraints and affinities
    • Multiple Discovery Backends (hub, etcd, consul, zookeeper)
    • TLS: Encryption & Authentication
    Soon: Health check & Rebalancing

    View full-size slide

  6. Timeline
    Oct
    Nov
    Dec
    Jan
    Feb
    Jun
    Proof of Concept
    DockerCon EU
    Open Repository
    First Release Candidate
    Swarm Beta Release
    Swarm 1.0
    Global Hack Day
    Open Proposal

    View full-size slide

  7. Setup using the hosted discovery service
    • Create a cluster:
    $ swarm create
    • Add nodes to a cluster:
    $ swarm join --add= token://
    • Start Swarm
    $ swarm manage --addr= token://
    Or you can use your own etcd, zookeeper or consul
    Contributions are welcome
    :

    View full-size slide

  8. Resource Management
    • Memory
    $ docker run -m 1g …
    • CPU
    $ docker run -c 1 …
    • Ports
    $ docker run -p 80:80 …
    • More to come, ex: network interfaces

    View full-size slide

  9. Constraints
    • Standard constraints induced from docker info
    docker run -e “constraint:operatingsystem==*fedora*” …
    docker run -e “constraint:storagedriver==*aufs*” …
    • Custom constraints with host labels
    docker -d --label “region==us-east”
    docker run -e “constraint:region==us-east” …
    • Pin a container to a specific host
    docker run –e “constraint:node==ubuntu-2” …

    View full-size slide

  10. Affinities
    • Containers affinities
    docker run --name web nginx
    docker run -e “affinity:container==web” logger
    • Containers Anti-affinities
    docker run --name redis-master redis
    docker run --name redis-slave -e “affinity:container!=redis*” …
    • Images affinities
    docker run -e “affinity:image==redis” redis

    View full-size slide

  11. Swarm Scheduler
    2 steps:
    • 1- Apply filters to exclude nodes
    - ports
    - labels
    - health
    • 2- Use a strategy to pick the best node
    - random
    - binpack
    - spread
    Contributions are welcome
    :

    View full-size slide

  12. Swarm Beta: Integrations
    • Fully integrated with Machine
    • Partially integrated with Compose
    • Mesos integration has started in collaboration with Mesosphere.

    View full-size slide

  13. Demo
    us-west us-east
    Docker
    CLI
    Docker
    CLI
    = RAM: 2GB
    CPU: 1core
    Swarm

    View full-size slide

  14. http://github.com/docker/swarm
    #docker-swarm on freenode
    @vieux
    Thank You.

    View full-size slide