@@ -34,12 +34,6 @@ Dockerized application.
34
34
35
35
{% capture community %}
36
36
37
- To set up and deploy:
38
-
39
- - Install Docker Engine - Community
40
- - Create your Swarm
41
- - Deploy your app
42
-
43
37
### Install Docker Engine - Community
44
38
45
39
Find 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.
53
47
Run ` docker stack deploy -c docker-compose.yml getstartedlab ` to deploy
54
48
the app on the cloud hosted swarm.
55
49
56
- ```shell
57
- docker stack deploy -c docker-compose.yml getstartedlab
50
+ ``` shell
51
+ docker stack deploy -c docker-compose.yml getstartedlab
58
52
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
+ ```
64
58
65
- Your app is now running on your cloud provider.
59
+ Your app is now running on your cloud provider.
66
60
67
61
#### Run some swarm commands to verify the deployment
68
62
69
63
You can use the swarm command line, as you've done already, to browse and manage
70
64
the swarm. Here are some examples that should look familiar by now:
71
65
72
- * Use ` docker node ls ` to list the nodes.
66
+ * Use ` docker node ls ` to list the nodes in your swarm .
73
67
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
+ ```
82
73
83
74
* Use ` docker service ls ` to list services.
84
75
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
+ ```
93
83
94
84
* Use ` docker service ps <service> ` to view tasks for a service.
95
85
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
+ ```
105
95
106
96
#### Open ports to services on cloud provider machines
107
97
108
98
At this point, your app is deployed as a swarm on your cloud provider servers,
109
99
as evidenced by the ` docker ` commands you just ran. But, you still need to
110
100
open ports on your cloud servers in order to:
111
101
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
114
103
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
116
105
Hello World and Visualizer are accessible from a web browser.
117
106
118
107
* allow inbound SSH traffic on the server that is running the ` manager ` (this may be already set on your cloud provider)
0 commit comments