Betty Junod

#SwarmWeek: Video Tutorials to Join Your First Docker Swarm Cluster

Betty Junod

For #SwarmWeek, our goal is not only to get you educated and comfortable with Docker Swarm, but to evaluate it by setting up your first cluster. So we created a video tutorial series to help you walk through the exact commands and configuration you need to get started.

Follow along this three video series and you will setup a basic Swarm cluster with a high availability configuration and setup TLS for secure communications. You’ll learn everything you need to set-up a production environment. So let’s get to it!

Video 1: Create the Swarm Cluster

This tutorial guides you through setting up a two node Swarm cluster with a single Swarm manager. You will go through the commands used to install Consul for service discovery* and Swarm manager as containers on the host, join additional nodes to the cluster and configure your Docker client to communicate with the Swarm. You will need to have Docker Engine already installed on all three hosts. Refer to these install docs to prepare the hosts.

*TIP: Swarm supports multiple service discovery backends from Docker Hub, Consul, Etcd and Zookeeper. Docker Hub provides an easy service discovery as a service for your Swarm cluster.

Video 2: High Availability Configuration

This tutorial explains how to take the Swarm environment you just finished setting up and configure additional Swarm managers to provide a highly available environment. You will learn how to set up a secondary Swarm manager that will serve as the leader in the event the primary Swarm manager fails. The documentation on Swarm high availability is here.

Video 3: Setting up TLS

This last tutorial explains how to secure your Swarm environment by setting up TLS for secure communications between your Docker client,the Swarm manager, and the Docker hosts. TLS uses public key infrastructure (PKI), a combination of security-related technologies, policies and procedures to create and manage digital certificates to secure communication. This is important because Docker nodes in a Swarm cluster are bound to a network port. Get more details around how Docker uses TLS.

Once you have your Swarm cluster up and running, you can deploy this sample app or your own Compose app to your cluster. Also check out these other great use case tutorials contributed by the community – deploying Swarm on Azure, running a Windows Swarm on your laptop, and play around with the scheduling strategies.

When you’re done, share a picture or description of your Swarm with us on Twitter and tag @docker and #SwarmWeek for a chance to win a free ticket to DockerCon 2016 in Seattle, WA on June 19-21.

Happy Swarming!


Learn More about Docker


3 thoughts on “#SwarmWeek: Video Tutorials to Join Your First Docker Swarm Cluster

  1. Hi Betty!

    Could I ask for your help? I stuck in steps "docker run -dit ubuntu /bin/bash"

    116:~# env | grep DOCK
    116:~#docker run -dit ubuntu /bin/bash
    docker: Error response from daemon: No healthy node available in the cluster.
    See 'docker run –help'.

  2. Hi Betty,

    Thank you for the great blog post.

    I am following your video #1 and trying to create a docker swarm with 1 manager and two worker nodes.

    I follow the steps described in the video exactly.

    The docker PS command shows me the consul and the swarm manager containers running:

    │35b13d00defe swarm "/swarm manage con…" 3 hours ago Up About a minute
    │>2375/tcp youthful_mestorf
    │d7deaff14983 progrium/consul "/bin/start -serve…" 3 hours ago Up About a minute
    │53/tcp, 53/udp, 8300-8302/tcp, 8400/tcp, 8301-8302/udp,>8500/tcp eager_borg

    However, when i try to join my first swarm node i simply get the message:

    "docker: Cannot connect to the Docker daemon at tcp://x.x.x.x:2375. Is the docker daemon running?"

    where x.x.x.x is the Ip address i give in the swarm join command

Leave a Reply