2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2020

08/19/2016: Docker Swarm 1.12 on VirtualBox

This post shows the steps I followed to run Docker Swarm 1.12 on VirtualBox.

Start the cluster

docker-machine create --driver virtualbox pi1
docker-machine create --driver virtualbox pi2
docker-machine create --driver virtualbox pi3
docker-machine create --driver virtualbox pi4
docker-machine create --driver virtualbox pi5

List the IP Addresses

for i in `seq 1 5`; do
  echo "HOST: pi$i IP: $(docker-machine ip pi$i)";
done

Start Swarm Master

export SWARM_ID=$(docker-machine ssh pi1 docker swarm --advertise-addr=$(docker-machine ip pi1) init)

Start Agents

export SWARM_JOIN_CMD=$(docker-machine ssh pi1 docker swarm join-token worker | tail -n 4 | head -n 3 | tr --delete '\\')

for i in `seq 2 5`; do
  docker-machine ssh pi$i $SWARM_JOIN_CMD
done

L#ist swarm nodes

eval $(docker-machine env pi1)
docker node ls

Exercise the swarm

eval $(docker-machine env pi1)
docker service create --name ping alpine ping 8.8.8.8
docker service ps ping
docker service update --replicas 10 ping
docker service rm ping

Shutdown the cluster

eval $(docker-machine env --unset)
docker-machine env --unset
for i in `seq 0 5`; do
  docker-machine rm -y pi$i;
done

08/14/2016: Docker Notes

TODO

  • https://nats.io/blog/docker-swarm-plus-nats/
  • mount EBS for Docker Swarm for Service
    • https://github.com/leg100/docker-ebs-attach
  • ElasticSearch
  • http://duplicity.nongnu.org/ - backup to s3

Advice

  • https://medium.com/@LachlanEvenson/5-minutes-dabbling-with-docker-distributed-application-bundles-dab-60f2dca3829#.sftc1y1b0 - Distributed Application Bundles
  • https://gist.github.com/jubianchi/f22e96c476c6dbf4a6ed57663a5bc888#gistcomment-1841128 - graphic language for docker diagram
  • https://blog.docker.com/2016/03/realtime-cluster-monitoring-docker-swarm-riemann/ - Realtime Cluster Monitoring With Docker Swarm And Riemann
  • http://collabnix.com/archives/1464 - Understanding Node Failure Handling under Docker 1.12 Swarm Mode
  • https://github.com/gliderlabs/docker-alpine/blob/master/docs/usage.md#virtual-packages
  • https://ilkka.io/blog/static-sites-with-docker/
  • http://rancher.com/docker-based-build-pipelines-part-1-continuous-integration-and-testing/
  • https://blog.jessfraz.com/post/docker-containers-on-the-desktop/ - Containers on the command line
  • https://medium.com/@alexeiled/docker-pattern-the-build-container-b0d0e86ad601#.1d1zjd2o3 - Using a build container
  • https://github.com/docker/labs/tree/master/Docker-Orchestration - Slide deck about Advanced Docker Orchestration by Jérôme Petazzoni
  • https://www.iron.io/microcontainers-tiny-portable-containers/ - Tiny images for all languages at https://github.com/iron-io/dockers
  • https://resin.io/blog/building-a-monitoring-dashboard-with-resin-io/
  • http://rancher.com/lessons-learned-building-a-continuous-deployment-pipeline-with-docker-docker-compose-and-rancher-part-2/
  • http://www.smartjava.org/content/service-discovery-docker-and-consul-part-1
  • https://www.docker.com/products/docker-cloud
  • https://blog.cloudslang.io/automatically-cleaning-unused-docker-images-using-consul-and-cloudslang-293aa03115dc#.qonud1iud
  • https://blog.codeship.com/using-honcho-create-multi-process-docker-container/
  • http://blog.runnable.com/post/145362675491/distributing-docker-cache-across-hosts - Distributing Docker Cache Across Hosts

Books

  • http://docker-books.com/

DataStax Cassandra

  • https://medium.com/@jeremie.vallee/datastax-studio-on-docker-3cb14db892f1#.fp4iiess8 - DSE Graph - a graph database and visualizer.

Deployment

  • https://botleg.com/stories/blue-green-deployment-with-docker/ - Blue Green Deployment on Docker Swarm
  • https://technologyconversations.com/2015/12/08/blue-green-deployment-to-docker-swarm-with-jenkins-workflow-plugin/ - Blue Green deployment using Jenkins
  • https://github.com/vfarcic/docker-swarm-blue-green

