Commit Graph

50 Commits

Author SHA1 Message Date
7cc7eec39f Replace fmt.Errorf() with errors.Errorf() in the cli
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7b7ea8ab810190018346cb7d84c161bb94f7ca60
Component: engine
2017-03-24 16:58:07 -04:00
6a9291e20f Add --prune to stack deploy.
Add to command line reference.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 644fd804fce63499812259331b0a9f2a4a3ebcc4
Component: engine
2017-03-14 16:09:28 -04:00
5f5d704cba split compose deploy from deploy.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: f46a14f7b611276256c7e8148e87c1d570201d74
Component: engine
2017-02-17 17:13:31 +08:00
3526619d18 remove cli/command/secrets/utils.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 51b37a7983435edcd2331571bcb85b2686cbd006
Component: engine
2017-01-29 13:32:49 +08:00
5ed83fcbc5 Add integration test for stack deploy with secrets.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6ec84ef76df30663d5728f903b314f4486587135
Component: engine
2017-01-26 11:33:15 -05:00
fc26836a78 Implement secret types for compose file.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9419e7df2b54b684bef6c787239a2c92fbb4acda
Component: engine
2017-01-26 11:33:15 -05:00
c1d7d93cb3 Few stack deploy network fixes
- Make sure we use the correct network name for external ones.
- Make the default network overridable and only creates networks that
  are used by services — so that default network is only created if a
  service doesn't declare a network.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 3191f5809bc1233bbf2103d2432b75cac93567bb
Component: engine
2017-01-10 10:29:09 +01:00
edfbbc6ec9 Replace vendor of aanand/compose-file with a local copy.
Add go-bindata for including the schema.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f5af9b9738892b5988f987ce5fbce6e31a10e768
Component: engine
2016-12-27 16:17:24 -05:00
c9e434865c Move pkg to cli/compose/convert
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 643fd775edb0a05d649f4d484e966428eb3a6b09
Component: engine
2016-12-16 12:27:31 -05:00
930d936818 Move ConvertService to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 655e48e65309f0191bbbb8b2e9730b6976e148cd
Component: engine
2016-12-16 12:20:07 -05:00
cb4b458233 Move ConvertVolumes to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7685e80fc9cb79206d81757eee071f0244323600
Component: engine
2016-12-16 11:51:13 -05:00
20aacdd131 Move ConvertNetworks to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6b778c96336fe9c0bcfea477092aab8cdfc0c896
Component: engine
2016-12-16 11:51:13 -05:00
97f2808afa Remove --port and update --publish for services to support syntaxes
Add support for simple and complex syntax to `--publish` through the
use of `PortOpt`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 75bf18c9f01d050e5fccab98fb671306c7c5f6d2
Component: engine
2016-12-11 23:14:54 +01:00
4ef31d0696 Handle logging in compose to swarm
Logging configuration was completely ignore when deploy a compose file
to swarm. This fixes it.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 806cc1e0f815d7c4e4b7bd4fa537e3d4c3535e23
Component: engine
2016-12-05 15:18:36 +01:00
5ee1b1203e Merge pull request #28876 from vdemeester/28835-better-handling-of-external-networks
stack deploy: handle external network when deploying
Upstream-commit: b8dac5dc995cefbd9f92f5a52a7435ddf4250873
Component: engine
2016-11-29 15:00:35 -08:00
2ae9ad9ad5 Use namespace label on stack volumes.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4013a7c6d897051bb79982230f31279ee0c9a026
Component: engine
2016-11-28 18:02:39 -05:00
37ea301199 stack deploy: handle external network when deploying
If the network is marked as external, don't use the namespace on
it. Otherwise, it's not found.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6fff8454099092780655e8a2c7d71402ce547c5c
Component: engine
2016-11-28 17:38:41 +01:00
64466e9e79 Better error message on stack deploy against not a swarm.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c72daf953aaa8c7c8cbe60a103700d3b1d56c50d
Component: engine
2016-11-23 12:15:11 -05:00
4ce562265c Merge pull request #28677 from dnephin/remove-deploy-experimental
Move `docker stack` out of experimental
Upstream-commit: eac91a19d632dc82b04f19eb11f83ed1dcefb8ae
Component: engine
2016-11-21 14:33:35 -08:00
2beb803d6c Move docker stack out of experimental
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6df5baf30f96e5af3338551b9e632748d7886ead
Component: engine
2016-11-21 15:30:25 -05:00
2b291d4bab Do not panic if network is nil
network is `nil` if the following case:

