travis-ci/travis-cookbooks — pull request #300 by maxlinc (2014-04-19 01:51:32+00:00)
Title: Vagrantfile and role for standard worker

I tried out creating and then packaging a worker box, as proposed in https://github.com/travis-ci/travis-ci/issues/2191. It went surprisingly well!

This can be used not just for https://github.com/travis-ci/travis-ci/issues/2191, but also to write regression tests for https://github.com/travis-ci/travis-ci/issues/2046.

I'm trying to upload the box to and publish the metadata on vagrantcloud.com, but it'll take a while. Creating your own is easy (but also takes a while):
- Run `vagrant --version` and make sure you have a recent version (I used 1.5.3)
- Run `vagrant up`
- Wait for a successful build (I had a couple minor problem, see below)
- Run `vagrant package --output travis-worker-linux.box`

The only issues I had:
- Thought I had to create the travis user, but I think this is solved with setting the user to vagrant in the role.
- The ark cookbook thought I was on freebsd for some reason and wanted to install gtar. I just commented out [this line](https://github.com/travis-ci/travis-cookbooks/blob/d90bce2d38e782ed759a56d231963e5572b7b1eb/ci_environment/ark/attributes/default.rb#L10)
- This creates a very big vagrant box (3.6GB)