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

Docker Swarm on Mesos

Docker Swarm on Mesos

Slides from the the talk I presented with Timothy Chen https://twitter.com/tnachen at #MesosCon 2015

Victor Vieux

August 21, 2015
Tweet

More Decks by Victor Vieux

Other Decks in Technology

Transcript

  1. Docker Swarm on Mesos
    @tnachen - @vieux

    View full-size slide

  2. Agenda
    • Docker Swarm introduction
    • Docker Swarm on Mesos
    • How to setup Docker Swarm on DCOS
    • DEMO

    View full-size slide

  3. Running containers on
    multiple hosts

    View full-size slide

  4. Docker
    CLI
    Docker
    CLI
    Docker
    CLI
    Today

    View full-size slide

  5. Docker
    CLI
    Docker
    CLI
    Swarm
    With Docker Swarm

    View full-size slide

  6. Swarm in a nutshell
    • Exposes several Docker Engines as a single virtual Engine
    • Serves the standard Docker API
    • Extremely easy to get started
    • Batteries included but swappable

    View full-size slide

  7. Timeline
    Oct
    Nov
    Dec
    Jan
    Feb
    Jun
    Proof of Concept
    DockerCon EU
    Open Repository
    First Release Candidate
    Swarm Beta Release
    Global Hack Day
    Open Proposal
    0.2.0 Release
    0.3.0 Release
    experimental mesos
    integration
    Apr
    Aug
    0.4.0 Release
    Nov 0.5.0 Release
    stable mesos integration

    View full-size slide

  8. Bring the Docker workflow on a
    Mesos Cluster

    View full-size slide

  9. +
    Mesos
    CLI
    Mesos Agents
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    Mesos Masters
    Marathon
    Mesos Cluster

    View full-size slide

  10. +
    Mesos
    CLI
    Mesos Agents
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    Mesos Masters
    Marathon
    Docker
    CLI
    Mesos Cluster + Docker Swarm

    View full-size slide

  11. +
    Mesos
    CLI
    Mesos Agents
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    Mesos Masters
    Marathon
    Docker
    CLI
    shipyard
    kitematic compose
    Mesos Cluster + Docker Swarm

    View full-size slide

  12. Swarm Scheduler
    2 steps:
    • 1- Apply filters to exclude nodes/offers
    - ports
    - constraints
    - affinity
    - health
    - dependency
    • 2- Use a strategy to pick the best node/offer
    - binpack
    - spread
    - random

    View full-size slide

  13. Resource Management
    • Memory
    $ docker run -m 1g …
    • CPU
    $ docker run -c 1 …
    • Ports
    $ docker run -p 80:80 …

    View full-size slide

  14. Scheduling parameters
    • Constraints
    docker run -e “constraint:node==agent-04” …
    docker run -e “constraint:region==us-east” …
    • (anti-)Affinities
    docker run --name redis-master redis
    docker run --name redis-slave -e “affinity:container!=redis*” …

    View full-size slide

  15. Why Docker Swarm + Mesos?
    Scalable to 10,000s of nodes
    Benefit from Mesos features / APIs
    Mesos + Docker Ecosystem
    Docker client experience

    View full-size slide

  16. Mesosphere Universe

    View full-size slide

  17. Install:
    dcos package install swarm
    Setup:
    eval $(dcos swarm env)
    Run:
    docker run -c 1 busybox ls

    View full-size slide

  18. Demo docker-compose on DCOS

    View full-size slide

  19. http://github.com/docker/swarm
    http://mesosphere.com/learn
    #docker-swarm on freenode
    @tnachen - @vieux
    Thank You. Questions?

    View full-size slide