```
services:
  foo:
    image: nginx
    networks:
      mynetwork:
```

It's a valid compose so we should not panic.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 158388ef8d66723ec1f8ee4770d7488948234d16
Component: engine
2016-11-21 17:59:29 +01:00
86d2b2a2e1 Merge pull request #28294 from vdemeester/compose-swarm-healthcheck
Add support for healthcheck in compose to swarm
Upstream-commit: 3739c3bed37a3493a20bff3c9abb17561e1a732d
Component: engine
2016-11-21 10:28:37 +01:00
fd22b67295 swap position of "host" and "ip"
the service definition uses the format as defined
in  http://man7.org/linux/man-pages/man5/hosts.5.html
(IP_address canonical_hostname [aliases...])

This format is the _reverse_ of the format used in
the container API.

Commit f32869d956eb175f88fd0b16992d2377d8eae79c
inadvertently used the incorrect order.

This fixes the order, and correctly sets it to;

    IP-Address hostname

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f1b9df91722a229fd0cefd7a0868933b6b811544
Component: engine
2016-11-18 22:04:27 +01:00
2efd6e2078 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: 948e60691e523022f88e7f8129f02106a0f8826c
Component: engine
2016-11-18 09:31:31 -08:00
6a67c61a99 Default parallelism to 1.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7c1b39923505adeb13512d6294855b31102963a6
Component: engine
2016-11-18 16:17:08 +01:00
65faee61a6 Add support for healthcheck in composefile v3
`docker stack deploy` now supports a composefile v3 format that have a
healthcheck.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 3bd64de7a9c3eecbd57cb11d861a6fe94a5bb788
Component: engine
2016-11-18 15:09:13 +01:00
bb992b4f94 Merge pull request #28297 from vdemeester/compose-swarm-openstdin
Add support for stdin_open in compose to swarm
Upstream-commit: e8469c0e63160174d00f60cdc2cc909593ab04b2
Component: engine
2016-11-11 17:09:04 +01:00
50bcf47873 Add support for extra_hosts in composefile v3
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f32869d956eb175f88fd0b16992d2377d8eae79c
Component: engine
2016-11-11 15:20:02 +01:00
e846f5ae11 Add support for stdin_open in composefile v3
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 84450b72cd73161449bae16b8ad0010fcc4a07eb
Component: engine
2016-11-11 15:19:00 +01:00
66e58fd23d Add support for tty in composefile v3
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: de15de6b4d90f8d707d92ab2f8b6a63e0742e8ce
Component: engine
2016-11-11 11:27:21 +01:00
d5ff009b23 Implement ipamconfig.subnet and be more explicit about restart policy always.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: dfd1227906a74acd51daed906802424299bda3bc
Component: engine
2016-11-10 16:22:31 -05:00
4c746a53ae Handle bind options and volume options
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ef90081d44f204727254c4ae5f0b4910a77530fd
Component: engine
2016-11-10 12:37:17 -05:00
80cefc6683 Restore stack deploy integration test with dab
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: bd8de8d8be9e367af9e045d0fdead4462fed490c
Component: engine
2016-11-10 11:28:19 -05:00
f16c51a10e Reinstate --bundle-file argument to 'docker deploy'
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Upstream-commit: aa5e7d038a5459df55f5c039d4a881a4558aa247
Component: engine
2016-11-10 11:28:18 -05:00
3a6b62c164 Add integration test for stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: eefccc25c5cda96947978c503d5764aa48aacd7d
Component: engine
2016-11-10 11:28:18 -05:00
184722486c Remove duplication of name mangling.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 46ca5827f99e627d7b63433497aee145c1d0468e
Component: engine
2016-11-10 11:28:18 -05:00
36eb40263d Always use a default network if no other networks are set.
also add network labels.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 644d30369a348db4d904d86958c2b57a0de36990
Component: engine
2016-11-10 11:28:18 -05:00
1908145b38 Send warnings to stderr.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b0efbcc34a77d5d8869cc381064d3741b67f9776
Component: engine
2016-11-10 11:28:18 -05:00
787c19b18c Default to replicated mode
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Upstream-commit: 3d2cb23782da72f650da438b11d4db87ccdbb596
Component: engine
2016-11-10 11:28:18 -05:00
15d5c8d4af Handle unsupported, deprecated and forbidden properties
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Upstream-commit: fcad58f3c85145f0414ffba72321bbb10d16e272
Component: engine
2016-11-10 11:28:18 -05:00
941e9ca594 Add swarmkit fields to stack service.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 13384ba34b8d57d9cc6e68ff9c8b0b72bc72f9c3
Component: engine
2016-11-10 11:28:18 -05:00
860efa419b Add support for service-level 'volumes' key
Support volume driver + options
Support external volumes
Support hostname in Compose file

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Upstream-commit: 0884e3c86892a0f51b8feeeb30ff486c821796f5
Component: engine
2016-11-10 11:28:18 -05:00
52cbc60fd5 Convert deploy to use a compose-file.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: cbbc6b4d9bd50f7409c6d935efc899946c449de3
Component: engine
2016-11-10 11:28:18 -05:00
d0ebaa81e8 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: e98e4a71110fd33852bb755a9b8b4ebc9df904db
Component: engine
2016-11-08 04:55:27 -08:00
ffbf855e39 update cobra and use Tags
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: d34ca0178e42cddc760316bbcb6a3aa8bea8b3ed
Component: engine
2016-11-04 12:04:14 -07:00
9a299b360f Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 7781a1bf0fef748877326632b88e92fbf3c90daa
Component: engine
2016-10-24 15:20:01 -07:00
6f9659dfb5 Allow docker deploy command accept filename with/without extension
This fix tries to address the issue raised in 25855 where the command
`docker deploy` can only accept a STACK without extension of `.dab`.
In other words, `docker deploy hellojavaee.dab` gives an error:
```
Bundle hellojavaee.dab.dab not found. Specify the path with --file
```

