Commit Graph

329 Commits

Author SHA1 Message Date
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
8408e69f91 modify to improve code readability
Signed-off-by: WangPing <present.wp@icloud.com>

align

Signed-off-by: WangPing <present.wp@icloud.com>

align

Signed-off-by: WangPing <present.wp@icloud.com>
Upstream-commit: 713c7cd81e
Component: cli
2016-11-08 08:37:44 +08:00
d7a0039133 Merge pull request #28029 from tealtail/27994-add-service-ls-truncate-opt
remove COMMAND column from `service ls` output. closes #27994
Upstream-commit: 6780c318a3
Component: cli
2016-11-07 14:39:16 -08:00
00e143bdae Merge pull request #25974 from kunalkushwaha/mount-add
correct handling of volumes while service update.
Upstream-commit: 7a50218855
Component: cli
2016-11-07 10:34:22 -08:00
cd9759a86e Merge pull request #25983 from jhorwit2/jah/ps-refactor
Add -a option to service/node ps
Upstream-commit: dd33c288ec
Component: cli
2016-11-07 17:33:10 +01:00
3c2e5c3d64 remove COMMAND column from service ls output. closes #27994
Signed-off-by: Alicia Lauerman <alicia@eta.im>
Upstream-commit: 1491ae50e0
Component: cli
2016-11-06 13:32:44 -05:00
0ee62b4e2a Add -a option to service/node ps
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: 21096cfc05
Component: cli
2016-11-06 07:40:39 -05:00
a5f114fa85 Merge pull request #28010 from vieux/fix_experimental_client
always add but hide experimental cmds and flags
Upstream-commit: db706f3c38
Component: cli
2016-11-04 13:49:19 -07:00
75f0b0b043 update cobra and use Tags
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 1e10649f55
Component: cli
2016-11-04 12:04:14 -07:00
a3b971ce93 cli/info: fix seccomp warning
also reword seccomp warning around default seccomp profile

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: b338ab7c41
Component: cli
2016-11-04 19:25:51 +01:00
9739850eeb Add --cpus flag to control cpu resources
This fix tries to address the proposal raised in 27921 and add
`--cpus` flag for `docker run/create`.

Basically, `--cpus` will allow user to specify a number (possibly partial)
about how many CPUs the container will use. For example, on a 2-CPU system
`--cpus 1.5` means the container will take 75% (1.5/2) of the CPU share.

This fix adds a `NanoCPUs` field to `HostConfig` since swarmkit alreay
have a concept of NanoCPUs for tasks. The `--cpus` flag will translate
the number into reused `NanoCPUs` to be consistent.

This fix adds integration tests to cover the changes.

Related docs (`docker run` and Remote APIs) have been updated.

This fix fixes 27921.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1cab3b32a6
Component: cli
2016-11-04 09:43:10 -07:00
21ad2b2908 Merge pull request #26276 from runcom/seccomp-conf
daemon: add a flag to override the default seccomp profile
Upstream-commit: 4758d72fa3
Component: cli
2016-11-04 15:45:30 +00:00
2584223dc2 Merge pull request #27857 from vasil-yordanov/docker-service-hostname-2
Adding the hostname option to docker service command
Upstream-commit: 38a582f54c
Component: cli
2016-11-04 15:22:55 +01:00
b55edf2aaf Merge pull request #28045 from vincentbernat/fix/inspect-short-description
cli: shorten description of "inspect" subcommand
Upstream-commit: 36e659c019
Component: cli
2016-11-04 08:15:49 +01:00