Go

  • https://www.iron.io/an-easier-way-to-create-tiny-golang-docker-images/

Hosted Services

  • https://spotinst.com/ - Companies who use Spotinst launch their products faster, deploy 2x more versions to production and increase their performance in 150%.
  • https://www.iron.io/ - Job processing
  • https://resin.io/ - Resin.io brings the benefits of Linux containers to the IoT.
  • https://microbadger.com - what is inside an image?
  • https://calm.io/

Hosting

  • https://www.scaleway.com/

Images

  • http://blog.hypriot.com/post/microservices-bliss-with-docker-and-traefik/ - HTTP reverse proxy
  • http://www.sysdig.org/falco/ - Behavior analysis of applications
  • https://nathanleclaire.com/blog/2016/08/11/curl-with-http2-support—a-minimal-alpine-based-docker-image/
  • https://blog.jessfraz.com/post/routing-traffic-through-tor-docker-container/ - TOR
  • http://diethardsteiner.github.io/pdi/2016/04/21/PDI-Docker-Part-1.html - Pentaho Data Integration
  • https://blog.zzrot.com/caddy-with-docker/ - Caddy, small web server
  • https://crate.io/a/alpine-linux-and-docker-nautilus-protect-crate/

Java

  • https://medium.com/@ecesena/a-quick-demo-of-apache-beam-with-docker-da98b99a502a#.73af8jwsn - Apache Beam is a unified programming model to create Batch and Stream data processing pipelines.
  • https://community.oracle.com/docs/DOC-998210 - Step-by-Step High Availability with Docker and Java EE

Jenkins

  • http://blog.alexellis.io/jenkins-meets-the-proxy/
  • https://blog.flowlog-stats.com/2016/05/05/production-ready-jenkins-2-0-in-two-steps-with-docker/
  • http://rancher.com/deploying-a-scalable-jenkins-cluster-with-docker-and-rancher/
  • http://engineering.riotgames.com/news/jenkins-docker-proxies-and-compose
  • http://engineering.riotgames.com/news/building-jenkins-inside-ephemeral-docker-container
  • http://gianarb.it/blog/docker-inside-docker-and-jenkins-2

Kali

  • http://jerrygamblin.com/2016/05/31/kalibrowser/

Kata

  • https://medium.com/@Jesse_White/docker-kata-001-1aae05545e3d#.2dxka0ii2 - Kata 001

LEMP

  • https://mercurenews.com/en/lemp-stack-in-90-seconds-with-docker/

Logging

  • https://signalfx.com/blog/monitoring-docker-containers-take-get-started/

Monitoring

  • https://www.opsclarity.com/monitoring-docker-containers
  • https://www.brianchristner.io/updated-docker-monitoring-prometheus-grafana/

nats

  • https://nats.io/blog/docker-swarm-plus-nats/

Node

  • http://docker-blog.jevsejev.io/2016/06/08/docker-nodejs-minimal-image-with-private-git-repositories/

Raspberry PI

  • https://gitter.im/hypriot/talk
  • http://nats.io/
  • http://www.cloudslang.io

Security

  • https://benchmarks.cisecurity.org/tools2/docker/CIS_Docker_1.11.0_Benchmark_v1.0.0.pdf
  • https://medium.com/@alexeiled/docker-security-testing-3545e7493843#.a6wxawzae
  • http://jerrygamblin.com/2016/05/28/a-docker-container-to-capture-all-traffic-from-host/ - A Docker Container To Capture All Traffic From Host.
  • https://blog.codeship.com/using-honcho-create-multi-process-docker-container/ - Using Honcho to provide TLS around Redis.

Spring Boot

  • https://blog.eventuate.io/2016/06/22/deploying-spring-boot-microservices-using-docker-1-12-orchestration-part-1/

Testing

  • https://github.com/sstephenson/bats - Bash Automated Testing
  • https://medium.com/@alexeiled/pumba-chaos-testing-for-docker-1b8815c6b61e#.kic6ntp7v - Pumba, Chaos Testing for Docker
  • https://www.qualimente.com/2016/04/26/introduction-to-failure-testing-with-docker/
  • https://github.com/aelsabbahy/goss - Goss - Quick and Easy server validation
  • http://docker-blog.jevsejev.io/2016/06/09/docker-image-tests/
  • https://medium.com/@garrensmith/consistent-selenium-testing-with-docker-f2d5a24a1bc5#.bvs8dpe4m

Versus

  • https://www.linkedin.com/pulse/docker-vs-aws-lambda-microservices-alan-ho - Docker vs AWS Lamba