mirror of https://github.com/docker/docs.git
Address requested changes
This commit is contained in:
parent
12b603c577
commit
0411064829
|
@ -14,8 +14,8 @@ mode tasks and regular Docker containers can use a volume created with
|
||||||
Cloudstor to mount a persistent data volume. In Docker for AWS, Cloudstor has
|
Cloudstor to mount a persistent data volume. In Docker for AWS, Cloudstor has
|
||||||
two `backing` options:
|
two `backing` options:
|
||||||
|
|
||||||
- `relocatable` data volumes which are backed by EBS.
|
- `relocatable` data volumes are backed by EBS.
|
||||||
- `shared` data volumes which are backed by EFS.
|
- `shared` data volumes are backed by EFS.
|
||||||
|
|
||||||
When you use the Docker CLI to create a swarm service along with the persistent
|
When you use the Docker CLI to create a swarm service along with the persistent
|
||||||
volumes used by the service tasks, you can create three different types of
|
volumes used by the service tasks, you can create three different types of
|
||||||
|
@ -132,11 +132,13 @@ The only option available for EFS is `perfmode`. You can set `perfmode` to
|
||||||
`maxio` for high IO throughput:
|
`maxio` for high IO throughput:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
{% raw %}
|
||||||
$ docker service create \
|
$ docker service create \
|
||||||
--replicas 5 \
|
--replicas 5 \
|
||||||
--name ping3 \
|
--name ping3 \
|
||||||
--mount type=volume,volume-driver=cloudstor:aws,source={{.Service.Name}}-{{.Task.Slot}}-vol5,destination=/mydata,volume-opt=perfmode=maxio \
|
--mount type=volume,volume-driver=cloudstor:aws,source={{.Service.Name}}-{{.Task.Slot}}-vol5,destination=/mydata,volume-opt=perfmode=maxio \
|
||||||
alpine ping docker.com
|
alpine ping docker.com
|
||||||
|
{% endraw %}
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also create `shared` Cloudstor volumes using the
|
You can also create `shared` Cloudstor volumes using the
|
||||||
|
@ -163,11 +165,13 @@ the following volume options are available:
|
||||||
Example usage:
|
Example usage:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
{% raw %}
|
||||||
$ docker service create \
|
$ docker service create \
|
||||||
--replicas 5 \
|
--replicas 5 \
|
||||||
--name ping3 \
|
--name ping3 \
|
||||||
--mount type=volume,volume-driver=cloudstor:aws,source={{.Service.Name}}-{{.Task.Slot}}-vol,destination=/mydata,volume-opt=backing=local,volume-opt=size=25,volume-opt=ebstype=gp2 \
|
--mount type=volume,volume-driver=cloudstor:aws,source={{.Service.Name}}-{{.Task.Slot}}-vol,destination=/mydata,volume-opt=backing=local,volume-opt=size=25,volume-opt=ebstype=gp2 \
|
||||||
alpine ping docker.com
|
alpine ping docker.com
|
||||||
|
{% endraw %}
|
||||||
```
|
```
|
||||||
|
|
||||||
The above example creates and mounts a distinct Cloudstor volume backed by 25 GB EBS
|
The above example creates and mounts a distinct Cloudstor volume backed by 25 GB EBS
|
||||||
|
@ -186,7 +190,6 @@ IOPs is absolutely necessary.
|
||||||
You can also create EBS backed volumes using the `docker volume create` CLI:
|
You can also create EBS backed volumes using the `docker volume create` CLI:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
{% raw %}
|
|
||||||
$ docker volume create \
|
$ docker volume create \
|
||||||
-d "cloudstor:aws" \
|
-d "cloudstor:aws" \
|
||||||
--opt ebstype=io1 \
|
--opt ebstype=io1 \
|
||||||
|
@ -194,7 +197,6 @@ $ docker volume create \
|
||||||
--opt iops=1000 \
|
--opt iops=1000 \
|
||||||
--opt backing=relocatable \
|
--opt backing=relocatable \
|
||||||
mylocalvol1
|
mylocalvol1
|
||||||
{% endraw %}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Sharing the same `relocatable` Cloudstor volume across multiple tasks of a
|
Sharing the same `relocatable` Cloudstor volume across multiple tasks of a
|
||||||
|
@ -209,11 +211,13 @@ you already have too many EBS volumes or want to reduce the amount of time it
|
||||||
takes to transfer volume data across availability zones.
|
takes to transfer volume data across availability zones.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
{% raw %}
|
||||||
$ docker service create \
|
$ docker service create \
|
||||||
--replicas 5 \
|
--replicas 5 \
|
||||||
--name ping2 \
|
--name ping2 \
|
||||||
--mount type=volume,volume-driver=cloudstor:aws,source={{.Service.Name}}-{{.Task.Slot}}-vol,destination=/mydata \
|
--mount type=volume,volume-driver=cloudstor:aws,source={{.Service.Name}}-{{.Task.Slot}}-vol,destination=/mydata \
|
||||||
alpine ping docker.com
|
alpine ping docker.com
|
||||||
|
{% endraw %}
|
||||||
```
|
```
|
||||||
|
|
||||||
Here, each task has mounts its own volume at `/mydata/` and the files under that
|
Here, each task has mounts its own volume at `/mydata/` and the files under that
|
||||||
|
|
Loading…
Reference in New Issue