Browse code

Fix markdown formatting for experimental

- don't indent code-blocks that use fences
- fixed some formatting
- wrapped long lines to 80-chars
- removed stray empty lines

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2016/06/20 16:12:48
Showing 1 changed files
... ...
@@ -2,12 +2,17 @@
2 2
 
3 3
 ## Overview
4 4
 
5
-Docker Stacks and Distributed Application Bundles are experimental features introduced in Docker 1.12 and Docker Compose 1.8, alongside the concept of swarm mode, and Nodes and Services in the Engine API.
5
+Docker Stacks and Distributed Application Bundles are experimental features
6
+introduced in Docker 1.12 and Docker Compose 1.8, alongside the concept of
7
+swarm mode, and Nodes and Services in the Engine API.
6 8
 
7
-A Dockerfile can be built into an image, and containers can be created from that
8
-image. Similarly, a docker-compose.yml can be built into a **distributed application bundle**, and **stacks** can be created from that bundle. In that sense, the bundle is a multi-services distributable image format.
9
+A Dockerfile can be built into an image, and containers can be created from
10
+that image. Similarly, a docker-compose.yml can be built into a **distributed
11
+application bundle**, and **stacks** can be created from that bundle. In that
12
+sense, the bundle is a multi-services distributable image format.
9 13
 
10
-As of Docker 1.12 and Compose 1.8, the features are experimental. Neither Docker Engine nor the Docker Registry support distribution of bundles.
14
+As of Docker 1.12 and Compose 1.8, the features are experimental. Neither
15
+Docker Engine nor the Docker Registry support distribution of bundles.
11 16
 
12 17
 ## Producing a bundle
13 18
 
... ...
@@ -18,88 +23,92 @@ Docker image.
18 18
 
19 19
 From `docker-compose`:
20 20
 
21
-    ```bash
22
-    $ docker-compose bundle
23
-    WARNING: Unsupported key 'network_mode' in services.nsqd - ignoring
24
-    WARNING: Unsupported key 'links' in services.nsqd - ignoring
25
-    WARNING: Unsupported key 'volumes' in services.nsqd - ignoring
26
-    [...]
27
-    Wrote bundle to vossibility-stack.dsb
28
-    ```
21
+```bash
22
+$ docker-compose bundle
23
+WARNING: Unsupported key 'network_mode' in services.nsqd - ignoring
24
+WARNING: Unsupported key 'links' in services.nsqd - ignoring
25
+WARNING: Unsupported key 'volumes' in services.nsqd - ignoring
26
+[...]
27
+Wrote bundle to vossibility-stack.dsb
28
+```
29 29
 
30 30
 ## Creating a stack from a bundle
31 31
 
32 32
 A stack is created using the `docker deploy` command:
33 33
 
34
-    ```bash
35
-    # docker deploy --help
34
+```bash
35
+# docker deploy --help
36 36
 
37
-    Usage:  docker deploy [OPTIONS] STACK
37
+Usage:  docker deploy [OPTIONS] STACK
38 38
 
39
-    Create and update a stack
39
+Create and update a stack
40 40
 
41
-    Options:
42
-      -f, --bundle string   Path to a bundle (Default: STACK.dsb)
43
-          --help            Print usage
44
-    ```
41
+Options:
42
+  -f, --bundle string   Path to a bundle (Default: STACK.dsb)
43
+      --help            Print usage
44
+```
45 45
 
46 46
 Let's deploy the stack created before:
47 47
 
48
-    ```bash
49
-    # docker deploy vossibility-stack
50
-    Loading bundle from vossibility-stack.dsb
51
-    Creating service vossibility-stack_elasticsearch
52
-    Creating service vossibility-stack_kibana
53
-    Creating service vossibility-stack_logstash
54
-    Creating service vossibility-stack_lookupd
55
-    Creating service vossibility-stack_nsqd
56
-    Creating service vossibility-stack_vossibility-collector
57
-    ```
48
+```bash
49
+# docker deploy vossibility-stack
50
+Loading bundle from vossibility-stack.dsb
51
+Creating service vossibility-stack_elasticsearch
52
+Creating service vossibility-stack_kibana
53
+Creating service vossibility-stack_logstash
54
+Creating service vossibility-stack_lookupd
55
+Creating service vossibility-stack_nsqd
56
+Creating service vossibility-stack_vossibility-collector
57
+```
58 58
 
