1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/docs/swarm/swarm-tutorial/index.md
Charles Smith 9499d5fd52 update cli commands output for rc1, revise key concepts
Signed-off-by: Charles Smith <charles.smith@docker.com>
2016-06-18 11:38:27 -07:00

3.2 KiB
Raw Blame History

Getting started with swarm mode

This tutorial introduces you to the features of Docker Engine Swarm mode. You may want to familiarize yourself with the key concepts before you begin.

The tutorial guides you through the following activities:

  • initializing a cluster of Docker Engines in swarm mode
  • adding nodes to the swarm
  • deploying application services to the swarm
  • managing the swarm once you have everything running

This tutorial uses Docker Engine CLI commands entered on the command line of a terminal window. You should be able to install Docker on networked machines and be comfortable running commands in the shell of your choice.

If youre brand new to Docker, see About Docker Engine.

Set up

To run this tutorial, you need the following:

Three networked host machines

The tutorial uses three networked host machines as nodes in the swarm. These can be virtual machines on your PC, in a data center, or on a cloud service provider. This tutorial uses the following machine names:

  • manager1
  • worker1
  • worker2

Docker Engine 1.12 or later

You must install Docker Engine on each one of the host machines. To use swarm mode, install the Docker Engine v1.12.0-rc1 or later from the Docker releases GitHub repository. Alternatively, install the latest Docker for Mac or Docker for Windows Beta.

Advisory: Some multi-node features may not work for Docker for Mac Beta and Docker for Windows Beta. We're working on the multi-node features for GA.

Verify that the Docker Engine daemon is running on each of the machines.

The IP address of the manager machine

The IP address must be assigned to an a network interface available to the host operating system. All nodes in the swarm must be able to access the manager at the IP address.

Tip: You can run ifconfig on Linux or Mac OS X to see a list of the available network interfaces.

The tutorial uses manager1 : 192.168.99.100.

Open ports between the hosts

  • TCP port 2377 for cluster management communications
  • TCP and UDP port 7946 for communication among nodes
  • TCP and UDP port 4789 for overlay network traffic

Tip: Docker recommends that every node in the cluster be on the same layer 3 (IP) subnet with all traffic permitted between nodes.

What's next?

After you have set up your environment, you're ready to create a swarm.