Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

[Deprecated] Travis Boxes makes provisioning and configuring Virtual Box machines simple and easy.

branch: travis_user

This branch is 0 commits ahead and 121 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 config
Octocat-spinner-32 definitions
Octocat-spinner-32 lib
Octocat-spinner-32 spec get the specs passing again December 02, 2011
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml Revert "test against jruby 1.8" February 27, 2012
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock always bundle update! June 12, 2012
Octocat-spinner-32 LICENSE Add MIT license file November 13, 2011
Octocat-spinner-32 README.md
Octocat-spinner-32 Thorfile added a simple way to create a config/worker.yml November 21, 2011
Octocat-spinner-32 Vagrantfile
README.md

Travis Boxes

Travis Boxes is a set of tools that travis-ci.org team uses to create VM images/Vagrant boxes for CI environment virtual machines.

Build Status

Getting Started

Apart from running bundle install, also run

$ thor travis:init

This will create a blank config/worker.yml, please read 'Box Customization' for more info.

Chef Cookbooks location

We use OpsCode Chef to provision VMs (and everything else). travis-boxes assumes travis-cookbooks are located one directory up, like this:

travis-boxes
travis-cookbooks

Building Boxes

Use the provided thor tasks to build VirtualBox base boxes and worker boxes, including uploading them to S3. They can then be distributed to the worker machines and used for updating the vms.

Worker boxes are built per "environment" (i.e. worker type, e.g. "staging", "ruby", "rails", ...)

E.g. for rebuilding the staging base box use:

$ thor travis:box:build staging

You can also use the thor tasks to build a new base box which the worker boxes are provisioned on top of.

$ thor travis:base:build

Box Customization

Configuration for the boxes is in the local and shared config/*.yml files.

The shared file config/worker.base.yml will be used for configuration common to all boxes and it will be merged with the shared file config/[environment].yml.

The result is then also merged with

  • the "base" section from the local file config/worker.yml
  • the respective environment section (e.g. "staging") from the local file config/worker.yml

The file config/worker.yml is meant to be local and should not be checked in.

Example:

# config/worker.base.yml (in travis-boxes)
foo: foo

# config/worker.staging.yml (in travis-boxes)
bar: bar

# config/worker.yml (in the current working directory)
base:
  secret: secret
staging:
  another_secret: another_secret

# Travis::Boxes::Config.new.staging
{
  'foo' => 'Foo',
  'bar' => 'bar',
  'secret' => 'secret',
  'another_secret' => 'another_secret',
}

The Standard box

Because different language/technology VM setups overlap, we first build the standard box that only has, for example, 1 Ruby, 1 Python and 1 Node.js version and then provision VM-specific tools on top of that by modifying Chef node attributes in host machine specific worker.yml.

Uploading boxes

To upload a base box you can use:

thor travis:base:upload

This will upload the natty32.box by default. You can use -d to specify a different base box definition to upload.

To upload a provisioned box you can use:

thor travis:box:upload

This will upload the travis-staging.box by default, renaming it to staging/[yyyy-mm-dd-hhmm].box during the upload process. If you want to upload a different provisioned box you can use the -d option, for example:

thor travis:box:upload standard
thor travis:box:upload ruby

If you need access to files.travis-ci.org, pass your SSH key to @michaelklishin

License

travis-boxes is released under the MIT license.

Copyright

2011-2012, The Travis CI Team (contact@travis-ci.org)

Something went wrong with that request. Please try again.