59 59
 We can verify that services were correctly created:
60 60
 
61
-    ```bash
62
-    # docker service ls
63
-    ID            NAME                                     REPLICAS  IMAGE
64
-    COMMAND
65
-    29bv0vnlm903  vossibility-stack_lookupd                1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662 /nsqlookupd
66
-    4awt47624qwh  vossibility-stack_nsqd                   1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662 /nsqd --data-path=/data --lookupd-tcp-address=lookupd:4160
67
-    4tjx9biia6fs  vossibility-stack_elasticsearch          1 elasticsearch@sha256:12ac7c6af55d001f71800b83ba91a04f716e58d82e748fa6e5a7359eed2301aa
68
-    7563uuzr9eys  vossibility-stack_kibana                 1 kibana@sha256:6995a2d25709a62694a937b8a529ff36da92ebee74bafd7bf00e6caf6db2eb03
69
-    9gc5m4met4he  vossibility-stack_logstash               1 logstash@sha256:2dc8bddd1bb4a5a34e8ebaf73749f6413c101b2edef6617f2f7713926d2141fe logstash -f /etc/logstash/conf.d/logstash.conf
70
-    axqh55ipl40h  vossibility-stack_vossibility-collector  1 icecrime/vossibility-collector@sha256:f03f2977203ba6253988c18d04061c5ec7aab46bca9dfd89a9a1fa4500989fba --config /config/config.toml --debug
71
-    ```
61
+```bash
62
+# docker service ls
63
+ID            NAME                                     REPLICAS  IMAGE
64
+COMMAND
65
+29bv0vnlm903  vossibility-stack_lookupd                1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662 /nsqlookupd
66
+4awt47624qwh  vossibility-stack_nsqd                   1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662 /nsqd --data-path=/data --lookupd-tcp-address=lookupd:4160
67
+4tjx9biia6fs  vossibility-stack_elasticsearch          1 elasticsearch@sha256:12ac7c6af55d001f71800b83ba91a04f716e58d82e748fa6e5a7359eed2301aa
68
+7563uuzr9eys  vossibility-stack_kibana                 1 kibana@sha256:6995a2d25709a62694a937b8a529ff36da92ebee74bafd7bf00e6caf6db2eb03
69
+9gc5m4met4he  vossibility-stack_logstash               1 logstash@sha256:2dc8bddd1bb4a5a34e8ebaf73749f6413c101b2edef6617f2f7713926d2141fe logstash -f /etc/logstash/conf.d/logstash.conf
70
+axqh55ipl40h  vossibility-stack_vossibility-collector  1 icecrime/vossibility-collector@sha256:f03f2977203ba6253988c18d04061c5ec7aab46bca9dfd89a9a1fa4500989fba --config /config/config.toml --debug
71
+```
72 72
 
73 73
 ## Managing stacks
74 74
 
75 75
 Tasks are managed using the `docker stack` command:
76 76
 
77
-    ```bash
78
-    # docker stack --help
79
-
80
-    Usage:  docker stack COMMAND
81
-    
82
-    Manage Docker stacks
83
-    
84
-    Options:
85
-          --help   Print usage
86
-    
87
-    Commands:
88
-      config      Print the stack configuration
89
-      deploy      Create and update a stack
90
-      rm          Remove the stack
91
-      tasks       List the tasks in the stack
92
-    
93
-    Run 'docker stack COMMAND --help' for more information on a command.
94
-    ```
77
+```bash
78
+# docker stack --help
79
+
80
+Usage:  docker stack COMMAND
81
+
82
+Manage Docker stacks
83
+
84
+Options:
85
+      --help   Print usage
86
+
87
+Commands:
88
+  config      Print the stack configuration
89
+  deploy      Create and update a stack
90
+  rm          Remove the stack
91
+  tasks       List the tasks in the stack
92
+
93
+Run 'docker stack COMMAND --help' for more information on a command.
94
+```
95 95
 
