Created
May 2, 2013 16:16
-
-
Save sit/5503323 to your computer and use it in GitHub Desktop.
Vagrant and Berkshelf configuration for migrating a chef-repo into Berkshelf-managed cookbooks.
(It appears berkshelf-vagrant does not do this automatically, despite what https://github.com/RiotGames/vagrant-berkshelf/blob/master/lib/berkshelf/vagrant/action.rb#L17 may suggest.)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
site :opscode | |
# Suck in all cookbooks in local chef-repo | |
Dir.entries("cookbooks").each do |cookbook_name| | |
next if cookbook_name.starts_with?('.') | |
cookbook_dir = "cookbooks/#{cookbook_name}" | |
next unless File.directory?(cookbook_dir) | |
cookbook cookbook_name, path: cookbook_dir | |
end | |
# Add your cookbooks here as per http://berkshelf.com/ | |
# cookbook 'build-essential' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.berkshelf.enabled = true | |
config.vm.provision :chef_solo do |chef| | |
chef.data_bags_path = "data_bags" | |
chef.roles_path = "roles" | |
# Set your role or Recipes here as documented at | |
# http://docs.vagrantup.com/v2/provisioning/chef_solo.html | |
# chef.add_recipe "build-essential" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment