diff options
Diffstat (limited to 'devdocs/docker/engine%2Fswarm%2Fswarm-tutorial%2Findex.html')
| -rw-r--r-- | devdocs/docker/engine%2Fswarm%2Fswarm-tutorial%2Findex.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/devdocs/docker/engine%2Fswarm%2Fswarm-tutorial%2Findex.html b/devdocs/docker/engine%2Fswarm%2Fswarm-tutorial%2Findex.html new file mode 100644 index 00000000..5bde29d4 --- /dev/null +++ b/devdocs/docker/engine%2Fswarm%2Fswarm-tutorial%2Findex.html @@ -0,0 +1,13 @@ +<h1>Getting started with swarm mode</h1> + +<p>This tutorial introduces you to the features of Docker Engine Swarm mode. You may want to familiarize yourself with the <a href="../key-concepts/index">key concepts</a> before you begin.</p> <p>The tutorial guides you through the following activities:</p> <ul> <li>initializing a cluster of Docker Engines in swarm mode</li> <li>adding nodes to the swarm</li> <li>deploying application services to the swarm</li> <li>managing the swarm once you have everything running</li> </ul> <p>This tutorial uses Docker Engine CLI commands entered on the command line of a terminal window.</p> <p>If you are brand new to Docker, see <a href="../../index">About Docker Engine</a>.</p> <h2 id="set-up">Set up</h2> <p>To run this tutorial, you need the following:</p> <ul> <li><a href="#three-networked-host-machines">three Linux hosts which can communicate over a network, with Docker installed</a></li> <li><a href="#the-ip-address-of-the-manager-machine">the IP address of the manager machine</a></li> <li><a href="#open-protocols-and-ports-between-the-hosts">open ports between the hosts</a></li> </ul> <h3 id="three-networked-host-machines">Three networked host machines</h3> <p>This tutorial requires three Linux hosts which have Docker installed and can communicate over a network. These can be physical machines, virtual machines, Amazon EC2 instances, or hosted in some other way. Check out <a href="../../../get-started/swarm-deploy/index#prerequisites">Getting started - Swarms</a> for one possible set-up for the hosts.</p> <p>One of these machines is a manager (called <code class="language-plaintext highlighter-rouge">manager1</code>) and two of them are workers (<code class="language-plaintext highlighter-rouge">worker1</code> and <code class="language-plaintext highlighter-rouge">worker2</code>).</p> <blockquote> <p><strong>Note</strong>: You can follow many of the tutorial steps to test single-node swarm as well, in which case you need only one host. Multi-node commands do not work, but you can initialize a swarm, create services, and scale them.</p> </blockquote> <h4 id="install-docker-engine-on-linux-machines">Install Docker Engine on Linux machines</h4> <p>If you are using Linux based physical computers or cloud-provided computers as hosts, simply follow the <a href="../../install/index">Linux install instructions</a> for your platform. Spin up the three machines, and you are ready. You can test both single-node and multi-node swarm scenarios on Linux machines.</p> <h4 id="use-docker-desktop-for-mac-or-docker-desktop-for-windows">Use Docker Desktop for Mac or Docker Desktop for Windows</h4> <p>Alternatively, install the latest <a href="https://docs.docker.com/desktop/mac/">Docker Desktop for Mac</a> or <a href="https://docs.docker.com/desktop/windows/">Docker Desktop for Windows</a> application on one computer. You can test both single-node and multi-node swarm from this computer.</p> <ul> <li>You can use Docker Desktop for Mac or Windows to test <em>single-node</em> features of swarm mode, including initializing a swarm with a single node, creating services, and scaling services.</li> <li>Currently, you cannot use Docker Desktop for Mac or Docker Desktop for Windows alone to test a <em>multi-node</em> swarm, but many examples are applicable to a single-node Swarm setup.</li> </ul> <h3 id="the-ip-address-of-the-manager-machine">The IP address of the manager machine</h3> <p>The IP address must be assigned to a network interface available to the host operating system. All nodes in the swarm need to connect to the manager at the IP address.</p> <p>Because other nodes contact the manager node on its IP address, you should use a fixed IP address.</p> <p>You can run <code class="language-plaintext highlighter-rouge">ifconfig</code> on Linux or macOS to see a list of the available network interfaces.</p> <p>The tutorial uses <code class="language-plaintext highlighter-rouge">manager1</code> : <code class="language-plaintext highlighter-rouge">192.168.99.100</code>.</p> <h3 id="open-protocols-and-ports-between-the-hosts">Open protocols and ports between the hosts</h3> <p>The following ports must be available. On some systems, these ports are open by default.</p> <ul> <li> +<strong>TCP port 2377</strong> for cluster management communications</li> <li> +<strong>TCP</strong> and <strong>UDP port 7946</strong> for communication among nodes</li> <li> +<strong>UDP port 4789</strong> for overlay network traffic</li> </ul> <p>If you plan on creating an overlay network with encryption (<code class="language-plaintext highlighter-rouge">--opt encrypted</code>), you also need to ensure <strong>ip protocol 50</strong> (<strong>ESP</strong>) traffic is allowed.</p> <h2 id="whats-next">What’s next?</h2> <p>After you have set up your environment, you are ready to <a href="create-swarm/index">create a swarm</a>.</p> +<p><a href="https://docs.docker.com/search/?q=tutorial">tutorial</a>, <a href="https://docs.docker.com/search/?q=cluster%20management">cluster management</a>, <a href="https://docs.docker.com/search/?q=swarm%20mode">swarm mode</a></p> +<div class="_attribution"> + <p class="_attribution-p"> + © 2019 Docker, Inc.<br>Licensed under the Apache License, Version 2.0.<br>Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.<br>Docker, Inc. and other parties may also have trademark rights in other terms used herein.<br> + <a href="https://docs.docker.com/engine/swarm/swarm-tutorial/" class="_attribution-link">https://docs.docker.com/engine/swarm/swarm-tutorial/</a> + </p> +</div> |
