Commit Graph

79 Commits

Author SHA1 Message Date
668bff0dea Revert "Add -a option to service/node ps"
This reverts commit 139fff2bf0ebe12b61871ba8ec8be8d51c2338db.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6ffb62368a
Component: cli
2016-11-28 18:08:45 +01:00
7cd5e53254 Merge pull request #28780 from vieux/accept_src_in_secret
support src in --secret
Upstream-commit: a0f447d124
Component: cli
2016-11-26 14:34:30 +01:00
527b0ad302 Allow hostname to be updated on service.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c40696023b
Component: cli
2016-11-24 15:44:35 -05:00
e2c24e804b support src in --secret
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: dc5c8a7713
Component: cli
2016-11-23 14:30:57 -08:00
38b13e5bfa Merge pull request #28328 from aaronlehmann/duration-opts
cli: Add valid suffixes for remaining duration options
Upstream-commit: 07c896b18e
Component: cli
2016-11-21 14:03:00 -08:00
60606c230f Merge pull request #28556 from ehazlett/container-secret-store
Fix target reference secrets and container secret store
Upstream-commit: 2d7ef04a57
Component: cli
2016-11-21 21:40:01 +01:00
615421f56d Merge pull request #28539 from nishanttotla/pin-image-digest-ux
Suppressing digest for docker service ls/ps
Upstream-commit: 89703a0196
Component: cli
2016-11-21 14:06:37 +01:00
71aa7e39fa Suppressing digest for docker service ls/ps
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: 5f1209bf4b
Component: cli
2016-11-18 09:39:34 -08:00
dee52b4790 Return warnings from service create and service update when digest pinning fails
Modify the service update and create APIs to return optional warning
messages as part of the response. Populate these messages with an
informative reason when digest resolution fails.

This is a small API change, but significantly improves the UX. The user
can now get immediate feedback when they've specified a nonexistent
image or unreachable registry.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: b866fa77f4
Component: cli
2016-11-18 09:31:31 -08:00
fb2ded55b6 do not force target type for secret references
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

use secret store interface instead of embedded secret data into container

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: bc542f365c
Component: cli
2016-11-17 15:49:02 -05:00
7487e32054 refactor help func in CLI
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 55908f8a82
Component: cli
2016-11-17 10:54:10 -08:00
85c67043dc cli: Add valid suffixes for remaining duration options
A recent PR added `(ns|us|ms|s|m|h)` to the descriptions of some
duration options, but not all. Add it to the remaining options for
consistency.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 7e7c4eefa4
Component: cli
2016-11-11 17:44:42 -08:00
ea03f9e605 only check secrets for service create if requested
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 885c5f1747
Component: cli
2016-11-11 10:07:24 -05:00
69a2e4be9f Add support for host port PublishMode in services
Add api/cli support for adding host port PublishMode in services.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: 148dc157f6
Component: cli
2016-11-10 18:07:55 -08:00
89896ee078 Merge pull request #27998 from dnephin/compose-on-swarm
Support `docker stack deploy` from a Compose file
Upstream-commit: 7d89ba2d9d
Component: cli
2016-11-10 17:59:57 -08:00
f380f55b88 Merge pull request #28031 from yongtang/27902-extra-hosts
Add flag `--host` to `service create` and `--host-add/rm` to `service update`
Upstream-commit: 32beb80f99
Component: cli
2016-11-10 16:55:29 -08:00
0caec6c7c4 cli: docker service logs support
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: b059cf5286
Component: cli
2016-11-10 13:46:02 -08:00
1026429c8f Add flag --host to service create and --host-add/--host-rm to service update
This fix tries to address 27902 by adding a flag `--host`
to `docker service create` and `--host-add/--host-rm` to
`docker service update`, so that it is possible to
specify extra `host:ip` settings in `/etc/hosts`.

This fix adds `Hosts` in swarmkit's `ContainerSpec` so that it
is possible to specify extra hosts during service creation.

Related docs has been updated.

An integration test has been added.

This fix fixes 27902.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6f3ee9c568
Component: cli
2016-11-10 10:20:24 -08:00
ab7cf40180 Convert deploy to use a compose-file.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f702b722d8
Component: cli
2016-11-10 11:28:18 -05:00
dd6a352b1e Merge pull request #28186 from yongtang/27567-follow-up-dns-options
Add `--dns-option` to `docker run` and hide `--dns-opt`
Upstream-commit: c5fbdc8572
Component: cli
2016-11-10 16:20:17 +01:00
724a0461bc Add --dns-option to docker run and hide --dns-opt
This fix is a follow up to #27567 based on:
https://github.com/docker/docker/pull/27567#issuecomment-259295055

In #27567, `--dns-options` has been added to `service create/update`,
together with `--dns` and `--dns-search`. The `--dns-opt` was used
in `docker run`.

This fix add `--dns-option` (not `--dns-options`) to `docker run/create`, and hide
`--dns-opt`. It is still possible to use `--dns-opt` with
`docker run/create`, though it will not show up in help output.

This fix change `--dns-options`to --dns-option` for `docker service create`
and `docker service update`.

This fix also updates the docs and bash/zsh completion scripts.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: b38ca0f4c3
Component: cli
2016-11-09 12:13:25 -08: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
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
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
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
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
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
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
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
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
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
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