Commit Graph

234 Commits

Author SHA1 Message Date
f93e810a9b Add unlock key rotation
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 65e1e166ee
Component: cli
2016-11-09 16:09:01 -08:00
c3469cb075 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>
Upstream-commit: 56b7ad90b1
Component: cli
2016-11-09 16:09:00 -08:00
fc02a64b8c Add support for swarm init lock and swarm unlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d006a04357
Component: cli
2016-11-09 16:09:00 -08:00
b1a6be626a use human readable units when listing secrets
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 06666a5a23
Component: cli
2016-11-09 14:27:46 -05:00
832247227c more review updates
- return err instead of wrap for update secret
- add omitempty for data in secret spec

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: c7d7b50003
Component: cli
2016-11-09 14:27:45 -05:00
00bf1d223d SecretRequestOptions -> SecretRequestOption
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 0dc9115006
Component: cli
2016-11-09 14:27:45 -05:00
46910777dc support labels for secrets upon creation; review updates
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 0bda23ec2b
Component: cli
2016-11-09 14:27:45 -05:00
8fd729c7c9 secrets: support simple syntax --secret foo
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: b3bbcc1ba6
Component: cli
2016-11-09 14:27:45 -05:00
b5d5eec781 review updates
- use Filters instead of Filter for secret list
- UID, GID -> string
- getSecrets -> getSecretsByName
- updated test case for secrets with better source
- use golang.org/x/context instead of context
- for grpc conversion allocate with make
- check for nil with task.Spec.GetContainer()

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 9074333957
Component: cli
2016-11-09 14:27:45 -05:00
7fac7dc9cb move secretopt to opts pkg
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 91c08eab93
Component: cli
2016-11-09 14:27:45 -05:00
4cba6b316c secrets: enable secret inspect and rm by secret name
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: d22e1a91f6
Component: cli
2016-11-09 14:27:45 -05:00
dfef330ccc secrets: use explicit format when using secrets
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 15b97a39d7
Component: cli
2016-11-09 14:27:44 -05:00
852ef98676 update to support new target in swarmkit
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 2b0fa52c09
Component: cli
2016-11-09 14:27:44 -05:00
2983ce883c simplify secret lookup on service create
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 6bbc35a743
Component: cli
2016-11-09 14:27:44 -05:00
9c66350efe support the same secret with different targets on service create
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: ab5f829742
Component: cli
2016-11-09 14:27:44 -05:00
41cabcef6d add secret support for service update
- add nosuid and noexec to tmpfs

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 8554b64b99
Component: cli
2016-11-09 14:27:44 -05:00
89698b2350 more review updates
- use /secrets for swarm secret create route
- do not specify omitempty for secret and secret reference
- simplify lookup for secret ids
- do not use pointer for secret grpc conversion

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 4e8f1a7dd9
Component: cli
2016-11-09 14:27:43 -05:00
7158215706 review changes
- fix lint issues
- use errors pkg for wrapping errors
- cleanup on error when setting up secrets mount
- fix erroneous import
- remove unneeded switch for secret reference mode
- return single mount for secrets instead of slice

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 3f9494f1d6
Component: cli
2016-11-09 14:27:43 -05:00
a0307eb205 secrets: secret management for swarm
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: use tmpfs for swarm secrets

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: inject secrets from swarm secret store

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: use secret names in cli for service create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

switch to use mounts instead of volumes

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vendor: use ehazlett swarmkit

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: finish secret update

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 1be644fbcf
Component: cli
2016-11-09 14:27:43 -05:00
a3f4ca2ca6 Merge pull request #28196 from allencloud/add-short-flag-for-force
add short flag for force
Upstream-commit: a11f7b1577
Component: cli
2016-11-09 18:11:58 +01:00
7ca2ab3891 Merge pull request #28163 from yongtang/11082016-help-ptr
Remove `-ptr` from the help output of `service create`
Upstream-commit: 45f8ef1668
Component: cli
2016-11-09 17:53:06 +01:00
d1e699cd15 Merge pull request #27947 from milindchawre/fix_27798
Fixes #27798 : Update help for --blkio-weight parameter
Upstream-commit: 2332454882
Component: cli
2016-11-09 15:35:38 +01:00
02d5b85d62 Merge pull request #28201 from yuexiao-wang/test-func
Update function name for TestCalculBlockIO
Upstream-commit: fbbc2d3a6d
Component: cli
2016-11-09 15:34:25 +01:00
180746c100 Remove -ptr from the help output of service create
This fix is based on the comment:
https://github.com/docker/docker/pull/28147#discussion_r86996347

Previously the output string of the `DurationOpt` is `duration-ptr`
and `Uint64Opt` is `uint64-ptr`. While it is clear to developers,
for a normal user `-ptr` might not be very informative.

On the other hand, the default value of `DurationOpt` and `Uint64Opt`
has already been quite informative: `none`. That means if no flag
provided, the value will be treated as none.
(like a ptr with nil as the default)

For that reason this fix removes the `-ptr`.

Also, the output in the docs of `service create` has been quite
out-of-sync with the true output. So this fix updates the docs
to have the most up-to-date help output of `service create --help`.

