diff --git a/engine/getstarted-voting-app/deploy-app.md b/engine/getstarted-voting-app/deploy-app.md index 8806ecacd5..fd6326007e 100644 --- a/engine/getstarted-voting-app/deploy-app.md +++ b/engine/getstarted-voting-app/deploy-app.md @@ -79,12 +79,12 @@ We'll deploy the application from the manager. ``` docker@manager:~$ docker stack services vote ID NAME MODE REPLICAS IMAGE - 0y3q6lgc0drn vote_result replicated 2/2 dockersamples/examplevotingapp_result:before - fvsaqvuec4yw vote_redis replicated 2/2 redis:alpine - igev2xk5s3zo vote_worker replicated 1/1 dockersamples/examplevotingapp_worker:latest - vpfjr9b0qc01 vote_visualizer replicated 1/1 dockersamples/visualizer:stable - wctxjnwl22k4 vote_vote replicated 2/2 dockersamples/examplevotingapp_vote:before - zp0zyvgaguox vote_db replicated 1/1 postgres:9.4 + 1zkatkq7sf8n vote_result replicated 1/1 dockersamples/examplevotingapp_result:after + hphnxyt93h42 vote_redis replicated 2/2 redis:alpine + jd0wafumrcil vote_vote replicated 2/2 dockersamples/examplevotingapp_vote:after + msief4cqme29 vote_visualizer replicated 1/1 dockersamples/visualizer:stable + qa6y8sfmtjoz vote_db replicated 1/1 postgres:9.4 + w04bh1vumnep vote_worker replicated 1/1 dockersamples/examplevotingapp_worker:latest ``` ## What's next? diff --git a/engine/getstarted-voting-app/images/customize-after.png b/engine/getstarted-voting-app/images/customize-after.png index 97d0c88fb0..7500d1c74a 100644 Binary files a/engine/getstarted-voting-app/images/customize-after.png and b/engine/getstarted-voting-app/images/customize-after.png differ diff --git a/engine/getstarted-voting-app/images/customize-before.png b/engine/getstarted-voting-app/images/customize-before.png index e0d5144cfc..d3d824f1fd 100644 Binary files a/engine/getstarted-voting-app/images/customize-before.png and b/engine/getstarted-voting-app/images/customize-before.png differ diff --git a/engine/getstarted-voting-app/images/replicas-constraint.png b/engine/getstarted-voting-app/images/replicas-constraint.png index a0f6f6c943..ad5628792b 100644 Binary files a/engine/getstarted-voting-app/images/replicas-constraint.png and b/engine/getstarted-voting-app/images/replicas-constraint.png differ diff --git a/engine/getstarted-voting-app/images/visualizer-2.png b/engine/getstarted-voting-app/images/visualizer-2.png index 8935edf927..29ea9ca59e 100644 Binary files a/engine/getstarted-voting-app/images/visualizer-2.png and b/engine/getstarted-voting-app/images/visualizer-2.png differ diff --git a/engine/getstarted-voting-app/images/visualizer-manager-constraint.png b/engine/getstarted-voting-app/images/visualizer-manager-constraint.png index 610e94ddaa..435857e679 100644 Binary files a/engine/getstarted-voting-app/images/visualizer-manager-constraint.png and b/engine/getstarted-voting-app/images/visualizer-manager-constraint.png differ diff --git a/engine/getstarted-voting-app/images/visualizer.png b/engine/getstarted-voting-app/images/visualizer.png index e235428007..86bed62323 100644 Binary files a/engine/getstarted-voting-app/images/visualizer.png and b/engine/getstarted-voting-app/images/visualizer.png differ diff --git a/engine/getstarted-voting-app/index.md b/engine/getstarted-voting-app/index.md index 01283fe02f..37a4a26f9b 100644 --- a/engine/getstarted-voting-app/index.md +++ b/engine/getstarted-voting-app/index.md @@ -175,7 +175,7 @@ services: depends_on: - db deploy: - replicas: 2 + replicas: 1 update_config: parallelism: 2 delay: 10s @@ -196,6 +196,8 @@ services: delay: 10s max_attempts: 3 window: 120s + placement: + constraints: [node.role == manager] visualizer: image: dockersamples/visualizer:stable diff --git a/engine/getstarted-voting-app/test-drive.md b/engine/getstarted-voting-app/test-drive.md index fd50211963..ba4b9b39f9 100644 --- a/engine/getstarted-voting-app/test-drive.md +++ b/engine/getstarted-voting-app/test-drive.md @@ -48,9 +48,10 @@ action here. For example: * Two of the services are replicated: * `vote` (represented in the visulizer by `vote_vote`) - * `result` (represented in the visulizer by `vote_result`) + * `redis` (represented in the visulizer by `vote_redis`) - Both of these services are configured as `replicas: 2` under the `deploy` key. In the current state of this app, one of each is running on a manager and on a worker. However, since neither are explicitly constrained to either node in `docker-stack.yml`, all or some of these services could be running on either node, depending on workload and re-balancing choices we've left to the swarm orchestration. + Both of these services are configured as `replicas: 2` under + the `deploy` key. In the current state of this app (shown in the visualizer), one of each of these containers is running on a manager and on a worker. However, since neither are explicitly constrained to either node in `docker-stack.yml`, all or some of these services could be running on either node, depending on workload and re-balancing choices we've left to the swarm orchestration. ![replicas in yml](images/replicas-constraint.png)