This fix updates the way namespace STACK is taken so that in case
`STACK.dab` is provided with `docker deploy`:
```
$ docker deploy STACK.dab
```
The `STACK` is used as namespace (instead of `STACK.dab`).

NOTE: This fix will only allows `.dab` extension in namespace, because
it is not possible to have a namespace with `.` in the middle. In other
words, a namespace `hello.java.ee` will not work anyway (whether the file
`hello.java.ee` exists or not).

An additional integration test has been added to cover the changes.

This fix fixes 25855.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1e9d04c458e90f38c970c7937830504d2e919066
Component: engine
2016-10-14 11:44:15 -07:00
be2034fe8c Remove remaining registry methods from DockerCLI.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 1dd46e06444d1a0c73fc88dfccec4ae0b7f10bf6
Component: engine
2016-09-09 15:50:01 -04:00
0238cc6815 Replace api/client imports with cli/command in experimental files.
Using

git grep -l 'client\.DockerCli' cli/command/stack/ | xargs sed -i -e 's/client\.DockerCli/command\.Dockercli/g'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9c2b9358125175db366ca000e6dae9af8dc88e2d
Component: engine
2016-09-08 15:46:48 -04:00
d8acc366ce 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>
Upstream-commit: 0640a14b4fcba3715f7cc3bc9444f3c7f4827edd
Component: engine
2016-09-08 15:46:29 -04:00