This fix is related to #28147.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 071c746e5e
Component: cli
2016-11-09 06:30:10 -08:00
19b738db2f Fixes #24083 : Improving cli help for flags with duration option
Signed-off-by: milindchawre <milindchawre@gmail.com>
Upstream-commit: e87262cc2d
Component: cli
2016-11-09 12:17:28 +00:00
cc55a23f4c Update function name for TestCalculBlockIO
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 18caa28b66
Component: cli
2016-11-09 17:43:10 +08:00
f3e7972551 Merge pull request #27997 from aaronlehmann/raft-options
cli: Add options for Raft snapshotting
Upstream-commit: 01de03c7d0
Component: cli
2016-11-09 10:19:45 +01:00
24e894456a add short flag for force
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 31c5b957e2
Component: cli
2016-11-09 14:40:47 +08:00
e7af1d5c1a Merge pull request #27745 from vieux/cli_backward_compose_api
allow client to talk to an older server
Upstream-commit: 7fe223b68b
Component: cli
2016-11-08 18:27:23 -08:00
c0453187a0 Merge pull request #28088 from aluzzardi/service-ps-task-resolution
service ps: Truncate Task IDs
Upstream-commit: 3f839084b0
Component: cli
2016-11-08 17:44:15 -08:00
be2c97f102 Merge pull request #27567 from yongtang/24391-dns-setting
Add custom DNS settings to service definition
Upstream-commit: f0c8571e5f
Component: cli
2016-11-08 17:43:00 -08:00
a0d17c1ef5 service ps: Truncate Task IDs
- Refactored to move resolution code into the idresolver
- Made `ps` output more bearable by shortening service IDs in task names

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 5834d378e0
Component: cli
2016-11-08 16:17:15 -08:00
a0661a2e11 Merge pull request #27992 from Microsoft/jjh/minapitoinfo
Adds `MinAPIVersion` to docker version
Upstream-commit: 086c47f5ee
Component: cli
2016-11-08 15:49:33 -08:00
1c91091ad7 Add custom DNS settings to service update
This fix adds `--dns-add`, `--dns-rm`, `--dns-opt-add`, `--dns-opt-rm`,
`--dns-search-add` and `--dns-search-rm` to `service update`.

An integration test and a unit test have been added to cover the changes in this fix.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 49e528e18a
Component: cli
2016-11-08 15:41:32 -08:00
e9737d7202 Add custom DNS settings to service definition
This fix tries to fix the issue raised in 24391 about allowing
custom DNS settings to service definition.

This fix adds `DNSConfig` (`Nameservers`, `Options`, `Search`) to
service definition, as well as `--dns`, `--dns-opt`, and `dns-search`
to `service create`.

An integration test has been added to cover the changes in this fix.

This fix fixes 24391.

A PR in swarmkit will be created separately.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f40b12d0f7
Component: cli
2016-11-08 15:41:32 -08:00
3504a807b2 Merge pull request #28142 from vieux/plugin_install_args
support settings in docker plugins install
Upstream-commit: a3d806f0bb
Component: cli
2016-11-08 15:05:39 -08:00
57632533c4 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>
Upstream-commit: 2af34ea285
Component: cli
2016-11-08 13:14:01 -08:00
6e1ba7621a Merge pull request #28147 from yongtang/27567-service-update-docs-plural-form
Change to plural forms for help output of `docker service update`
Upstream-commit: 772dfcbeb1
Component: cli
2016-11-08 11:14:40 -08:00
10781d5340 Merge pull request #27710 from allencloud/show-num-for-global-service-in-service-ls
support show numbers of global service in service ls command
Upstream-commit: b04bb19101
Component: cli
2016-11-08 18:43:53 +01:00
36d1732f95 Change to plural forms for help output of docker service update
This fix is based on the comment in
https://github.com/docker/docker/pull/27567#discussion_r86910604

Basically, in the help output of `docker service update`, the `--xxx-add`
flags typically have plural forms while `--xxx-rm` flags have singular
forms.

This fix updates the help output for consistency.

This fix also updates the related docs in `service_update.md`.
The help output in `service_update.md` has been quite out-of-sync
with the actual output so this fix replaces the output with the
most up-to-date output.

This fix is related to #27567.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: af8ebf69db
Component: cli
2016-11-08 05:53:56 -08:00
7892a4e960 Merge pull request #28157 from yuexiao-wang/update-checkpoint
Update for docker checkpoint
Upstream-commit: c82d5e3c56
Component: cli
2016-11-08 22:36:22 +09:00
307edac963 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>
Upstream-commit: 4ae7176ffb
Component: cli
2016-11-08 04:55:27 -08:00
82c7b8040e Merge pull request #28153 from YuPengZTE/devCtx
context.Context should be the first parameter of a function
Upstream-commit: 544b21fb65
Component: cli
2016-11-08 12:40:32 +01:00
9670705c94 Update for docker checkpoint
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: cd2269a456
Component: cli
2016-11-08 16:56:29 +08:00
a01a81cf98 Merge pull request #28117 from ping035627/ping035627-patch-1107
Modify to improve code readability
Upstream-commit: 6edfb7558f
Component: cli
2016-11-08 09:44:45 +01:00
66ece30c85 support show numbers of global service in service ls command
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 7891d349b3
Component: cli
2016-11-08 16:17:15 +08:00
4cd3911d13 context.Context should be the first parameter of a function
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: 7113bbf2c6
Component: cli
2016-11-08 14:51:17 +08:00
89bd4a499a support settings in docker plugins install
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 41513e3051
Component: cli
2016-11-07 22:49:22 -08:00
ffad23ed73 Adds minimum API version to version
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 089b33edd8
Component: cli
2016-11-07 21:20:00 -08:00
1fe9a67a27 Add --tty to docker service create/update
This fix tries to add `--tty` to `docker service create/update`. As was
specified in 25644, `TTY` flag has been added to SwarmKit and is
already vendored.

This fix add `--tty` to `docker service create/update`.

Related document has been updated.

Additional integration tests has been added.

This fix fixes 25644.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3baa727ed1
Component: cli
2016-11-07 16:42:32 -08:00