docker/swarm — pull request #164 by vieux (2014-12-11 00:50:28+00:00)
Title: Discovery Service backends token/etcd/file

This is an initial version, feel free to comment.

Replace the `--token` flag by a more generic `--discovery` flag supporting multiple backends. See README.md for more info.

token
-------
Basic usage: `--discovery token://XXXXXXXXXX` (replace `--token XXXXXXXXXX`) works for both `join` and `manage`
you can also use your own service implementing our discovery api: `--discovery discovery://example.com:5000/XXXXXXXXXX`

etcd
-----
If you already have your own etcd, you can use it with `--discovery etcd://example.com:5001/XXXXXXXXXX`
in both `join` and `manage`

file
----
You can also use a static file describing your cluster like this
```
192.168.0.1:2575
192.168.0.2:2575
192.168.0.3:2575
```

Then use `--discovery file://path/to/file`.
In this static setup, join makes no sense, so you only have to use this in `manage`

Note: `swarm create` make sense only when you are using `token://`