Book Image

Native Docker Clustering with Swarm

By : Fabrizio Soppelsa, Chanwit Kaewkasi
Book Image

Native Docker Clustering with Swarm

By: Fabrizio Soppelsa, Chanwit Kaewkasi

Overview of this book

Docker Swarm serves as one of the crucial components of the Docker ecosystem and offers a native solution for you to orchestrate containers. It’s turning out to be one of the preferred choices for Docker clustering thanks to its recent improvements. This book covers Swarm, Swarm Mode, and SwarmKit. It gives you a guided tour on how Swarm works and how to work with Swarm. It describes how to set up local test installations and then moves to huge distributed infrastructures. You will be shown how Swarm works internally, what’s new in Swarmkit, how to automate big Swarm deployments, and how to configure and operate a Swarm cluster on the public and private cloud. This book will teach you how to meet the challenge of deploying massive production-ready applications and a huge number of containers on Swarm. You'll also cover advanced topics that include volumes, scheduling, a Libnetwork deep dive, security, and platform scalability.
Table of Contents (18 chapters)
Native Docker Clustering with Swarm
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Dedication
Preface

Docker Swarm standalone


In standalone mode, cluster operations need to be done directly inside the container swarm.

In this chapter, we are not going to cover every option in detail. Swarm v1 will be deprecated soon, as it has already been declared obsolete by Swarm Mode.

The commands to administer a Docker Swarm standalone cluster are as follows:

  • Create (c): As we saw in Chapter 1, Welcome to Docker Swarm this is how we can generate the UUID token, in case the token mechanism is going to be used. Typically, in production, people use Consul or Etcd, so this command has no relevance for production.

  • List (l): This shows the list of cluster nodes based on an iteration through Consul or Etcd, that is, the Consul or Etcd must be passed as an argument.

  • Join (j): Joins the node on which the swarm container is running to the cluster. Here, we need to pass a discovery mechanism at the command line.

  • Manage (m): This is the core of the Standalone mode. Managing a cluster deals with changing cluster properties...