The relation between “docker/swarm” and “docker/sw

2019-01-18 14:06发布

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?

2条回答
欢心
2楼-- · 2019-01-18 14:58

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.

查看更多
不美不萌又怎样
3楼-- · 2019-01-18 15:06

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/

查看更多
登录 后发表回答