Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

2016 - IGNITE - How Do I Even Swarm

226 views

Published on

Ignite presentation by Everett Toews

Swarm is Docker's answer to clustering by treating a group of Docker hosts as a single host.

Published in: Software
  • Be the first to comment

  • Be the first to like this

2016 - IGNITE - How Do I Even Swarm

  1. 1. How Do I Even Swarm? @evere1_toews
  2. 2. Swarm is clustering for mul;ple Docker nodes
  3. 3. Carina creates Docker Swarm clusters or use docker-machine
  4. 4. $ open h1p://getcarina.com $ export CARINA_APIKEY=12341234 $ export CARINA_USERNAME=octopod
  5. 5. $ open h1p://getcarina.com $ export CARINA_APIKEY=12341234 $ export CARINA_USERNAME=octopod $ curl -sL h1ps://download.getcarina.com/carina/ latest/$(uname -s)/$(uname -m)/carina -o carina $ mv carina ~/bin/carina $ chmod u+x ~/bin/carina
  6. 6. $ carina create --wait --nodes=3 mycluster
  7. 7. $ carina create --wait --nodes=3 mycluster $ carina env mycluster source /Users/me/.carina/clusters/octopod/mycluster/docker.env # Run the command below to get your Docker env vars set: # eval $(carina env mycluster)
  8. 8. $ carina create --wait --nodes=3 mycluster $ carina env mycluster source /Users/me/.carina/clusters/octopod/mycluster/docker.env # Run the command below to get your Docker env vars set: # eval $(carina env mycluster) $ eval $(carina env mycluster)
  9. 9. $ env | grep DOCKER DOCKER_HOST=tcp://172.99.65.183:2376 DOCKER_TLS_VERIFY=1 DOCKER_CERT_PATH=/Users/me/.carina/clusters/octopod/mycluster DOCKER_VERSION=1.10.3
  10. 10. $ env | grep DOCKER DOCKER_HOST=tcp://172.99.65.183:2376 DOCKER_TLS_VERIFY=1 DOCKER_CERT_PATH=/Users/me/.carina/clusters/octopod/mycluster DOCKER_VERSION=1.10.3 $ curl -sL h1ps://download.getcarina.com/dvm/ latest/install.sh | sh
  11. 11. $ env | grep DOCKER DOCKER_HOST=tcp://172.99.65.183:2376 DOCKER_TLS_VERIFY=1 DOCKER_CERT_PATH=/Users/me/.carina/clusters/octopod/mycluster DOCKER_VERSION=1.10.3 $ curl -sL h1ps://download.getcarina.com/dvm/ latest/install.sh | sh $ dvm use Now using Docker 1.10.3
  12. 12. $ docker network create mynetwork d15a19975f57ee51be268e4636acd6fa19f7235eb3e0e89f41f55160286 10cc5
  13. 13. $ docker run --detach --name graphite --net mynetwork --publish 80:80 hopsoh/graphite-statsd 429011dd6d277e02e87b201e5bb985252ac7013dc50abf330c1006fcea 32fa44
  14. 14. $ docker run --detach --name graphite --net mynetwork --publish 80:80 hopsoh/graphite-statsd 429011dd6d277e02e87b201e5bb985252ac7013dc50abf330c1006fcea 32fa44
  15. 15. $ docker run --rm --net mynetwork etoews/net /bin/sh -c ' for i in $(seq 1 20); do echo -n "r:$RANDOM|c" | nc -w 1 -u graphite 8125 done'
  16. 16. $ docker run --rm --net mynetwork etoews/net /bin/sh -c ' for i in $(seq 1 20); do echo -n "r:$RANDOM|c" | nc -w 1 -u graphite 8125 done'
  17. 17. $ docker run --rm --net mynetwork etoews/net /bin/sh -c ' for i in $(seq 1 20); do echo -n "r:$RANDOM|c" | nc -w 1 -u graphite 8125 done'
  18. 18. $ docker run --rm --net mynetwork etoews/net /bin/sh -c ' for i in $(seq 1 20); do echo -n "r:$RANDOM|c" | nc -w 1 -u graphite 8125 done' $ open h1p://$(docker port graphite 80)
  19. 19. Thanks! rack.to/swarm @evere1_toews

×