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

Docker Swarm Introduction

Victor Vieux
December 05, 2014

Docker Swarm Introduction

Docker Swarm breakout session at DockerCon EU.

Victor Vieux

December 05, 2014
Tweet

More Decks by Victor Vieux

Other Decks in Technology

Transcript

  1. Docker Swarm!
    @aluzzardi - @vieux!

    View Slide

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

    View Slide

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

    View Slide

  4. Setup!
    •  Create a cluster:!
    $ swarm create
    •  Add nodes to a cluster:!
    $ swarm join --token= --addr=
    •  List nodes in a cluster!
    $ swarm list --token=
    •  Start Swarm!
    $ swarm manage --token= --addr=
    !
    !

    View Slide

  5. 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 Slide

  6. 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” …
    •  More to come, ex: affinity!
    !

    View Slide

  7. Rescheduling!
    •  Rescheduling policies; similar to `--restart`!
    •  Pending status!
    !
    !
    !

    View Slide

  8. Swarm scheduler!
    2 steps:!
    !
    •  1- Apply filters to exclude nodes!
    " "
    - ports!
    " "
    - labels!
    " "
    - health!
    •  2- Use a strategy to pick the best node!
    " "
    - bin packing!
    " "
    - random!
    !
    !
    !
    !
    Contributions are welcome ☺
    :
    !

    View Slide

  9. http://github.com/docker/swarm!
    @aluzzardi - @vieux!
    Thank You.!

    View Slide