openshift/origin — pull request #249 by ironcladlou (2014-10-23 14:39:27+00:00)
Title: Use a custom Vagrant box for direct-lvm support

This change is to improve the single-VM developer experience. Currently, the changes are only for the VirtualBox provider. A new base box hosted on mirrors.openshift.com is used.

Changes between the old and new base box:

* A separate 20GB LVM volume group with a pair of direct-lvm logical volumes is configured for Docker use.
* Git, Docker, and Go are pre-installed as essential tools.
* The NAT adapter uses virt-io.
* The vagrant user is properly configured for password-less sudo and no-tty access.

Developer experience improvements:

* Time from zero to hacking improved (tested on a 2.5ghz i5 w/ 8GB RAM and SSD):

Current:
vagrant up: 6m
build-images.sh: 5m47s (5min load avg: 0.86)

New:
vagrant up: 39s
build-images.sh: 4m18s (5min load avg: 0.46)

* Docker is pre-configured to use direct-lvm and xfs for storage, improving performance by eliminating filesystem and network overhead caused by the direct-loop approach (resulting in reduced IO waits).
* Separate logical volume enables further experimentation with other storage approaches (e.g. btrfs) - just replace the volumes in the docker storage group while the VM is online.
* GOPATH is pre-created with /home/vagrant/go/{bin,src,pkg} which solves the Vagrant mount/provisioner chicken-and-egg problem when mounting a host GOPATH/src into the guest (previously, GOPATH was root-owned, preventing standard go usage within the VM).