Last active
December 25, 2015 03:59
-
-
Save wwestenbrink/6913828 to your computer and use it in GitHub Desktop.
Rake tasks to work around a bug in berkshelf that destroys the vagrant shared NFS folder when installing cookbooks. Use with vagrant chef-solo provisioner. It assumes your cookbook is in the folder app-cookbook/, uses vendor/berkshelf to install & vendor/cookbooks to rsync them.
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
desc 'Install cookbooks' | |
task 'cookbooks-install' do | |
system 'berks install -b app-cookbook/Berksfile -p vendor/berkshelf/' | |
system 'rsync -aW --delete vendor/berkshelf/* vendor/cookbooks/' | |
end | |
desc 'Bring up vagrant virtual machine' | |
task 'up' => 'cookbooks-install' do | |
system 'vagrant up' | |
end | |
desc 'Bring up vagrant virtual machine using vmware_fusion provider' | |
task 'vmware-up' => 'cookbooks-install' do | |
system 'vagrant up --provider=vmware_fusion' | |
end | |
desc 'Provision vagrant virtual machine' | |
task 'provision' => 'cookbooks-install' do | |
system 'vagrant provision' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment