My personal bootstrapped Vagrantfile to automatically generate multiple machines.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


My personal bootstrapped Vagrantfile to automatically generate multiple machines.

Repository Files

  • .bin - mainly used for scripts (if you need to)
  • .gitignore - ignore rules to tell git what files to ignore
  • .ruby-gemset - currently used Ruby gemset with RVM
  • .ruby-version - currently used Ruby version
  • Gemfile - Gems needed (right now, none)
  • Vagrantfile - the primary function is to describe the type of machine required for a project, and how to configure and provision these machines

Vagrant commands (excerpt)

  • vagrant up - starts the Debian, CentOS and Ubuntu VMs on all different providers
  • vagrant up --provider=virtualbox - starts the Debian, CentOS and Ubuntu on VirtualBox (or vmware_fusion, which will be added soon)
  • vagrant up debian - starts the Debian Virtual Machine (I also did the pre-settings for ubuntu and centos.

Use vagrant help to get a detailed list of commands.



I give you a short tutorial on how to install everything on a Mac. There are probably far better tutorials for Linux and other OS. The easiest way to install RVM is by using JewelryBox which is an official OSX RVM GUI. From inside the app you can install your preferred Ruby version e.g. ruby-2.0.0-p0 and name your RVM gemset e.g. vagrant-buildbox. (see under usage)

Also make sure to install the latest Vagrant version as well as the latest version of VirtualBox.

Create your working environment

Clone the repository to your working directory.

git clone <repo_name>

Whenever you switch to the working directory you will be asked to use a specific RVM gemset. Make sure to edit vim .ruby-gemset and vim .ruby-version to your needs in advance if you want to name the RVM gemset differently.

cd <repo_name>

Make sure to install bundler (in advance execute gem install bundler).
Install all other dependencies using bundler

bundle install

Attention: If you have any older versions installed, please make sure to use bundle update to update your Gemfile.lock

Next steps

  • Next step: Chef Solo integration
  • Next step: VMWare, AWS, LXC (though you still have to install plugins for that e.g. vagrant plugin install <foo> like vagrant-aws, vagrant-lxc, vagrant-vmware-fusion
  • Next step: switch to JSON files for easier configuration