Also removes the `-f` flags of bundle to follow the single-letter flags
evaluation.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 10919e890942cbdaa65f180dbcd475d21b9c6713)
Signed-off-by: Tibor Vass <tibor@docker.com>
| ... | ... |
@@ -12,9 +12,9 @@ import ( |
| 12 | 12 |
) |
| 13 | 13 |
|
| 14 | 14 |
func addBundlefileFlag(opt *string, flags *pflag.FlagSet) {
|
| 15 |
- flags.StringVarP( |
|
| 15 |
+ flags.StringVar( |
|
| 16 | 16 |
opt, |
| 17 |
- "bundle", "f", "", |
|
| 17 |
+ "bundle", "", |
|
| 18 | 18 |
"Path to a Distributed Application Bundle file (Default: STACK.dab)") |
| 19 | 19 |
} |
| 20 | 20 |
|
| 21 | 21 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,57 @@ |
| 0 |
+<!--[metadata]> |
|
| 1 |
+title = "deploy" |
|
| 2 |
+description = "The deploy command description and usage" |
|
| 3 |
+keywords = ["stack, deploy"] |
|
| 4 |
+advisory = "experimental" |
|
| 5 |
+[menu.main] |
|
| 6 |
+parent = "smn_cli" |
|
| 7 |
+<![end-metadata]--> |
|
| 8 |
+ |
|
| 9 |
+# stack deploy (experimental) |
|
| 10 |
+ |
|
| 11 |
+```markdown |
|
| 12 |
+Usage: docker deploy [OPTIONS] STACK |
|
| 13 |
+ |
|
| 14 |
+Create and update a stack from a Distributed Application Bundle (DAB) |
|
| 15 |
+ |
|
| 16 |
+Options: |
|
| 17 |
+ --bundle string Path to a Distributed Application Bundle file (Default: STACK.dab) |
|
| 18 |
+ --help Print usage |
|
| 19 |
+``` |
|
| 20 |
+ |
|
| 21 |
+Create and update a stack from a `dab` file. This command has to be |
|
| 22 |
+run targeting a manager node. |
|
| 23 |
+ |
|
| 24 |
+```bash |
|
| 25 |
+$ docker deploy vossibility-stack |
|
| 26 |
+Loading bundle from vossibility-stack.dab |
|
| 27 |
+Creating service vossibility-stack_elasticsearch |
|
| 28 |
+Creating service vossibility-stack_kibana |
|
| 29 |
+Creating service vossibility-stack_logstash |
|
| 30 |
+Creating service vossibility-stack_lookupd |
|
| 31 |
+Creating service vossibility-stack_nsqd |
|
| 32 |
+Creating service vossibility-stack_vossibility-collector |
|
| 33 |
+``` |
|
| 34 |
+ |
|
| 35 |
+You can verify that the services were correctly created: |
|
| 36 |
+ |
|
| 37 |
+```bash |
|
| 38 |
+$ docker service ls |
|
| 39 |
+ID NAME REPLICAS IMAGE |
|
| 40 |
+COMMAND |
|
| 41 |
+29bv0vnlm903 vossibility-stack_lookupd 1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662 /nsqlookupd |
|
| 42 |
+4awt47624qwh vossibility-stack_nsqd 1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662 /nsqd --data-path=/data --lookupd-tcp-address=lookupd:4160 |
|
| 43 |
+4tjx9biia6fs vossibility-stack_elasticsearch 1 elasticsearch@sha256:12ac7c6af55d001f71800b83ba91a04f716e58d82e748fa6e5a7359eed2301aa |
|
| 44 |
+7563uuzr9eys vossibility-stack_kibana 1 kibana@sha256:6995a2d25709a62694a937b8a529ff36da92ebee74bafd7bf00e6caf6db2eb03 |
|
| 45 |
+9gc5m4met4he vossibility-stack_logstash 1 logstash@sha256:2dc8bddd1bb4a5a34e8ebaf73749f6413c101b2edef6617f2f7713926d2141fe logstash -f /etc/logstash/conf.d/logstash.conf |
|
| 46 |
+axqh55ipl40h vossibility-stack_vossibility-collector 1 icecrime/vossibility-collector@sha256:f03f2977203ba6253988c18d04061c5ec7aab46bca9dfd89a9a1fa4500989fba --config /config/config.toml --debug |
|
| 47 |
+``` |
|
| 48 |
+ |
|
| 49 |
+## Related information |
|
| 50 |
+ |
|
| 51 |
+* [stack config](stack_config.md) |
|
| 52 |
+* [stack deploy](stack_deploy.md) |
|
| 53 |
+* [stack rm](stack_rm.md) |
|
| 54 |
+* [stack tasks](stack_tasks.md) |
| 0 | 55 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,30 @@ |
| 0 |
+<!--[metadata]> |
|
| 1 |
+title = "stack config" |
|
| 2 |
+description = "The stack config command description and usage" |
|
| 3 |
+keywords = ["stack, config"] |
|
| 4 |
+advisory = "experimental" |
|
| 5 |
+[menu.main] |
|
| 6 |
+parent = "smn_cli" |
|
| 7 |
+<![end-metadata]--> |
|
| 8 |
+ |
|
| 9 |
+# stack config (experimental) |
|
| 10 |
+ |
|
| 11 |
+```markdown |
|
| 12 |
+Usage: docker stack config [OPTIONS] STACK |
|
| 13 |
+ |
|
| 14 |
+Print the stack configuration |
|
| 15 |
+ |
|
| 16 |
+Options: |
|
| 17 |
+ --bundle string Path to a Distributed Application Bundle file (Default: STACK.dab) |
|
| 18 |
+ --help Print usage |
|
| 19 |
+``` |
|
| 20 |
+ |
|
| 21 |
+Displays the configuration of a stack. |
|
| 22 |
+ |
|
| 23 |
+## Related information |
|
| 24 |
+ |
|
| 25 |
+* [stack deploy](stack_deploy.md) |
|
| 26 |
+* [stack rm](stack_rm.md) |
|
| 27 |
+* [stack tasks](stack_tasks.md) |
| 0 | 28 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,59 @@ |
| 0 |
+<!--[metadata]> |
|
| 1 |
+title = "stack deploy" |
|
| 2 |
+description = "The stack deploy command description and usage" |
|
| 3 |
+keywords = ["stack, deploy, up"] |
|
| 4 |
+advisory = "experimental" |
|
| 5 |
+[menu.main] |
|
| 6 |
+parent = "smn_cli" |
|
| 7 |
+<![end-metadata]--> |
|
| 8 |
+ |
|
| 9 |
+# stack deploy (experimental) |
|
| 10 |
+ |
|
| 11 |
+```markdown |
|
| 12 |
+Usage: docker stack deploy [OPTIONS] STACK |
|
| 13 |
+ |
|
| 14 |
+Create and update a stack from a Distributed Application Bundle (DAB) |
|
| 15 |
+ |
|
| 16 |
+Aliases: |
|
| 17 |
+ deploy, up |
|
| 18 |
+ |
|
| 19 |
+Options: |
|
| 20 |
+ --bundle string Path to a Distributed Application Bundle file (Default: STACK.dab) |
|
| 21 |
+ --help Print usage |
|
| 22 |
+``` |
|
| 23 |
+ |
|
| 24 |
+Create and update a stack from a `dab` file on the swarm. This command |
|
| 25 |
+has to be run targeting a manager node. |
|
| 26 |
+ |
|
| 27 |
+```bash |
|
| 28 |
+$ docker stack deploy vossibility-stack |
|
| 29 |
+Loading bundle from vossibility-stack.dab |
|
| 30 |
+Creating service vossibility-stack_elasticsearch |
|
| 31 |
+Creating service vossibility-stack_kibana |
|
| 32 |
+Creating service vossibility-stack_logstash |
|
| 33 |
+Creating service vossibility-stack_lookupd |
|
| 34 |
+Creating service vossibility-stack_nsqd |
|
| 35 |
+Creating service vossibility-stack_vossibility-collector |
|
| 36 |
+``` |
|
| 37 |
+ |
|
| 38 |
+You can verify that the services were correctly created: |
|
| 39 |
+ |
|
| 40 |
+```bash |
|
| 41 |
+$ docker service ls |
|
| 42 |
+ID NAME REPLICAS IMAGE |
|
| 43 |
+COMMAND |
|
| 44 |
+29bv0vnlm903 vossibility-stack_lookupd 1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662 /nsqlookupd |
|
| 45 |
+4awt47624qwh vossibility-stack_nsqd 1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662 /nsqd --data-path=/data --lookupd-tcp-address=lookupd:4160 |
|
| 46 |
+4tjx9biia6fs vossibility-stack_elasticsearch 1 elasticsearch@sha256:12ac7c6af55d001f71800b83ba91a04f716e58d82e748fa6e5a7359eed2301aa |
|
| 47 |
+7563uuzr9eys vossibility-stack_kibana 1 kibana@sha256:6995a2d25709a62694a937b8a529ff36da92ebee74bafd7bf00e6caf6db2eb03 |
|
| 48 |
+9gc5m4met4he vossibility-stack_logstash 1 logstash@sha256:2dc8bddd1bb4a5a34e8ebaf73749f6413c101b2edef6617f2f7713926d2141fe logstash -f /etc/logstash/conf.d/logstash.conf |
|
| 49 |
+axqh55ipl40h vossibility-stack_vossibility-collector 1 icecrime/vossibility-collector@sha256:f03f2977203ba6253988c18d04061c5ec7aab46bca9dfd89a9a1fa4500989fba --config /config/config.toml --debug |
|
| 50 |
+``` |
|
| 51 |
+ |
|
| 52 |
+## Related information |
|
| 53 |
+ |
|
| 54 |
+* [stack config](stack_config.md) |
|
| 55 |
+* [stack rm](stack_rm.md) |
|
| 56 |
+* [stack tasks](stack_tasks.md) |
| 0 | 57 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,33 @@ |
| 0 |
+<!--[metadata]> |
|
| 1 |
+title = "stack rm" |
|
| 2 |
+description = "The stack rm command description and usage" |
|
| 3 |
+keywords = ["stack, rm, remove, down"] |
|
| 4 |
+advisory = "experimental" |
|
| 5 |
+[menu.main] |
|
| 6 |
+parent = "smn_cli" |
|
| 7 |
+<![end-metadata]--> |
|
| 8 |
+ |
|
| 9 |
+# stack rm (experimental) |
|
| 10 |
+ |
|
| 11 |
+```markdown |
|
| 12 |
+Usage: docker stack rm STACK |
|
| 13 |
+ |
|
| 14 |
+Remove the stack |
|
| 15 |
+ |
|
| 16 |
+Aliases: |
|
| 17 |
+ rm, remove, down |
|
| 18 |
+ |
|
| 19 |
+Options: |
|
| 20 |
+ --help Print usage |
|
| 21 |
+``` |
|
| 22 |
+ |
|
| 23 |
+Remove the stack from the swarm. This command has to be run targeting |
|
| 24 |
+a manager node. |
|
| 25 |
+ |
|
| 26 |
+## Related information |
|
| 27 |
+ |
|
| 28 |
+* [stack config](stack_config.md) |
|
| 29 |
+* [stack deploy](stack_deploy.md) |
|
| 30 |
+* [stack tasks](stack_tasks.md) |
| 0 | 31 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,46 @@ |
| 0 |
+<!--[metadata]> |
|
| 1 |
+title = "stack tasks" |
|
| 2 |
+description = "The stack tasks command description and usage" |
|
| 3 |
+keywords = ["stack, tasks"] |
|
| 4 |
+advisory = "experimental" |
|
| 5 |
+[menu.main] |
|
| 6 |
+parent = "smn_cli" |
|
| 7 |
+<![end-metadata]--> |
|
| 8 |
+ |
|
| 9 |
+# stack tasks (experimental) |
|
| 10 |
+ |
|
| 11 |
+```markdown |
|
| 12 |
+Usage: docker stack tasks [OPTIONS] STACK |
|
| 13 |
+ |
|
| 14 |
+List the tasks in the stack |
|
| 15 |
+ |
|
| 16 |
+Options: |
|
| 17 |
+ -a, --all Display all tasks |
|
| 18 |
+ -f, --filter value Filter output based on conditions provided |
|
| 19 |
+ --help Print usage |
|
| 20 |
+ --no-resolve Do not map IDs to Names |
|
| 21 |
+``` |
|
| 22 |
+ |
|
| 23 |
+Lists the tasks that are running as part of the specified stack. This |
|
| 24 |
+command has to be run targeting a manager node. |
|
| 25 |
+ |
|
| 26 |
+## Filtering |
|
| 27 |
+ |
|
| 28 |
+The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there |
|
| 29 |
+is more than one filter, then pass multiple flags (e.g. `--filter "foo=bar" --filter "bif=baz"`). |
|
| 30 |
+Multiple filter flags are combined as an `OR` filter. For example, |
|
| 31 |
+`-f name=redis.1 -f name=redis.7` returns both `redis.1` and `redis.7` tasks. |
|
| 32 |
+ |
|
| 33 |
+The currently supported filters are: |
|
| 34 |
+ |
|
| 35 |
+* [id](#id) |
|
| 36 |
+* [name](#name) |
|
| 37 |
+* [desired-state](#desired-state) |
|
| 38 |
+ |
|
| 39 |
+## Related information |
|
| 40 |
+ |
|
| 41 |
+* [stack config](stack_config.md) |
|
| 42 |
+* [stack deploy](stack_deploy.md) |
|
| 43 |
+* [stack rm](stack_rm.md) |