Vagrant

There is a Vagrantfile in the base of the repository, that is pre-installed with all of the dependencies required to run flocker.

See the Vagrant documentation for more details.

Boxes

There are several vagrant boxes.

Development Box (vagrant/dev)
The box is initialized with the yum repositories for ZFS and for dependencies not available in Fedora and installs all the dependencies. This is the box the Vagrantfile in the root of the repository is based on.
Tutorial Box (vagrant/tutorial)
This box is initialized with the yum repositories for ZFS and Flocker, and has Flocker pre-installed. This is the box the tutorial is based on.

Building

To build one of the above boxes, run the build script in the corresponding directory. This will generate a flocker-<box>-<version>.box file.

Upload this file to Google Cloud Storage, using gsutil:

gsutil cp -a public_read flocker-dev-$(python ../../setup.py --version).box gs://clusterhq-vagrant/

(If you’re uploading the tutorial box the image will be flocker-tutorial-... instead of flocker-dev-....)

Then add a version on Vagrant Cloud:

  1. Retrieve the public link:
  2. Vagrant Cloud (flocker-dev) or Vagrant Cloud (flocker-tutorial) as applicable.
  3. In the dropdown of versions select “Create a version”.
  4. Set the “Version” to the relevant version. No description is needed.
  5. Click “Create version” and then “Create new provider”.
  6. Set the new provider as “virtualbox” and set the URL to be the public link retrieved earlier.
  7. Click “Release now”.

Testing

It is possible to test this image locally before uploading. The build script generates metadata pointing a the locally built file, which can be used to add the box with the correct version:

vagrant box add vagrant/dev/flocker-dev.json

Then destroy and re-up that vagrant image.

It is also possible to build a vagrant image based on RPMs from a branch. If you pass a --branch argument to build, then it will use the RPMs from the latest build of that branch on Buildbot.