Berkshelf a Vagrant Plugin

Berkshelf is a bundler-like dependency manger for Chef cookbook. vagrant-berkshelf is a Vagrant plugin to add Berkshelf integration to Chef provisioners to avoid the need to install cookbooks locally and have everything ready when you bring vagrant up.

How to use?

Install vagrant-berkshelf

$ vagrant plugin install vagrant-berkshelf

Enable it in Vagrantfile

Vagrant.configure("2") do |config|
  ...
  config.berkshelf.enabled = true
  ...
end

Generate a Berksfile in the root of your project

site :opscode
cookbook 'apt'
cookbook 'build-essential'

cookbook 'ruby_build', git: 'https://github.com/fnichol/chef-ruby_build.git'
cookbook 'rbenv', git: 'https://github.com/fnichol/chef-rbenv.git'

cookbook 'vim', path: './cookbooks/vim'

That’s it! vagrant up