Source repo for Docker's Documentation
Go to file
Tianon Gravi 27198c1fca Add "sudo: false" so we get the faster Docker-based workers
Signed-off-by: Andrew Page <admwiggin@gmail.com>
2014-12-16 12:24:10 -07:00
api log.Println -> log.Debugf 2014-12-12 21:37:06 +00:00
cluster Merge pull request #167 from vieux/update_watch 2014-12-12 17:10:38 -08:00
contrib update demo with 'node' 2014-11-21 22:18:09 +00:00
discovery remove useless create fct 2014-12-13 01:21:38 +00:00
scheduler nitpick 2014-12-13 00:56:37 +00:00
.gitignore improve locks 2014-11-18 23:04:11 +00:00
.godir update .godir 2014-11-18 21:47:00 +00:00
.travis.yml Add "sudo: false" so we get the faster Docker-based workers 2014-12-16 12:24:10 -07:00
CONTRIBUTING.md Add Contributing doc 2014-12-07 00:54:19 +00:00
Dockerfile fix package name 2014-11-18 21:40:38 +00:00
LICENSE add license 2014-11-18 03:19:37 +00:00
README.md Merge pull request #164 from vieux/discovery 2014-12-12 12:04:47 -08:00
ROADMAP.md update ROADMAP.md 2014-12-12 18:50:56 +00:00
flags.go add --strategy to choose the strategy to use 2014-12-12 23:57:27 +00:00
join.go Initialize in the interface 2014-12-11 23:23:10 +00:00
logo.png smaller logo 2014-12-03 11:47:55 +01:00
main.go fix swarm create 2014-12-13 21:10:29 +00:00
manage.go Merge pull request #167 from vieux/update_watch 2014-12-12 17:10:38 -08:00

README.md

Swarm: a Docker-native clustering system Build Status

Docker Swarm Logo

swarm is a simple tool which controls a cluster of Docker hosts and exposes it as a single "virtual" host.

swarm uses the standard Docker API as its frontend, which means any tool which speaks Docker can control swarm transparently: dokku, fig, krane, flynn, deis, docker-ui, shipyard, drone.io, Jenkins... and of course the Docker client itself.

Like the other Docker projects, swarm follows the "batteries included but removable" principle. It ships with a simple scheduling backend out of the box. The goal is to provide a smooth out-of-box experience for simple use cases, and allow swapping in more powerful backends, like Mesos, for large scale production deployments.

Installation

######1 - Download and install the current source code.

go get -u github.com/docker/swarm

######2 - Nodes setup The only requirement for Swarm nodes is to run a regular Docker daemon (version 1.4.0 and later).

In order for Swarm to be able to communicate with its nodes, they must bind on a network interface. This can be achieved by starting Docker with the -H flag (e.g. -H 0.0.0.0:2375).

Example usage

# create a cluster
$ swarm create
6856663cdefdec325839a4b7e1de38e8

# on each of your nodes, start the swarm agent
#  <node_ip> doesn't have to be public (eg. 192.168.0.X),
#  as long as the other nodes can reach it, it is fine.
$ swarm join --discovery token://6856663cdefdec325839a4b7e1de38e8 --addr=<node_ip:2375>

# start the manager on any machine or your laptop
$ swarm manage --discovery token://6856663cdefdec325839a4b7e1de38e8 --addr=<swarm_ip:swarm_port>

# use the regular docker cli
$ docker -H <swarm_ip:swarm_port> info
$ docker -H <swarm_ip:swarm_port> run ... 
$ docker -H <swarm_ip:swarm_port> ps 
$ docker -H <swarm_ip:swarm_port> logs ...
...

# list nodes in your cluster
$ swarm list --discovery token://6856663cdefdec325839a4b7e1de38e8
http://<node_ip:2375>

See here for more information about other discovery services.

TLS

Swarm supports TLS authentication between the CLI and Swarm but also between Swarm and the Docker nodes.

In order to enable TLS, the same command line options as Docker can be specified:

swarm manage --tlsverify --tlscacert=<CACERT> --tlscert=<CERT> --tlskey=<KEY> [...]

Please refer to the Docker documentation for more information on how to set up TLS authentication on Docker and generating the certificates.

Note that Swarm certificates must be generated withextendedKeyUsage = clientAuth,serverAuth.

Participating

We welcome pull requests and patches; come say hi on IRC, #docker-swarm on freenode.

Creators

Andrea Luzzardi

Victor Vieux

Code and documentation copyright 2014 Docker, inc. Code released under the Apache 2.0 license. Docs released under Creative commons.