Commit Graph

21 Commits (78cc1b2b6ab9da88899ddcb3eb8f56a9468eb73c)

Author SHA1 Message Date
Misty Stanley-Jones e63e3d9fdf Sanitize uses of Swarm as a proper and improper noun
Fixes #24905

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2017-06-02 00:10:09 +00:00
Sebastiaan van Stijn 231703c3c6 Improve swarm join-token instructions
this change improves the instructions for
swarm join-token and swarm init;

- only print the join-token command for workers
  instead of for both managers and workers, to
  prevent users from copying the wrong command.
  An extra line is added to explain how to obtain
  the manager token.
- print a message that a token was rotated
  sucesfully if '--rotate' is used.
- add some extra white-space before / after
  the join commands, to make copy/pasting
  easier.

this change also does some refactoring of join-token;

- move flagname-constants together with other constants
- use variables for selected role ("worker" / "manager")
  to prevent checking for them multiple times, and to
  keep the "worker" / "manager" sting centralized
- add an extra blank line after "join-token" instructions
  this makes it easier to copy, and cleans up the
  code a tiny bit

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:10:03 +00:00
Sebastiaan van Stijn ddc2f8b05a Update usage of "Swarm" for consistency
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:10:03 +00:00
Sebastiaan van Stijn 00a430d255 Remove release-candidate advisories
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:10:03 +00:00
Aaron Lehmann 1918ec3987 Require listen address and advertise address to be an IP address or an interface name
Hostnames are not supported for now because libnetwork can't use them
for overlay networking yet.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-06-02 00:10:02 +00:00
Aaron Lehmann 18cd5ac352 Split advertised address from listen address
There are currently problems with "swarm init" and "swarm join" when an
explicit --listen-addr flag is not provided. swarmkit defaults to
finding the IP address associated with the default route, and in cloud
setups this is often the wrong choice.

Introduce a notion of "advertised address", with the client flag
--advertise-addr, and the daemon flag --swarm-default-advertise-addr to
provide a default. The default listening address is now 0.0.0.0, but a
valid advertised address must be detected or specified.

If no explicit advertised address is specified, error out if there is
more than one usable candidate IP address on the system. This requires a
user to explicitly choose instead of letting swarmkit make the wrong
choice. For the purposes of this autodetection, we ignore certain
interfaces that are unlikely to be relevant (currently docker*).

The user is also required to choose a listen address on swarm init if
they specify an explicit advertise address that is a hostname or an IP
address that's not local to the system. This is a requirement for
overlay networking.

Also support specifying interface names to --listen-addr,
--advertise-addr, and the daemon flag --swarm-default-advertise-addr.
This will fail if the interface has multiple IP addresses (unless it has
a single IPv4 address and a single IPv6 address - then we resolve the
tie in favor of IPv4).

This change also exposes the node's externally-reachable address in
docker info, as requested by #24017.

Make corresponding API and CLI docs changes.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-06-02 00:10:02 +00:00
Vincent Demeester 871366c8b4 Update swarm init task-history-limit docs
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-02 00:10:02 +00:00
Aaron Lehmann acf0bc4b9a Replace secrets with join tokens
Implement the proposal from
https://github.com/docker/docker/issues/24430#issuecomment-233100121

Removes acceptance policy and secret in favor of an automatically
generated join token that combines the secret, CA hash, and
manager/worker role into a single opaque string.

Adds a docker swarm join-token subcommand to inspect and rotate the
tokens.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-06-02 00:10:02 +00:00
Aaron Lehmann 1210363e0f Use spaces, not tabs, to format sample "swarm join" command
Using tabs here seems to cause copy/paste problems in some terminals.
Using spaces is safer.

Fixes #24609

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-06-02 00:07:50 +00:00
Sebastiaan van Stijn 9958abc17d Add "auto-accept=none" to documentation
The "none" option was not added to the documentation.
This adds an example, and adds additional information
on manually accepting or rejecting a node.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:50 +00:00
johnharris85 2f3e095768 Add support for comma-separated --auto-accept syntax.
Signed-off-by: John Harris <john@johnharris.io>
2017-06-02 00:07:49 +00:00
Vincent Demeester 3ebe3fe752 Updates on cli reference documentation
- Update ps with `--last` flag
- Update commands with current output
- Make sure hugo does not detect the wrong language
- Update usage for `tag` command to be more coherent with the other ones

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-02 00:07:49 +00:00
Aaron Lehmann e632408a37 Generate a swarm joining secret if none is specified
The current behavior of `docker swarm init` is to set up a swarm that
has no secret for joining, and does not require manual acceptance for
workers. Since workers may sometimes receive sensitive data such as pull
credentials, it makes sense to harden the defaults.

This change makes `docker swarm init` generate a random secret if none
is provided, and print it to the terminal. This secret will be needed to
join workers or managers to the swarm. In addition to improving access
control to the cluster, this setup removes an avenue for
denial-of-service attacks, since the secret is necessary to even create
an entry in the node list.

`docker swarm init --secret ""` will set up a swarm without a secret,
matching the old behavior. `docker swarm update --secret ""` removes the
automatically generated secret after `docker swarm init`.

Closes #23785

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-06-02 00:07:49 +00:00
Yong Tang cab7139a4b Change NAME to HOSTNAME in docs for `docker node ls`
In #24159, the title field of `docker node ls` has been
changed from NAME to HOSTNAME. However, in the docs the
NAMEs are still used for the output of `docker node ls`.

This fix updates docs so that NAME field is changed to
HOSTNAME for all `docker node ls`.

This fix is related to #24159 and #24090.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:07:48 +00:00
Otto Kekäläinen 8e2c3efc58 Fix spelling in comments, strings and documentation
Signed-off-by: Otto Kekäläinen <otto@seravo.fi>
2017-06-02 00:07:48 +00:00
Aaron Lehmann ca0240f9c2 Fix --auto-accept documentation
The --auto-accept documentation currently says that both worker and
manager nodes are automatically accepted by default. Correct it.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-06-02 00:07:47 +00:00
Aaron Lehmann 4721039d71 Add documentation for external CA features in API/CLI
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-06-02 00:07:47 +00:00
Charles Smith 87591ae9b7 update docker swarm cli
Signed-off-by: Charles Smith <charles.smith@docker.com>
2017-06-02 00:07:45 +00:00
Sven Dowideit b6bfe363f8 Add the advisory=rc metadata
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:07:45 +00:00
Sebastiaan van Stijn 7b22dbd02a remove "RC" warning from Markdown files
A site-wide banner is going to be used, so we don't need this warning

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:45 +00:00
Amit Shukla 593ee1e29d CLI docs
Signed-off-by: Amit Shukla <amit.shukla@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-02 00:07:43 +00:00