@@ -34,12 +34,6 @@ Dockerized application.
3434
3535{% capture community %}
3636
37- To set up and deploy:
38-
39- - Install Docker Engine - Community
40- - Create your Swarm
41- - Deploy your app
42-
4337### Install Docker Engine - Community
4438
4539Find the [ install instructions] ( /install/#supported-platforms ) for Docker Engine - Community on the platform of your choice.
@@ -53,66 +47,61 @@ Run `docker swarm init` to create a swarm on the node.
5347Run ` docker stack deploy -c docker-compose.yml getstartedlab ` to deploy
5448the app on the cloud hosted swarm.
5549
56- ```shell
57- docker stack deploy -c docker-compose.yml getstartedlab
50+ ``` shell
51+ docker stack deploy -c docker-compose.yml getstartedlab
5852
59- Creating network getstartedlab_webnet
60- Creating service getstartedlab_web
61- Creating service getstartedlab_visualizer
62- Creating service getstartedlab_redis
63- ```
53+ Creating network getstartedlab_webnet
54+ Creating service getstartedlab_web
55+ Creating service getstartedlab_visualizer
56+ Creating service getstartedlab_redis
57+ ```
6458
65- Your app is now running on your cloud provider.
59+ Your app is now running on your cloud provider.
6660
6761#### Run some swarm commands to verify the deployment
6862
6963You can use the swarm command line, as you've done already, to browse and manage
7064the swarm. Here are some examples that should look familiar by now:
7165
72- * Use ` docker node ls ` to list the nodes.
66+ * Use ` docker node ls ` to list the nodes in your swarm .
7367
74- ``` shell
75- [getstartedlab] ~ $ docker node ls
76- ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
77- 9442yi1zie2l34lj01frj3lsn ip-172-31-5-208.us-west-1.compute.internal Ready Active
78- jr02vg153pfx6jr0j66624e8a ip-172-31-6-237.us-west-1.compute.internal Ready Active
79- thpgwmoz3qefdvfzp7d9wzfvi ip-172-31-18-121.us-west-1.compute.internal Ready Active
80- n2bsny0r2b8fey6013kwnom3m * ip-172-31-20-217.us-west-1.compute.internal Ready Active Leader
81- ```
68+ ``` shell
69+ [getstartedlab] ~ $ docker node ls
70+ ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
71+ n2bsny0r2b8fey6013kwnom3m * ip-172-31-20-217.us-west-1.compute.internal Ready Active Leader
72+ ```
8273
8374* Use ` docker service ls ` to list services.
8475
85- ` ` ` shell
86- [getstartedlab] ~ /sandbox/getstart $ docker service ls
87- ID NAME MODE REPLICAS IMAGE PORTS
88- x3jyx6uukog9 dockercloud-server-proxy global 1/1 dockercloud/server-proxy * :2376-> 2376/tcp
89- ioipby1vcxzm getstartedlab_redis replicated 0/1 redis:latest * :6379-> 6379/tcp
90- u5cxv7ppv5o0 getstartedlab_visualizer replicated 0/1 dockersamples/visualizer:stable * :8080-> 8080/tcp
91- vy7n2piyqrtr getstartedlab_web replicated 5/5 sam/getstarted:part6 * :80-> 80/tcp
92- ` ` `
76+ ``` shell
77+ [getstartedlab] ~ /sandbox/getstart $ docker service ls
78+ ID NAME MODE REPLICAS IMAGE PORTS
79+ ioipby1vcxzm getstartedlab_redis replicated 0/1 redis:latest * :6379-> 6379/tcp
80+ u5cxv7ppv5o0 getstartedlab_visualizer replicated 0/1 dockersamples/visualizer:stable * :8080-> 8080/tcp
81+ vy7n2piyqrtr getstartedlab_web replicated 5/5 sam/getstarted:part6 * :80-> 80/tcp
82+ ```
9383
9484* Use ` docker service ps <service> ` to view tasks for a service.
9585
96- ` ` ` shell
97- [getstartedlab] ~ /sandbox/getstart $ docker service ps vy7n2piyqrtr
98- ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
99- qrcd4a9lvjel getstartedlab_web.1 sam/getstarted:part6 ip-172-31-5-208 .us-west-1.compute.internal Running Running 20 seconds ago
100- sknya8t4m51u getstartedlab_web.2 sam/getstarted:part6 ip-172-31-6-237 .us-west-1.compute.internal Running Running 17 seconds ago
101- ia730lfnrslg getstartedlab_web.3 sam/getstarted:part6 ip-172-31-20-217.us-west-1.compute.internal Running Running 21 seconds ago
102- 1edaa97h9u4k getstartedlab_web.4 sam/getstarted:part6 ip-172-31-18-121 .us-west-1.compute.internal Running Running 21 seconds ago
103- uh64ez6ahuew getstartedlab_web.5 sam/getstarted:part6 ip-172-31-18-121 .us-west-1.compute.internal Running Running 22 seconds ago
104- ` ` `
86+ ``` shell
87+ [getstartedlab] ~ /sandbox/getstart $ docker service ps vy7n2piyqrtr
88+ ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
89+ qrcd4a9lvjel getstartedlab_web.1 sam/getstarted:part6 ip-172-31-20-217 .us-west-1.compute.internal Running Running 20 seconds ago
90+ sknya8t4m51u getstartedlab_web.2 sam/getstarted:part6 ip-172-31-20-217 .us-west-1.compute.internal Running Running 17 seconds ago
91+ ia730lfnrslg getstartedlab_web.3 sam/getstarted:part6 ip-172-31-20-217.us-west-1.compute.internal Running Running 21 seconds ago
92+ 1edaa97h9u4k getstartedlab_web.4 sam/getstarted:part6 ip-172-31-20-217 .us-west-1.compute.internal Running Running 21 seconds ago
93+ uh64ez6ahuew getstartedlab_web.5 sam/getstarted:part6 ip-172-31-20-217 .us-west-1.compute.internal Running Running 22 seconds ago
94+ ```
10595
10696#### Open ports to services on cloud provider machines
10797
10898At this point, your app is deployed as a swarm on your cloud provider servers,
10999as evidenced by the ` docker ` commands you just ran. But, you still need to
110100open ports on your cloud servers in order to:
111101
112- * allow communication between the ` redis` service and ` web` service on
113- the worker nodes
102+ * if using many nodes, allow communication between the ` redis ` service and ` web ` service
114103
115- * allow inbound traffic to the ` web` service on the worker nodes so that
104+ * allow inbound traffic to the ` web ` service on any worker nodes so that
116105Hello World and Visualizer are accessible from a web browser.
117106
118107* allow inbound SSH traffic on the server that is running the ` manager ` (this may be already set on your cloud provider)
0 commit comments