Support placement preferences in stack deployment#32743
Support placement preferences in stack deployment#32743denverdino wants to merge 4 commits intomoby:masterfrom
Conversation
dnephin
left a comment
There was a problem hiding this comment.
The new version of the schema is missing the consistency field from 3.2.
There was a problem hiding this comment.
The formatting is off here, are you using tabs? This file uses spaces
cli/compose/schema/schema_test.go
Outdated
There was a problem hiding this comment.
This test would be more appropriate as a test in cli/compose/loader/. There is a TestFull that you can add to
The tests in this package are for the schema loading and validation.
There was a problem hiding this comment.
Test case added. Thanks for comments
7e2f735 to
bb18e89
Compare
|
Design LGTM |
cli/compose/loader/full-example.yml
Outdated
There was a problem hiding this comment.
Ya this is necessary as we expand full example to include the new fields
|
!rebuild powerpc #33041 |
|
Moving to docs-review, cc @thaJeztah |
Support preferences for placement Change-Id: I90bf1499ba413cfa1359a5a609f48e93f8d2722b Signed-off-by: Li Yi <denverdino@gmail.com>
Change-Id: Ib9bbf0dbc39252ec7ba0adf03d656e6ccc598005 Signed-off-by: Li Yi <denverdino@gmail.com>
Change-Id: I456a294d50015da1d31733260f19b168a98063fb Signed-off-by: Li Yi <denverdino@gmail.com>
Change-Id: I14ab320af46e8c386fe94ece728ee1166ba02d71 Signed-off-by: Li Yi <denverdino@gmail.com>
5887a37 to
9756ff4
Compare
|
FYI, due to #32694, this PR should be closed and opened again in https://github.com/docker/cli It will require the changes in docker/cli#32 to be ported as is. |
|
thx for notification |
Move of moby/moby#32743 Signed-off-by: Li Yi <denverdino@gmail.com>
|
Open a new PR docker/cli#35 |
Move of moby/moby#32743 Signed-off-by: Li Yi <denverdino@gmail.com>
Move of moby/moby#32743 Signed-off-by: Li Yi <denverdino@gmail.com>
Move of moby/moby#32743 Signed-off-by: Li Yi <denverdino@gmail.com> Upstream-commit: b3459936dba6f0fb5b23b43cd5e168186ad87f35 Component: cli
Move of moby/moby#32743 Signed-off-by: Li Yi <denverdino@gmail.com>
Fix #32584 Support placement preferences in stack deployment
Signed-off-by: Li Yi denverdino@gmail.com
- What I did
Following the compose definition in moby/swarmkit#1512 , I support the placement preferences in docker stack deploy
- How I did it
Add the placement preferences in docker compose scheme
- How to verify it
Create a docker swarm with 3 nodes, and then add the "az" label to the nodes
docker node update --label-add az=az1 node1
docker node update --label-add az=az1 node2
docker node update --label-add az=az2 node3
Create docker-compose.yaml as following
docker stack deploy -c docker-compose.yaml test
The nginx container will be spread on the nodes with different az
- A picture of a cute animal (not mandatory but encouraged)