Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The relation between "docker/swarm" and "docker/swarmkit"

I am already familiar with docker/swarm, but find there occurs a "new" project: docker/swarmkit. But unfortunately, after reading the README, I still can't figure out what is the function of docker/swarmkit. Could anyoone help to elaborate the relations between docker/swarm and docker/swarmkit? Why is docker/swarmkit born?

like image 958
Nan Xiao Avatar asked Jul 20 '16 07:07

Nan Xiao


People also ask

What is the difference between docker and docker Swarm?

The difference between Docker Swarm and Docker Compose is that Compose is used for configuring multiple containers in the same host. Docker Swarm is different in that it is a container orchestration tool. This means that Docker Swarm lets you connect containers to multiple hosts similar to Kubernetes.

Is Docker compose and docker swarm the same?

Docker Compose is used for configuring and starting multiple Docker containers on the same host–so you don't have to start each container separately. Docker swarm is a container orchestration tool that allows you to run and connect containers on multiple hosts.

Is docker swarm part of docker?

Docker Swarm mode is built into the Docker Engine.

What is the main difference between docker docker swarm and Kubernatees k8's?

Docker Swarm is a lightweight, easy-to-use orchestration tool with limited offerings compared to Kubernetes. In contrast, Kubernetes is complex but powerful and provides self-healing, auto-scaling capabilities out of the box.


2 Answers

Docker Swarm is an older (2014) Docker native orchestration tool. It is standalone from the Docker engine and serves to connect Docker engines together to form a cluster. It's then possible to connect to the Swarm and run containers on the cluster. Swarm has a few features:

  • Allows you to specify a discovery service (consul etc...)
  • Some control over where containers are placed (using filters / constraints / distribution strategies, etc...)
  • Exposes the same API as the Docker engine itself, allowing 3rd-party tools to interact seamlessly

Swarmkit is a new (2016) tool developed by the Docker team (most of which came out of the SocketPlane acquisition I believe) which provides functionality for running a cluster and distributing tasks (note: not necessarily Docker containers) to the machines in the cluster. The readme for Swarmkit is very good, and here are the main features as advertised:

  • Distributed: SwarmKit uses the Raft Consensus Algorithm in order to coordinate and does not rely on a single point of failure to perform decisions.
  • Secure: Node communication and membership within a Swarm are secure out of the box. SwarmKit uses mutual TLS for node authentication, role authorization and transport encryption, automating both certificate issuance and rotation.
  • Simple: SwarmKit is operationally simple and minimizes infrastructure dependencies. It does not need an external database to operate.

Docker Swarm Mode (Version 1.12 >) uses Swarmkit libraries & functionality in order to make container orchestration over multiple hosts (a cluster) very simple & secure to operate. There is a new set of features (the main one being docker swarm) which are now built into Docker itself to allow you to initiate a new Swarm and deploy tasks (which are Docker containers in this case, but don't have to be, see Swarmkit above) to that cluster.

As mentioned on the Docker Swarm page, it is not being deprecated, and is still a viable method for Docker multi-host orchestration, but Docker Swarm Mode (which uses the Swarmkit libraries under the hood) is the recommended way to begin a new Docker project where orchestration over multiple hosts is required.

like image 125
johnharris85 Avatar answered Nov 16 '22 03:11

johnharris85


As per this blog :

Swarmkit used within Swarm Mode ( 1.12) and tightly integrated with Docker Engine

https://sreeninet.wordpress.com/2016/07/14/comparing-swarm-swarmkit-and-swarm-mode/

like image 31
atv Avatar answered Nov 16 '22 01:11

atv