Skip to content

Commit 61e9f0c

Browse files
Merge pull request docker#2042 from londoncalling/clarify-docker-stack-deploy-voting-app
clarified docker stack deploy and bundles
2 parents 85ada88 + 09c4324 commit 61e9f0c

File tree

3 files changed

+36
-18
lines changed

3 files changed

+36
-18
lines changed

compose/bundles.md

+22-10
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,33 @@ keywords: documentation, docs, docker, compose, bundles, stacks
55
title: Docker stacks and distributed application bundles (experimental)
66
---
77

8-
> **Note**: This is a copy of the [Docker Stacks and Distributed Application
8+
> **Note**: This is a modified copy of the [Docker Stacks and Distributed Application
99
> Bundles](https://github.com/docker/docker/blob/v1.12.0-rc4/experimental/docker-stacks-and-bundles.md)
10-
> document in the [docker/docker repo](https://github.com/docker/docker).
10+
> document in the [docker/docker repo](https://github.com/docker/docker). It's been updated to accurately reflect newer releases.
1111
1212
## Overview
1313

14-
Docker Stacks and Distributed Application Bundles are experimental features
15-
introduced in Docker 1.12 and Docker Compose 1.8, alongside the concept of
16-
swarm mode, and Nodes and Services in the Engine API.
17-
1814
A Dockerfile can be built into an image, and containers can be created from
1915
that image. Similarly, a `docker-compose.yml` can be built into a **distributed
2016
application bundle**, and **stacks** can be created from that bundle. In that
2117
sense, the bundle is a multi-services distributable image format.
2218

23-
As of Docker 1.12 and Compose 1.8, the features are experimental. Neither
24-
Docker Engine nor the Docker Registry support distribution of bundles.
19+
Docker Stacks and Distributed Application Bundles started as experimental
20+
features introduced in Docker 1.12 and Docker Compose 1.8, alongside the concept
21+
of swarm mode, and nodes and services in the Engine API. Neither Docker Engine
22+
nor the Docker Registry support distribution of bundles, and the concept of a
23+
`bundle` is not the emphasis for new releases going forward.
24+
25+
However, [swarm mode](/engine/swarm/index.md), multi-service applications, and
26+
stack files now are fully supported. A stack file is a particular type of
27+
[version 3 Compose file](/compose/compose-file/index.md).
28+
29+
If you are just getting started with Docker and want to learn the best way to
30+
deploy multi-service applications, a good place to start is the [Sample app
31+
tutorial](/engine/getstarted-voting-app/index.md). This shows you how to define
32+
a service configuration in a `docker-stack.yml` file, deploy the app, and use
33+
the relevant tools and commands.
34+
2535

2636
## Producing a bundle
2737

@@ -203,6 +213,8 @@ A service has the following fields:
203213
204214
## Related topics
205215

206-
* [docker stack deploy] (/engine/reference/commandline/stack_deploy/) command
216+
* [Sample app tutorial](/engine/getstarted-voting-app/index.md)
217+
218+
* [docker stack deploy](/engine/reference/commandline/stack_deploy/) command
207219

208-
* [deploy](/compose/compose-file/index.md#deploy) option in [Compose files](/compose/compose-file/index.md]]
220+
* [deploy](/compose/compose-file/index.md#deploy) option in [Compose files](/compose/compose-file/index.md)

engine/getstarted-voting-app/deploy-app.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,18 @@ The `docker-stack.yml` file must be located on a manager for the swarm where you
5353
5454
We'll deploy the application from the manager.
5555
56-
1. Deploy the application stack based on the `.yml` using the command `docker stack deploy` as follows.
56+
1. Deploy the application stack based on the `.yml` using the command
57+
[`docker stack deploy`](/engine/reference/commandline/stack_deploy.md) as follows.
5758
5859
```
5960
docker stack deploy --compose-file docker-stack.yml vote
6061
```
6162
62-
Here is an example of the command and the output.
63+
* The `--compose-file` option specifies the path to our stack file. In this case, we assume it's in the current directory so we simply name the stack file: `docker-stack.yml`.
64+
65+
* For the example, we name this app `vote`, but we could name it anything we want.
66+
67+
Here is an example of the command and the output.
6368
6469
```
6570
docker@manager:~$ docker stack deploy --compose-file docker-stack.yml vote

engine/getstarted-voting-app/index.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,13 @@ volumes:
219219

220220
## Docker stacks and services
221221

222-
To deploy the voting app, we will run the `docker stack deploy` command with
223-
this `docker-stack.yml` file to pull the referenced images and launch the
224-
services in a swarm. This allows us to run the application across multiple
225-
servers, and use swarm mode for load balancing and performance. Rather than
226-
thinking about running individual containers, we can start to model deployments
227-
as application stacks and services.
222+
To deploy the voting app, we will run the [`docker stack
223+
deploy`](/engine/reference/commandline/stack_deploy.md) command with appropriate
224+
options using this `docker-stack.yml` file to pull the referenced images and
225+
launch the services in a swarm. This allows us to run the application across
226+
multiple servers, and use swarm mode for load balancing and performance. Rather
227+
than thinking about running individual containers, we can start to model
228+
deployments as application stacks and services.
228229

229230
If you are interested in learning more about new Compose version 3.x features, Docker Engine 1.13.x, and swarm mode integration, check out the [list of resources](customize-app.md#resources) at the end of this tutorial.
230231

0 commit comments

Comments
 (0)