Commit Graph

26 Commits

Author SHA1 Message Date
Aaron Lehmann a0ccd0d42f 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>
2016-07-24 09:23:07 -07:00
Sebastiaan van Stijn 8e8580c680 Merge pull request #24960 from aaronlehmann/update-parallelism-docs
Update --update-parallelism docs
2016-07-23 10:35:34 +02:00
Aaron Lehmann 933ba8d7f7 Update --update-parallelism docs
Update documentation to account for the changes in #24952.

docs/swarm/swarm-tutorial/rolling-update.md doesn't need any changes,
but the CLI reference pages should show the current help text.
drain-node.md no longer needs to specify --update-parallelism 1 in its
example.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-07-22 19:07:10 -07:00
Sebastiaan van Stijn 987511712f Remove "secrets" leftovers from docs
f5e1f6f688 replaced "secrets"
with "join tokens", which also removed the "auto-accept"
policy.

This removes some remaining references to those features.

Note that there are other references, but those
are already addressed in another pull request.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-07-23 01:28:20 +02:00
Charles Smith 9ac145d736 updates get started with swarm to use join-token
Signed-off-by: Charles Smith <charles.smith@docker.com>
2016-07-21 19:53:54 -07:00
Charles Smith 68a9224bd4 clarify update-delay and rolling update behavior
Signed-off-by: Charles Smith <charles.smith@docker.com>
2016-07-20 10:11:04 -07:00
Charles Smith fec803f779 update create swarm and add nodes to use the auto-generated join command
Signed-off-by: Charles Smith <charles.smith@docker.com>
2016-07-14 11:26:46 -07:00
Vincent Demeester cc651bc642
Update service inspect --pretty reference docs
Update the output and fix wrong usage in a tutorial page.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-07-14 11:23:03 +02:00
Aaron Lehmann 6de8fcb2f2 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>
2016-07-13 19:31:05 -06:00
Vincent Demeester 1dbe3f6e89 Merge pull request #24565 from thaJeztah/fix-node-inspect-formatting
docs: fix output of node inspect
2016-07-13 18:57:05 +02:00
Vincent Demeester 92b1577871 Merge pull request #24562 from thaJeztah/carry-24499-swarm-info-consistency
[carry 24499] Remove "Yes"/"No" and use "true"/"false" consistently in `docker info`
2016-07-13 15:13:58 +02:00
Sebastiaan van Stijn 477a5f8fb0
docs: fix output of node inspect
The output uses tabs, but those don't
translate well to the rendered output in
the docs, so replacing the tabs with spaces.

Also updates the output, because REPLICATED,
and SPREAD are no longer all-caps in the
actual output.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-07-13 01:53:51 +02:00
Sebastiaan van Stijn ea365e4cb3
Make labels human readable
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-07-13 01:08:54 +02:00
Yong Tang 93fa7e7555 Fix a minor typo in swarm tutorial docs
This fix fixes a minor typo in swarm tutorial's delete service docs.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-07-12 05:00:39 -07:00
Tõnis Tiigi db67db98d8 Merge pull request #24349 from aaronlehmann/swarm-secrets-by-default
Generate a swarm joining secret if none is specified
2016-07-07 11:43:08 -07:00
Yong Tang 668b8a998f 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>
2016-07-06 20:23:53 -07:00
Aaron Lehmann 7342e42fce 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>
2016-07-06 13:04:50 -07:00
Sebastiaan van Stijn a26852223e
remove incorrect L3 recommendation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-07-01 18:13:29 -07:00
Charles Smith 0d6f59e85a remove margin from bottom of swarm mode docs
Signed-off-by: Charles Smith <charles.smith@docker.com>
2016-06-28 19:46:39 -07:00
Charles Smith 5f219806fc correct output description - only one task is running on manager
Signed-off-by: Charles Smith <charles.smith@docker.com>
2016-06-22 12:41:22 -07:00
bin liu 950073aabb fix some typos
Signed-off-by: bin liu <liubin0329@gmail.com>
2016-06-21 15:29:25 +08:00
Charles Smith 9499d5fd52 update cli commands output for rc1, revise key concepts
Signed-off-by: Charles Smith <charles.smith@docker.com>
2016-06-18 11:38:27 -07:00
Sven Dowideit bc033cb706 advisory can't be in the [menu] section
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2016-06-16 11:59:47 +00:00
Daniel Nephin 4df0349948 Change SCALE to REPLICAS.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-06-15 17:57:59 -04:00
Charles Smith 7b0c3066e3 update formatting for variables, clarify text in certain topics
Signed-off-by: Charles Smith <charles.smith@docker.com>
2016-06-14 16:35:40 -07:00
Charles Smith ea4fef2d87 add tutorial
Signed-off-by: Charles Smith <charles.smith@docker.com>
2016-06-13 22:17:15 -07:00