Commit Graph

19 Commits

Author SHA1 Message Date
Victor Vieux 55908f8a82 refactor help func in CLI
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-17 10:54:10 -08:00
Aaron Lehmann fd5673eeb9 cli: Change autolock flag description
This change incorporates feedback from @thaJeztah in the PR that added
the autolock flag. It changes the descriptions to be different for
"swarm init" and "swarm update" so that the boolean nature so that the
purpose of the flag in both contexts is clearer.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-10 12:05:19 -08:00
Andrew Hsu dc32cb6c77 use "golang.org/x/net/context" instead of "context"
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2016-11-10 08:23:19 -08:00
Aaron Lehmann 65e1e166ee Add unlock key rotation
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-09 16:09:01 -08:00
Aaron Lehmann 56b7ad90b1 Revise swarm init/update flags, add unlocking capability
- Neither swarm init or swarm update should take an unlock key
- Add an autolock flag to turn on autolock
- Make the necessary docker api changes
- Add SwarmGetUnlockKey API call and use it when turning on autolock
- Add swarm unlock-key subcommand

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-09 16:09:00 -08:00
Tonis Tiigi d006a04357 Add support for swarm init lock and swarm unlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-11-09 16:09:00 -08:00
Vincent Demeester a11f7b1577 Merge pull request #28196 from allencloud/add-short-flag-for-force
add short flag for force
2016-11-09 18:11:58 +01:00
milindchawre e87262cc2d Fixes #24083 : Improving cli help for flags with duration option
Signed-off-by: milindchawre <milindchawre@gmail.com>
2016-11-09 12:17:28 +00:00
Vincent Demeester 01de03c7d0 Merge pull request #27997 from aaronlehmann/raft-options
cli: Add options for Raft snapshotting
2016-11-09 10:19:45 +01:00
allencloud 31c5b957e2 add short flag for force
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-09 14:40:47 +08:00
Aaron Lehmann 2af34ea285 cli: Add options for Raft snapshotting
Add the following options to "swarm init" and "swarm update":

- --max-snapshots: Retain this many old Raft snapshots in addition
  to the latest one

- --snapshot-interval: Number of log entries between Raft snapshots

These options already existed in SwarmKit and the Docker API but were
never exposed in the CLI. I'm adding them here to fix this oversight.

--max-snapshots may be useful for debugging purposes and more
conservative users who want to store rolling backups of old versions of
the Raft state.

--snapshot-interval is most useful for performance tuning. The default
value of 10000 may not be ideal for some setups.

There is also a LogEntriesForSlowFollowers option that is not exposed. I
decided not to expose it along with these others because I don't think
it's generally useful (and I'm not sure what I would call the CLI flag).
But if people want, I can expose it for the sake of completeness.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-08 13:14:01 -08:00
Victor Vieux 4ae7176ffb always add but hide experimental cmds and flags
Signed-off-by: Victor Vieux <vieux@docker.com>

update cobra and use Tags

Signed-off-by: Victor Vieux <vieux@docker.com>

allow client to talk to an older server

Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-08 04:55:27 -08:00
yuexiao-wang 3acdab83fb Remove some redundant consts
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-11-02 16:42:42 +08:00
Qiang Huang faac177285 Fix bunch of typos
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-10-29 15:03:26 +08:00
allencloud f2a6d37388 change join node role judge
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-10-19 19:47:42 +08:00
Yong Tang e0f229d2ca Let swarmkit handle cluster defaults in `swarm init` if not specified
This fix tries to address the issue raised in 24958 where previously
`docker swarm init` will automatically fill in all the default value
(instead of letting swarmkit to handle the default).

This fix update the `swarm init` so that initial value are passed only
when a flag change has been detected.

This fix fixes 24958.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-27 04:19:38 -07:00
Misty Stanley-Jones bfbdb15f55 Clarify usage of --force when used on a swarm manager
Fixes #26125

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2016-09-21 13:05:33 -07:00
Daniel Nephin 1f0f7ecb5a Only hide commands if the env variable is set.
Better formatting for usage template.
Group commands in usage to management/operation commands.
Remove the word Docker from the description of management commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-19 13:28:15 -04:00
Daniel Nephin 3bd1eb4b76 Move api/client -> cli/command
Using
  gomvpkg
     -from github.com/docker/docker/api/client
     -to github.com/docker/docker/cli/command
     -vcs_mv_cmd 'git mv {{.Src}} {{.Dst}}'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-08 15:46:29 -04:00