96 96
 ## Bundle file format
97 97
 
98
-Distributed application bundles are described in a JSON format. When bundles are persisted as files, the file extension is `.dab` (Docker 1.12RC2 tools use `.dsb` for the file extension—this will be updated in the next release client).
98
+Distributed application bundles are described in a JSON format. When bundles
99
+are persisted as files, the file extension is `.dab` (Docker 1.12RC2 tools use
100
+`.dsb` for the file extension—this will be updated in the next release client).
99 101
 
100
-A bundle has two top-level fields: `version` and `services`. The version used by Docker 1.12 tools is `0.1`.
102
+A bundle has two top-level fields: `version` and `services`. The version used
103
+by Docker 1.12 tools is `0.1`.
101 104
 
102
-`services` in the bundle are the services that comprise the app. They correspond to the new `Service` object introduced in the 1.12 Docker Engine API.
105
+`services` in the bundle are the services that comprise the app. They
106
+correspond to the new `Service` object introduced in the 1.12 Docker Engine API.
103 107
 
104 108
 A service has the following fields:
105 109
 
... ...
@@ -108,42 +117,44 @@ A service has the following fields:
108 108
         Image (required) <code>string</code>
109 109
     </dt>
110 110
     <dd>
111
-The image that the service will run. Docker images should be referenced with full content hash to fully specify the deployment artifact for the service. Example: <code>postgres@sha256:f76245b04ddbcebab5bb6c28e76947f49222c99fec4aadb0bb1c24821a9e83ef</code>
111
+        The image that the service will run. Docker images should be referenced
112
+        with full content hash to fully specify the deployment artifact for the
113
+        service. Example:
114
+        <code>postgres@sha256:f76245b04ddbcebab5bb6c28e76947f49222c99fec4aadb0bb
115
+        1c24821a 9e83ef</code>
112 116
     </dd>
113
-
114 117
     <dt>
115 118
         Command <code>[]string</code>
116 119
     </dt>
117 120
     <dd>
118 121
         Command to run in service containers.
119 122
     </dd>
120
-
121 123
     <dt>
122 124
         Args <code>[]string</code>
123 125
     </dt>
124 126
     <dd>
125 127
         Arguments passed to the service containers.
126 128
     </dd>
127
-
128 129
     <dt>
129 130
         Env <code>[]string</code>
130 131
     </dt>
131 132
     <dd>
132 133
         Environment variables.
133 134
     </dd>
134
-
135 135
     <dt>
136 136
         Labels <code>map[string]string</code>
137 137
     </dt>
138 138
     <dd>
139 139
         Labels used for setting meta data on services.
140 140
     </dd>
141
-
142 141
     <dt>
143 142
         Ports <code>[]Port</code>
144 143
     </dt>
145 144
     <dd>
146
-        Service ports (composed of `Port` (`int`) and `Protocol` (`string`). A service description can only specify the container port to be exposed. These ports can be mapped on runtime hosts at the operator's discretion.
145
+        Service ports (composed of <code>Port</code> (<code>int</code>) and
146
+        <code>Protocol</code> (<code>string</code>). A service description can
147
+        only specify the container port to be exposed. These ports can be
148
+        mapped on runtime hosts at the operator's discretion.
147 149
     </dd>
148 150
 
149 151
     <dt>
... ...
@@ -157,14 +168,15 @@ The image that the service will run. Docker images should be referenced with ful
157 157
         User <code>string</code>
158 158
     </dt>
159 159
     <dd>
160
-        Username or UID (format: <name|uid>[:<group|gid>]).
160
+        Username or UID (format: <code>&lt;name|uid&gt;[:&lt;group|gid&gt;]</code>).
161 161
     </dd>
162 162
 
163 163
     <dt>
164 164
         Networks <code>[]string</code>
165 165
     </dt>
166 166
     <dd>
167
-        Networks that the service containers should be connected to. An entity deploying a bundle should create networks as needed.
167
+        Networks that the service containers should be connected to. An entity
168
+        deploying a bundle should create networks as needed.
168 169
     </dd>
169 170
 </dl>
170 171