Commit 41d1cc9
committed
feat(contrib/ec2): use separate volume for /var/lib/docker
We've seen fewer performance issues when machines use a separate
volume for /var/lib/docker. This commit changes the AWS provision
script to automatically prepare and mount a separate volume for
Docker.
We have to touch `/etc/docker-volume-formatted` because the
user-data is applied on every reboot, and we don't want
the Docker graph getting destroyed.
Note that we use the device name `/dev/xvdf` irrespective
of the instance virtualization type (PV or HVM). This seems to be
the way the kernel maps the block device, and isn't necessarily
unusual - see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html
Amazon documentation suggests using the letter 'f' as the first name
of a non-root EBS-backed device: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html
I manually tested this on both PV and HVM instances and had no issues.
There is no change in UX other than the new requirement of installing
the PyYAML Python library.1 parent 4616d61 commit 41d1cc9
3 files changed
Lines changed: 43 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
254 | 258 | | |
255 | 259 | | |
256 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
9 | 31 | | |
10 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
11 | 40 | | |
12 | 41 | | |
13 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
| 182 | + | |
0 commit comments