Commit Graph

58 Commits

Author SHA1 Message Date
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
98d0c42181 Remove docker stack ps -a to match removal of docker service/node ps -a
In #28507 and #28885, `docker service/node ps -a` has been removed so that
information about slots are show up even without `-a` flag.

The output of `docker stack ps` reused the same output as `docker service/node ps`.
However, the `-a` was still there. It might make sense to remove `docker stack ps -a`
as well to bring consistency with `docker service/node ps`.

This fix is related to #28507, #28885, and #25983.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9155e14e77a8235791a6de752f6f43e83308e23d
Component: engine
2016-12-26 13:47:43 -08: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
ac43a15799 Add a short flag for docker stack deploy
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f1dd721b6978f1c24bb2761b88c83d9e385bd781
Component: engine
2016-11-25 13:23:36 -05: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
9f30feb096 Merge pull request #28554 from vieux/showhelp
refactor help func in CLI
Upstream-commit: 43de09045c3aa7e1d2f45533cbd243a6e2d26f5e
Component: engine
2016-11-17 14:27:26 -08:00
2e39dde1e5 refactor help func in CLI
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: bf95472105e5dad55314cfff599abea5b81b134a
Component: engine
2016-11-17 10:54:10 -08:00
dcce853abc Fix several issues with go vet and go fmt
For some reason, `go vet` and `go fmt` validate does not capture
several issues.

The following was the output of `go vet`:
```
ubuntu@ubuntu:~/docker$ go vet ./... 2>&1 | grep -v ^vendor | grep -v '^exit status 1$'
cli/command/formatter/container_test.go:393: possible formatting directive in Log call
volume/volume_test.go:257: arg mp.RW for printf verb %s of wrong type: bool
```

The following was the output of `go fmt -s`:
```
ubuntu@ubuntu:~/docker$ gofmt -s -l . | grep -v ^vendor
cli/command/stack/list.go
daemon/commit.go
```

Fixed above issues with `go vet` and `go fmt -s`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ace786e9d517777473bd431e65d6c464d82e4f65
Component: engine
2016-11-17 06:31:28 -08: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
ca36766d89 Merge pull request #27998 from dnephin/compose-on-swarm
Support `docker stack deploy` from a Compose file
Upstream-commit: 750d634d62689bf45ecbb4ae34094ad6a5a7fce5
Component: engine
2016-11-10 17:59:57 -08: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
2d56062821 Remove bundlefile
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b45581b78610e9fe41b8fde19188868aac6df250
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
f3074c32a8 Remove redundant parameter and fix typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 713cae7ca2b8a5fa36e25f3fb30531f6400fafc3
Component: engine
2016-11-10 11:05:31 +08: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
9cb45952e0 Replace all "Filter" field with "Filters" for consistency
In file `api/types/client.go`, some of the "*Options{}" structs own a
`Filters` field while some else have the name of `Filter`, this commit
will rename all `Filter` to `Filters` for consistency. Also `Filters`
is consistent with API with format `/xxx?filters=xxx`, that's why
`Filters` is the right name.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 89a6966726941b4b7f0431ab214013cf9c655c25
Component: engine
2016-11-01 23:09:30 +08: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