I am trying to get going with Berkshelf to manage cookbooks. Here are the steps
$ berks init # and use a custom Vagrant box image
$ vim Berksfile # and put cookbook 'git'
$ berks install
$ vagrant up
I would expect the last step to provision the VM with the git
cookbook, however I get:
$ bin/vagrant up /Users/pmu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/hashie-2.0.0/lib/hashie/mash.rb:80: warning: redefining `object_id' may cause serious problems [default] Importing base box 'Ubuntu-11.04'... [default] Matching MAC address for NAT networking... [default] Clearing any previously set forwarded ports... [default] Forwarding ports... [default] -- 22 => 2222 (adapter 1) [Berkshelf] installing cookbooks... [Berkshelf] Using git (2.3.0) [Berkshelf] Using dmg (1.1.0) [Berkshelf] Using build-essential (1.3.4) [Berkshelf] Using yum (2.1.0) [Berkshelf] Using windows (1.8.4) [Berkshelf] Using chef_handler (1.1.4) [Berkshelf] Using runit (1.0.6) [default] Creating shared folders metadata... [default] Clearing any previously set network interfaces... [default] Preparing network interfaces based on configuration... [default] Booting VM... [default] Waiting for VM to boot. This can take a few minutes. [default] VM booted and ready for use! [default] Configuring and enabling network interfaces... [default] Setting host name... [default] Mounting shared folders... [default] -- v-root: /vagrant [default] -- v-csc-1: /tmp/vagrant-chef-1/chef-solo-1/cookbooks [default] Running provisioner: Vagrant::Provisioners::ChefSolo... [default] Generating chef JSON and uploading... [default] Running chef-solo... stdin: is not a tty [2013-02-24T12:51:04+00:00] INFO: *** Chef 10.18.2 *** [2013-02-24T12:51:05+00:00] INFO: Setting the run_list to ["recipe[berkshelf-test::default]"] from JSON [2013-02-24T12:51:05+00:00] INFO: Run List is [recipe[berkshelf-test::default]] [2013-02-24T12:51:05+00:00] INFO: Run List expands to [berkshelf-test::default] [2013-02-24T12:51:05+00:00] INFO: Starting Chef Run for ubuntu-11.04 [2013-02-24T12:51:05+00:00] INFO: Running start handlers [2013-02-24T12:51:05+00:00] INFO: Start handlers complete. [2013-02-24T12:51:05+00:00] ERROR: Running exception handlers [2013-02-24T12:51:05+00:00] ERROR: Exception handlers complete [2013-02-24T12:51:05+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out [2013-02-24T12:51:05+00:00] FATAL: Chef::Exceptions::CookbookNotFound: Cookbook berkshelf-test not found. If you're loading berkshelf-test from another cookbook, make sure you configure the dependency in your metadata Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete.
The chef-solo part in the Vagrantfile:
config.vm.provision :chef_solo do |chef| chef.json = { :mysql => { :server_root_password => 'rootpass', :server_debian_password => 'debpass', :server_repl_password => 'replpass' } } chef.run_list = [ "recipe[berkshelf-test::default]" ] end