fuel-library/files/fuel-docker-utils
Alexei Sheplyakov e1c00fb8d8 docker: create a host volume for building IBP images
Makes IBP images build time reasonable, especially if the master
node runs in a VM.

fuel_agent (which builds Ubuntu images) runs in the mcollective
container. In general OS setup generates quite a lot of IO.
fuel_agent builds the OS image in a loopback filesystem, which
results in an extra overhead. A container filesystem is backed
by dm-snapshot which is known to have a poor write performance,
especially for large files (like OS images). By default docker
storage is a loopback file residing in /var/lib/docker. Thus
the data written to the OS image being built goes through a number
of layers:

ext4 -> loop -> dm-snapshot (/var/lib/docker-> loop ->
     -> ext4 (/var/lib/docker) -> dm-linear (os-varlibdocker) ->
     -> hard drive

If the master node runs on a VM rather than a physcial hardware
the above chain gets even more complicated:

ext4 -> loop -> dm-snapshot (/var/lib/docker-> loop ->
     -> ext4 (/var/lib/docker) -> dm-linear (os-varlibdocker) ->
     -> virtual hard drive (qemu) -> qcow2 -> ext4 (host)

The write performance of such a setup is awful, as a result making
the basic Ubuntu installation takes more than 15 minutes.

Using the volume makes it possible to eliminate the extra layers,
so the written data goes through

ext4 -> loop -> ext4 -> dm-linear (os-var) -> hard drive

Related-Bug: #1457643
Change-Id: Id50bbea95aced153aedf831deea15025bd69c406
2015-07-04 08:52:25 +03:00
..
dockerctl All the work done for fuel-library packaging 2015-05-15 02:44:53 +03:00
dockerctl_config docker: create a host volume for building IBP images 2015-07-04 08:52:25 +03:00
dockerctl-alias.sh Backward-compatible commit for packaging of fuel-library 2015-04-16 11:23:29 +03:00
functions.sh Fix backup filename for dockerctl backup 2015-06-03 16:27:13 +03:00
get_service_credentials.py Backward-compatible commit for packaging of fuel-library 2015-04-16 11:23:29 +03:00