Git Product home page Git Product logo

vagrant-berkshelf's Introduction

Berkshelf

Gem Version Matrix Testing

Manage Chef Infra cookbooks and cookbook dependencies

Warning

Berkshelf is effectively deprecated. There is no ongoing maintenance and triage of issues. No active work is being done on bugfixes. The only work being done is to maintain it so that it continues to ship and run in its existing state.

Existing users should strongly consider migrating to Policyfiles and new users should avoid using Berkshelf.

Installation

Berkshelf is now included as part of the Chef Workstation. This is fastest, easiest, and the recommended installation method for getting up and running with Berkshelf.

note: You may need to uninstall the Berkshelf gem especially if you are using a Ruby version manager you may need to uninstall all Berkshelf gems from each Ruby installation.

From Rubygems

If you are a developer or you prefer to install from Rubygems, we've got you covered.

Add Berkshelf to your repository's Gemfile:

gem 'berkshelf'

Or run it as a standalone:

$ gem install berkshelf

Usage

See docs.chef.io for up-to-date usage instructions.

CLI Usage

Berkshelf is intended to be used as a CLI tool. It is not intended to be used as a library. Other ruby code should shell out to the command line tool to use it.

Supported Platforms

Berkshelf is tested and supported on Ruby 2.4 and later.

Configuration

Berkshelf will search in specific locations for a configuration file. In order:

$PWD/.berkshelf/config.json
~/.berkshelf/config.json

You are encouraged to keep project-specific configuration in the $PWD/.berkshelf directory. A default configuration file is generated for you, but you can update the values to suit your needs.

Shell Completion

Plugins

Please see Plugins page for more information.

Getting Help

  • If you have an issue: report it on the issue tracker
  • If you have a question: visit the #chef or #berkshelf channel on irc.freenode.net

Authors

Thank you to all of our Contributors, testers, and users.

If you'd like to contribute, please see our contribution guidelines first.

vagrant-berkshelf's People

Contributors

bobziuchkovski avatar chulkilee avatar danshultz avatar evverx avatar fschwiet avatar grafikart avatar issacg avatar ivey avatar jdmulloy avatar jjshoe avatar jkburges avatar justincampbell avatar kalabiyau avatar keitwb avatar leoh0 avatar miguelaferreira avatar mikedillion avatar mpasternacki avatar pezra avatar renier avatar reset avatar sethvargo avatar tas50 avatar tcharl avatar themgt avatar thommay avatar tknerr avatar tmatilai avatar volkanunsal avatar yanhaoyang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vagrant-berkshelf's Issues

Virtualbox private network should be prepared before berks upload

At the moment "vagrant up" first imports the box, then starts uploading cookbooks and only after that prepares vbox network and boots up the VM.

If one uses chef server (probably chef-zero) that listens on the vbox host ip (so that knife.rb can be shared for multiple users without tuning ip's) berks upload fails because the network isn't available yet.

Would it be possible to let Vagrant prepare the private network before starting the berks upload?

Failed to install plugin - gcc: error trying to exec 'cc1': execvp: No such file or directory

I've google around and can't seem to figure out what is actually happening here.

vagrant plugin install vagrant-berkshelf                                                                                                               
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
/Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:562:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/Applications/Vagrant/embedded/bin/ruby extconf.rb
creating Makefile

make
compiling yajl.c
gcc: error trying to exec 'cc1': execvp: No such file or directory
make: *** [yajl.o] Error 1


Gem files will remain installed in /Users/jchauncey/.vagrant.d/gems/gems/yajl-ruby-1.1.0 for inspection.
Results logged to /Users/jchauncey/.vagrant.d/gems/gems/yajl-ruby-1.1.0/ext/yajl/gem_make.out
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:540:in `block in build_extensions'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `each'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `build_extensions'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:180:in `install'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:297:in `block in install'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each_with_index'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `install'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/action/install_gem.rb:38:in `block in call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/action/install_gem.rb:28:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/command/base.rb:17:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/command/install.rb:44:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/command/root.rb:47:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/cli.rb:46:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:467:in `cli'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:84:in `<top (required)>'
    from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
    from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

Update changelog

The change log seems to be out of date. Opening this to request that it be brought up to date from 1.2 -> 1.3.2

thanks!

Can't disable Berkshelf for individual VMs in a multi-VM Vagrantfile when a Berksfile is present

Essentially it doesn't use the machine configuration but instead the global configuration. E.g. this does not work if there is a Berksfile next to the Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.define "foo" do |cfg|
    cfg.berkshelf.enabled = false
    ...
  end
end

whereas this works but will disable Berkshelf for all VMs:

Vagrant.configure("2") do |config|
  config.berkshelf.enabled = false
  config.vm.define "foo" do |cfg|
    ...
  end
end

This is with vagrant-berkshelf 1.3.2.

Cookbooks uploaded to .berkshelf/config.json configuration instead of Vagrantfile config

When my provisioner block is:

config.vm.provision :chef_client do |chef|
  chef.chef_server_url        = chef_server_url
  chef.validation_key_path    = validation_key_path
  chef.validation_client_name = validation_client_name
  chef.client_key_path        = client_key_path
  chef.environment            = environment

  chef.json = {
  }

  chef.run_list = [
    "recipe[riot_nexus]"
  ]
end

The plugin begins outputting correctly:

[Berkshelf] Uploading cookbooks to 'https://chef-server-configured-by/chef_server_url'

But when it begins to upload the cookbooks:

[Berkshelf] Uploading riot_nexus (2.0.0) to: 'https://a-different-chef-server/and_organization'

This different Chef server URL is the one that is configured in my ~/.berkshelf/config.json.

The vagrant-berkshelf plugin must be reading and outputting my configured value in the first example, but must be uploading to the default configuration.

Ignore plugin when no Berksfile found

Right now vagrant will stop the provisioning if the Berksfile is not found. This should be changed to a warning.

[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
Berkshelf::BerksfileNotFound: No Berksfile or Berksfile.lock found at: /path/to/my/project/Berksfile

This breaks vagrant on my other projects where I don't use berkshelf.

vagrant(v1.2.2) display "Failed to load the "vagrant-berkshelf" plugin" after install

vagrant ( v 1.2.2 ) seems can not install plugin vagrant-berkshelf very well, here's the symptoms when I try to install this plugin in Mac OS X.

>>vagrant -v
Vagrant version 1.2.2

>>vagrant plugin install vagrant-berkshelf
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
Installed the plugin 'vagrant-berkshelf (1.2.0)'!

>>vagrant -v
Failed to load the "vagrant-berkshelf" plugin. View logs for more details.

Vagrant version 1.2.2

And I try to vagant up with "config.berkshelf.enabled = true" in my VagrantFile, it turns out can not load section of berkshelf

>>>vagrant up
Failed to load the "vagrant-berkshelf" plugin. View logs for more details.

Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

Vagrant:
* Unknown configuration section 'berkshelf'.

ERROR: Failed to build gem native extension

Tried to update Berkshelf but failed. Checked I have the latest XCode command line tools and Vagrant version 1.1.0.

Olorin:myface modius$ vagrant plugin install berkshelf-vagrant
[WARNING] Berkshelf not found in your Vagrant's RubyGems but your Vagrantfile is attempting
[WARNING] to require the Berkshelf Vagrant plugin! Install the Berkshelf Vagrant plugin or
[WARNING] remove the 'require "berkshelf/vagrant"' line from the top of your Vagrantfile.

If you installed Vagrant by RubyGems:
  Install Berkshelf by running: "gem install berkshelf"
If you installed Vagrant by one of the pre-packaged installers:
  Install Berkshelf by running: "vagrant gem install berkshelf"

Installing the 'berkshelf-vagrant' plugin. This can take a few minutes...
/Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:562:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

        /Applications/Vagrant/embedded/bin/ruby extconf.rb
creating Makefile

make
make: *** No rule to make target `/Applications/Vagrant/embedded/include/ruby-1.9.1/x86_64-darwin12.2.1/ruby/config.h', needed by `yajl.o'.  Stop.


Gem files will remain installed in /Users/modius/.vagrant.d/gems/gems/yajl-ruby-1.1.0 for inspection.
Results logged to /Users/modius/.vagrant.d/gems/gems/yajl-ruby-1.1.0/ext/yajl/gem_make.out
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:540:in `block in build_extensions'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `each'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `build_extensions'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:180:in `install'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:297:in `block in install'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each_with_index'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `install'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/commands/plugin/action/install_gem.rb:27:in `block in call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/commands/plugin/action/install_gem.rb:23:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/builder.rb:109:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/commands/plugin/command/base.rb:17:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/commands/plugin/command/install.rb:28:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/commands/plugin/command/root.rb:47:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/cli.rb:46:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/environment.rb:406:in `cli'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/bin/vagrant:60:in `<top (required)>'
    from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
    from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

ChefClient provider configuration attributes are not read from ~/.berkshelf/config.json

ChefClient provider configuration attributes are not read from ~/.berkshelf/config.json. When you supply information thusly:

~/.berkshelf/config.json

(I changed our Chef server URL to example.org.)

{
   "vagrant" : {
      "vm" : {
         "forward_port" : {},
         "network" : {
            "bridged" : false,
            "hostonly" : "33.33.33.10"
         },
         "provision" : "chef_solo",
         "box_url" : "https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_chef-11.2.0.box",
         "box" : "opscode-ubuntu-12.04"
      }
   },
   "chef" : {
      "client_key" : "/home/force/.chef/justinforce.pem",
      "node_name" : "justinforce",
      "validation_key_path" : "/home/force/.chef/validation.pem",
      "validation_client_name" : "chef-validator",
      "chef_server_url" : "http://example.org:4000"
   },
   "ssl" : {
      "verify" : true
   },
   "cookbook" : {
      "email" : "YOUR_EMAIL",
      "copyright" : "YOUR_NAME",
      "license" : "reserved"
   }
}

When you run vagrant up with provider configuration that looks like this:

  config.vm.provision :chef_client do |chef|
    chef.run_list = [
      "recipe[mycookbook::default]"
    ]
  end

You get this error

% vagrant up                                                                                            (master|โ€ฆ)
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

chef client provisioner:
* Chef server URL must be populated.
* Validation key path must be valid path to your chef server validation key.

So I tried copying those values into my configuration thusly:

  config.vm.provision :chef_client do |chef|

    chef.chef_server_url         =  'http://example.org:4000/'
     chef.client_key              =  '/home/force/.chef/justinforce.pem'
    chef.node_name               =  'justinforce'
    chef.validation_client_name  =  'chef-validator'
    chef.validation_key_path     =  '/home/force/.chef/validation.pem'

    chef.run_list = [
      "recipe[mycookbook::default]"
    ]
  end

And then I get this when I run vagrant up:

% vagrant up
/home/force/Dropbox/code/chef/site-cookbooks/mycookbook/Vagrantfile:72:in `block (2 levels) in <top (required)>': undefined method `client_key=' for #<VagrantPlugins::Chef::Config::ChefClient:0x00000001622c70> (NoMethodError)
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/kernel_v2/config/vm_provisioner.rb:42:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/kernel_v2/config/vm_provisioner.rb:42:in `initialize'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/kernel_v2/config/vm.rb:154:in `new'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/kernel_v2/config/vm.rb:154:in `provision'
    from /home/force/Dropbox/code/chef/site-cookbooks/mycookbook/Vagrantfile:69:in `block in <top (required)>'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/config/v2/loader.rb:37:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/config/v2/loader.rb:37:in `load'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/config/loader.rb:104:in `block (2 levels) in load'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/config/loader.rb:98:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/config/loader.rb:98:in `block in load'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/config/loader.rb:95:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/config/loader.rb:95:in `load'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/environment.rb:238:in `config_global'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/environment.rb:443:in `block in action_runner'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:28:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:28:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/environment.rb:251:in `hook'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/environment.rb:131:in `initialize'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/bin/vagrant:53:in `new'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/bin/vagrant:53:in `<top (required)>'
    from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
    from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

...so I comment out the chef.client_key line and try again and I get:

% vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'opscode-ubuntu-12.04'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[Berkshelf] Uploading cookbooks to 'http://example.org:4000/'
[Berkshelf] Using mycookbook (0.1.0) at path: '/home/force/Dropbox/code/chef/site-cookbooks/mycookbook'
[Berkshelf] Using sudo (2.0.4)
[Berkshelf] Using users (1.4.0)
[Berkshelf] Uploading mycookbook (0.1.0) to: 'http://example.org:4000/'
Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: Connection refused - connect(2)
    /opt/vagrant/embedded/lib/ruby/1.9.1/net/http.rb:762:in `initialize'
    /opt/vagrant/embedded/lib/ruby/1.9.1/net/http.rb:762:in `open'
    /opt/vagrant/embedded/lib/ruby/1.9.1/net/http.rb:762:in `block in connect'
    /opt/vagrant/embedded/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
    /opt/vagrant/embedded/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
    /opt/vagrant/embedded/lib/ruby/1.9.1/net/http.rb:762:in `connect'
    /opt/vagrant/embedded/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
    /opt/vagrant/embedded/lib/ruby/1.9.1/net/http.rb:744:in `start'
    /opt/vagrant/embedded/lib/ruby/1.9.1/net/http.rb:1284:in `request'
    /home/force/.vagrant.d/gems/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:75:in `perform_request'
    /home/force/.vagrant.d/gems/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:38:in `call'
    /home/force/.vagrant.d/gems/gems/ridley-0.9.0/lib/ridley/middleware/chef_auth.rb:72:in `call'
    /home/force/.vagrant.d/gems/gems/ridley-0.9.0/lib/ridley/middleware/follow_redirects.rb:67:in `perform_with_redirection'
    /home/force/.vagrant.d/gems/gems/ridley-0.9.0/lib/ridley/middleware/follow_redirects.rb:60:in `call'
    /home/force/.vagrant.d/gems/gems/faraday-0.8.7/lib/faraday/response.rb:8:in `call'
    /home/force/.vagrant.d/gems/gems/faraday-0.8.7/lib/faraday/connection.rb:247:in `run_request'
    /home/force/.vagrant.d/gems/gems/faraday-0.8.7/lib/faraday/connection.rb:112:in `put'
    /home/force/.vagrant.d/gems/gems/ridley-0.9.0/lib/ridley/sandbox_uploader.rb:113:in `upload'
    /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/calls.rb:11:in `public_send'
    /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/calls.rb:11:in `dispatch'
    /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/calls.rb:63:in `dispatch'
    /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/actor.rb:326:in `block in handle_message'
    /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/tasks/task_fiber.rb:28:in `block in initialize'
[default] Destroying VM and associated drives...
/home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/tasks/task_fiber.rb:42:in `suspend': task was terminated (Celluloid::Task::TerminatedError)
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/tasks.rb:19:in `suspend'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/receivers.rb:27:in `receive'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/actor.rb:268:in `block in receive'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/actor.rb:267:in `loop'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/actor.rb:267:in `receive'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid.rb:378:in `receive'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/core_ext.rb:15:in `receive'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/future.rb:72:in `value'
    from /home/force/.vagrant.d/gems/gems/ridley-0.9.0/lib/ridley/sandbox_uploader.rb:82:in `map'
    from /home/force/.vagrant.d/gems/gems/ridley-0.9.0/lib/ridley/sandbox_uploader.rb:82:in `multi_upload'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/calls.rb:11:in `public_send'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/calls.rb:11:in `dispatch'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/calls.rb:63:in `dispatch'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/actor.rb:326:in `block in handle_message'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/tasks/task_fiber.rb:28:in `block in initialize'
    from (celluloid):0:in `remote procedure call'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/actor.rb:69:in `call'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/proxies/actor_proxy.rb:26:in `_send_'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/pool_manager.rb:41:in `_send_'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/pool_manager.rb:122:in `method_missing'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/calls.rb:11:in `public_send'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/calls.rb:11:in `dispatch'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/calls.rb:63:in `dispatch'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/actor.rb:326:in `block in handle_message'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/tasks/task_fiber.rb:28:in `block in initialize'
    from (celluloid):0:in `remote procedure call'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/actor.rb:69:in `call'
    from /home/force/.vagrant.d/gems/gems/celluloid-0.13.0/lib/celluloid/legacy.rb:14:in `method_missing'
    from /home/force/.vagrant.d/gems/gems/ridley-0.9.0/lib/ridley/sandbox_uploader.rb:19:in `upload'
    from /home/force/.vagrant.d/gems/gems/ridley-0.9.0/lib/ridley/resources/sandbox_resource.rb:73:in `upload'
    from /home/force/.vagrant.d/gems/gems/ridley-0.9.0/lib/ridley/resources/cookbook_resource.rb:212:in `upload'
    from /home/force/.vagrant.d/gems/gems/ridley-0.9.0/lib/ridley/chain_link.rb:22:in `method_missing'
    from /home/force/.vagrant.d/gems/gems/berkshelf-1.3.1/lib/berkshelf/berksfile.rb:489:in `block in upload'
    from /home/force/.vagrant.d/gems/gems/berkshelf-1.3.1/lib/berkshelf/berksfile.rb:484:in `each'
    from /home/force/.vagrant.d/gems/gems/berkshelf-1.3.1/lib/berkshelf/berksfile.rb:484:in `upload'
    from /home/force/.vagrant.d/gems/gems/berkshelf-vagrant-1.0.6/lib/berkshelf/vagrant/action/upload.rb:27:in `block in upload'
    from /home/force/.vagrant.d/gems/gems/berkshelf-vagrant-1.0.6/lib/berkshelf/vagrant/action/upload.rb:25:in `each'
    from /home/force/.vagrant.d/gems/gems/berkshelf-vagrant-1.0.6/lib/berkshelf/vagrant/action/upload.rb:25:in `upload'
    from /home/force/.vagrant.d/gems/gems/berkshelf-vagrant-1.0.6/lib/berkshelf/vagrant/action/upload.rb:14:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/builder.rb:109:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:94:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/builtin/provision.rb:45:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:13:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/providers/virtualbox/action/set_name.rb:35:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:61:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:61:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:61:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:61:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:61:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:61:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/builtin/call.rb:57:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/builder.rb:109:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:61:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:61:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/machine.rb:129:in `action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/up/command.rb:37:in `block in execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/plugin/v2/command.rb:182:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/plugin/v2/command.rb:180:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/plugin/v2/command.rb:180:in `with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/up/command.rb:32:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/cli.rb:46:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/environment.rb:408:in `cli'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/bin/vagrant:75:in `<top (required)>'
    from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
    from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

So I can't get this to work. I think it may be related to berkshelf issue #225.

Environment information

% which rvm
/home/force/.rvm/bin/rvm
% rvm version

rvm 1.19.1 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]

% which ruby
/home/force/.rvm/rubies/ruby-1.9.3-p392/bin/ruby
% ruby --version
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
% which berks
/home/force/.rvm/gems/ruby-1.9.3-p392/bin/berks
% berks version
Berkshelf (1.3.1)

Author:: Jamie Winsor (<[email protected]>)
Author:: Josiah Kiehl (<[email protected]>)
Author:: Michael Ivey (<[email protected]>)
Author:: Justin Campbell (<[email protected]>)

Copyright 2012 Riot Games

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
% which vagrant
/usr/bin/vagrant
% vagrant --version
Vagrant version 1.1.5

vagrant up - Uninitialized constant

Just started seeing this:

$ bundle exec vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'Berkshelf-CentOS-6.3-x86_64-minimal'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
Berkshelf::BerksfileReadError: An error occurred while reading the Berksfile: uninitialized constant Chozo::Mixin::ParamsValidate::ValidationFailed

This is with a clean install under RVM with Ruby 1.9.3-p194:

$ rvm gemset create berks

$ rvm gemset use berks

$ gem install chef berkshelf --no-ri --no-rdoc
Fetching: mixlib-config-1.1.2.gem (100%)
Successfully installed mixlib-config-1.1.2
Fetching: mixlib-cli-1.3.0.gem (100%)
Successfully installed mixlib-cli-1.3.0
Fetching: mixlib-log-1.6.0.gem (100%)
Successfully installed mixlib-log-1.6.0
Fetching: mixlib-authentication-1.3.0.gem (100%)
Successfully installed mixlib-authentication-1.3.0
Fetching: mixlib-shellout-1.1.0.gem (100%)
Successfully installed mixlib-shellout-1.1.0
Fetching: ohai-6.16.0.gem (100%)
Successfully installed ohai-6.16.0
Fetching: mime-types-1.23.gem (100%)
Successfully installed mime-types-1.23
Fetching: rest-client-1.6.7.gem (100%)
Successfully installed rest-client-1.6.7
Fetching: json-1.7.7.gem (100%)
Building native extensions.  This could take a while...
Successfully installed json-1.7.7
Fetching: net-ssh-2.6.7.gem (100%)
Successfully installed net-ssh-2.6.7
Fetching: net-ssh-gateway-1.2.0.gem (100%)
Successfully installed net-ssh-gateway-1.2.0
Fetching: net-ssh-multi-1.1.gem (100%)
Successfully installed net-ssh-multi-1.1
Fetching: highline-1.6.19.gem (100%)
Successfully installed highline-1.6.19
Fetching: erubis-2.7.0.gem (100%)
Successfully installed erubis-2.7.0
Fetching: chef-11.4.4.gem (100%)
Successfully installed chef-11.4.4
Fetching: timers-1.1.0.gem (100%)
Successfully installed timers-1.1.0
Fetching: celluloid-0.14.1.gem (100%)
Successfully installed celluloid-0.14.1
Fetching: i18n-0.6.1.gem (100%)
Successfully installed i18n-0.6.1
Fetching: multi_json-1.7.6.gem (100%)
Successfully installed multi_json-1.7.6
Fetching: activesupport-3.2.13.gem (100%)
Successfully installed activesupport-3.2.13
Fetching: multipart-post-1.2.0.gem (100%)
Successfully installed multipart-post-1.2.0
Fetching: faraday-0.8.7.gem (100%)
Successfully installed faraday-0.8.7
Fetching: addressable-2.3.4.gem (100%)
Successfully installed addressable-2.3.4
Fetching: hashie-2.0.5.gem (100%)
Successfully installed hashie-2.0.5
Fetching: chozo-0.6.1.gem (100%)
Successfully installed chozo-0.6.1
Fetching: net-http-persistent-2.8.gem (100%)
Successfully installed net-http-persistent-2.8
Fetching: retryable-1.3.3.gem (100%)
Successfully installed retryable-1.3.3
Fetching: solve-0.4.4.gem (100%)
Successfully installed solve-0.4.4
Fetching: ffi-1.8.1.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ffi-1.8.1
Fetching: gssapi-1.0.3.gem (100%)
Successfully installed gssapi-1.0.3
Fetching: nokogiri-1.5.9.gem (100%)
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.5.9
Fetching: httpclient-2.2.0.2.gem (100%)
Successfully installed httpclient-2.2.0.2
Fetching: rubyntlm-0.1.1.gem (100%)
Successfully installed rubyntlm-0.1.1
Fetching: builder-3.2.2.gem (100%)
Successfully installed builder-3.2.2
Fetching: nori-1.1.5.gem (100%)
Successfully installed nori-1.1.5
Fetching: rack-1.5.2.gem (100%)
Successfully installed rack-1.5.2
Fetching: httpi-0.9.7.gem (100%)
Successfully installed httpi-0.9.7
Fetching: wasabi-1.0.0.gem (100%)
Successfully installed wasabi-1.0.0
Fetching: gyoku-1.0.0.gem (100%)
Successfully installed gyoku-1.0.0
Fetching: akami-1.2.0.gem (100%)
Successfully installed akami-1.2.0
Fetching: savon-0.9.5.gem (100%)
Successfully installed savon-0.9.5
Fetching: little-plugger-1.1.3.gem (100%)
Successfully installed little-plugger-1.1.3
Fetching: logging-1.6.2.gem (100%)
Successfully installed logging-1.6.2
Fetching: winrm-1.1.2.gem (100%)
Successfully installed winrm-1.1.2
Fetching: ridley-0.12.4.gem (100%)
Successfully installed ridley-0.12.4
Fetching: minitar-0.5.4.gem (100%)
Successfully installed minitar-0.5.4
Fetching: thor-0.18.1.gem (100%)
Successfully installed thor-0.18.1
Fetching: berkshelf-1.4.5.gem (100%)
Successfully installed berkshelf-1.4.5
48 gems installed

$ gem install bundler
Fetching: bundler-1.3.5.gem (100%)
Successfully installed bundler-1.3.5
Installing ri documentation for bundler-1.3.5
1 gem installed

$ bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Using i18n (0.6.1) 
Installing multi_json (1.7.2) 
Using activesupport (3.2.13) 
Installing addressable (2.3.3) 
Using timers (1.1.0) 
Installing celluloid (0.13.0) 
Installing hashie (2.0.3) 
Using chozo (0.6.1) 
Using multipart-post (1.2.0) 
Using faraday (0.8.7) 
Using json (1.7.7) 
Using minitar (0.5.4) 
Using mixlib-config (1.1.2) 
Using mixlib-shellout (1.1.0) 
Installing retryable (1.3.2) 
Using erubis (2.7.0) 
Installing mixlib-log (1.4.1) 
Using mixlib-authentication (1.3.0) 
Using net-http-persistent (2.8) 
Installing net-ssh (2.6.6) 
Installing solve (0.4.2) 
Installing ridley (0.9.0) 
Installing thor (0.16.0) 
Using yajl-ruby (1.1.0) 
Installing berkshelf (1.3.1) 
Using bundler (1.3.5) 
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

gcc issue?? installation problem

hi, I'm getting some sort of error when I run:
vagrant plugin install vagrant-berkshelf

[~] jonny-> vagrant plugin install vagrant-berkshelf
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
/Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:562:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

        /Applications/Vagrant/embedded/bin/ruby extconf.rb
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for exsltFuncRegister() in -lexslt... yes
checking for xmlHasFeature()... yes
checking for xmlFirstElementChild()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile

make
compiling html_document.c
/bin/sh: gcc-4.2: command not found
make: *** [html_document.o] Error 127


Gem files will remain installed in /Users/jonny/.vagrant.d/gems/gems/nokogiri-1.5.10 for inspection.
Results logged to /Users/jonny/.vagrant.d/gems/gems/nokogiri-1.5.10/ext/nokogiri/gem_make.out
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:540:in `block in build_extensions'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `each'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `build_extensions'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:180:in `install'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:297:in `block in install'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each_with_index'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `install'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/action/install_gem.rb:38:in `block in call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/action/install_gem.rb:28:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/command/base.rb:17:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/command/install.rb:44:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/command/root.rb:47:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/cli.rb:46:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:467:in `cli'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:84:in `<top (required)>'
    from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
    from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

Berkshelf doesnt work w/ Vagrant AWS provisoner

Not really sure where to start here, so I'll open the ticket and wait for feedback. I was playing around w/ the Vagrant aws provisioner and noticed that Berkshelf doesnt seem to run at all. The instance is provisioned but I never see Berkshelf download the cookbooks and the chef run of course fails because no cookbooks are synced to the remote instance.

Unknown configuration section 'berkshelf'

I'm having a problem here with latest vagrant, berkshelf and vmware fusion.

$ vagrant -v
Vagrant version 1.2.1
$ vagrant plugin list
berkshelf-vagrant (1.1.3)
vagrant-vmware-fusion (0.5.1)

Vagrantfile, Berksfile and the output of 'vagrant up' are there: https://gist.github.com/jkraemer/5418865

The Vagrantfile was generated by berks init, I only modified the box name, box url and run list. Looking at the log it looks like the berkshelf plugin gets loaded successfully, but then it seems to fail to extend vagrant's config mechanism to recognize the berkshelf options...

Offline mode

Need a way to bring up a vagrant box without hitting all the repos. May be resolved w/ the git caching PR and lockfile changes.

Requested by @dysinger in IRC.

Vagrant not using the lastest cookbooks

I am using the most current version of berkshelf from master.
My cookbooks from Github update properly now.
However when I run a vagrant up or vagrant provision it uses and outdated version of cookbooks even though the newest version is installed by berkshelf and is correct in the Berksfile.lock. Am I missing something?

You can see that running a berks update install atlas 0.1.3 from Github

~/Projects/atlas (Vagrant โœ˜)โœน แ… berks update
Installing atlas (0.1.3) from github: 'CTSATLAS/atlas-cookbook' with branch: 'master' over protocol: 'ssh'
Using apt (1.9.2)
Using git (2.5.0)
Using dmg (1.1.0)
Using build-essential (1.4.0)
Using yum (2.2.0)
Using windows (1.8.10)
Using chef_handler (1.1.4)
Using runit (1.1.4)
Using apache2 (1.6.2)
Using database (1.3.12)
Using mysql (3.0.0)
Using openssl (1.0.2)
Using postgresql (2.4.0)
Using aws (0.100.6)
Using xfs (1.1.0)
Using php (1.1.8)
Using xml (1.1.2)
Using imagemagick (0.2.2)
Using wkhtmltopdf (0.1.0)
Using nodejs (1.1.2)

But then running a vagrant provision uses atlas 0.1.2

~/Projects/atlas (Vagrant โœ˜)โœน แ… vagrant provision
[Berkshelf] This version of the Berkshelf plugin has not been fully tested on this version of Vagrant.
[Berkshelf] You should check for a newer version of vagrant-berkshelf.
[Berkshelf] If you encounter any errors with this version, please report them at https://github.com/RiotGames/vagrant-berkshelf/issues
[Berkshelf] You can also join the discussion in #berkshelf on Freenode.
[Berkshelf] Updating Vagrant's berkshelf: '/Users/dnolan/.berkshelf/vagrant/berkshelf-20130509-36038-1avy61t'
[Berkshelf] Installing atlas (0.1.2) from github: 'CTSATLAS/atlas-cookbook' with branch: 'master' over protocol: 'ssh'
[Berkshelf] Using apt (1.9.2)
[Berkshelf] Using apache2 (1.6.2)
[Berkshelf] Using database (1.3.12)
[Berkshelf] Using mysql (3.0.0)
[Berkshelf] Using openssl (1.0.2)
[Berkshelf] Using build-essential (1.4.0)
[Berkshelf] Using postgresql (2.4.0)
[Berkshelf] Using aws (0.100.6)
[Berkshelf] Using xfs (1.1.0)
[Berkshelf] Using php (1.1.8)
[Berkshelf] Using xml (1.1.2)
[Berkshelf] Using imagemagick (0.2.2)
[Berkshelf] Using wkhtmltopdf (0.1.0)
[Berkshelf] Using nodejs (1.1.2)
[default] Running provisioner: chef_solo...
Generating chef JSON and uploading...
Running chef-solo...

Here is the Berksfile.lock

{
  "sha": "3bbcd2d7c8b4d130973ff400534340992a83a73f",
  "sources": {
    "atlas": {
      "locked_version": "0.1.3",
      "constraint": "> 0.1.0",
      "git": "[email protected]:CTSATLAS/atlas-cookbook.git",
      "ref": "fea803931704b0c520149fdddce4932114e16728"
    },
    "apt": {
      "locked_version": "1.9.2"
    },
    "git": {
      "locked_version": "2.5.0"
    },
    "dmg": {
      "locked_version": "1.1.0"
    },
    "build-essential": {
      "locked_version": "1.4.0"
    },
    "yum": {
      "locked_version": "2.2.0"
    },
    "windows": {
      "locked_version": "1.8.10"
    },
    "chef_handler": {
      "locked_version": "1.1.4"
    },
    "runit": {
      "locked_version": "1.1.4",
      "constraint": ">= 1.0.0"
    },
    "apache2": {
      "locked_version": "1.6.2",
      "constraint": "~> 1.6.0"
    },
    "database": {
      "locked_version": "1.3.12"
    },
    "mysql": {
      "locked_version": "3.0.0",
      "constraint": ">= 1.3.0"
    },
    "openssl": {
      "locked_version": "1.0.2"
    },
    "postgresql": {
      "locked_version": "2.4.0",
      "constraint": ">= 1.0.0"
    },
    "aws": {
      "locked_version": "0.100.6"
    },
    "xfs": {
      "locked_version": "1.1.0"
    },
    "php": {
      "locked_version": "1.1.8"
    },
    "xml": {
      "locked_version": "1.1.2"
    },
    "imagemagick": {
      "locked_version": "0.2.2"
    },
    "wkhtmltopdf": {
      "locked_version": "0.1.0"
    },
    "nodejs": {
      "locked_version": "1.1.2"
    }
  }
}

I am using
OSX 10.8.3
Ruby 2.0.0
Vagrant 1.2.2
Berkshelf from master
Berkself Vagrant Plugin 1.2.0
VirtualBox 4.2.12

Undefined method "berksfile="

When ever I run vagrant provision I get the following error:

/Users/ben/.vagrant.d/gems/gems/berkshelf-vagrant-1.1.0/lib/berkshelf/vagrant/action/install.rb:21:in `call': undefined method `berksfile=' for nil:NilClass (NoMethodError)

This only happens when I run the vmware_fusion provider, the virtualbox provider doesn't cause this error. You can see the full output here:

https://gist.github.com/Benedict/5398961

Any pointers would be greatly appreciated.

Doesn't seem to work in multi-vm setups

just taking a working generated Vagrant file and just setting up one vm but using the multi-vm syntax, berkshelf never runs, so chef-solo fails. vagrant 1.1.2, berkshelf 1.3.1, berkshelf-vagrant 1.0.6

Adding a cookbook from a chef-server to Berksfile breaks vagrant provision

Versions:

Vagrant version 1.2.1
vagrant-berkshelf (1.2.0)
Berkshelf (1.4.4)
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]

To make sure that there is not weird state going on, I start out removing the berkshelf directory

rm -rf ~/.berkshelf

I have a berksfile that looks like this

site :opscode
metadata
cookbook "java", "> 1.10.2"
cookbook "database", "> 1.3.12"
cookbook "mysql", "> 2.1.2"
cookbook "apt", "> 1.9.2"
cookbook "nginx", "> 0.100.2"

Doing a vagrant up/provision in the cookbook works as expected. It pulls in all the cookbooks and provisions the machine etc.

I then add a new cookbook that needs to be fetched from my chef-server into the berksfile like so,

echo 'cookbook "base", ">= 0.2.0", chef_api: :config' >> Berksfile

and run berks to pull in base, and all the cookbooks that base depend upon, which works fine. (note that I dont have a config.json in ~/.berkshelf or in the cookbook directory)

But when running a vagrant provision it yields this:

Ridley::Connection crashed!
Celluloid::FiberStackError: stack level too deep (please see https://github.com/celluloid/celluloid/wiki/Fiber-stack-errors)
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/tasks/task_fiber.rb:21:in `rescue in deliver'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/tasks/task_fiber.rb:19:in `deliver'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/tasks.rb:69:in `resume'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/actor.rb:424:in `task'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/actor.rb:319:in `handle_message'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/actor.rb:176:in `run'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/actor.rb:159:in `block in initialize'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/thread_handle.rb:12:in `block in initialize'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/internal_pool.rb:59:in `call'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/internal_pool.rb:59:in `block in create'
Celluloid::PoolManager crashed!
Celluloid::FiberStackError: stack level too deep (please see https://github.com/celluloid/celluloid/wiki/Fiber-stack-errors)
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/tasks/task_fiber.rb:21:in `rescue in deliver'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/tasks/task_fiber.rb:19:in `deliver'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/tasks.rb:69:in `resume'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/responses.rb:11:in `dispatch'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/actor.rb:333:in `handle_message'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/actor.rb:176:in `run'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/actor.rb:159:in `block in initialize'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/thread_handle.rb:12:in `block in initialize'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/internal_pool.rb:59:in `call'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/internal_pool.rb:59:in `block in create'
Ridley::Client::ConnectionSupervisor crashed!
Celluloid::FiberStackError: stack level too deep (please see https://github.com/celluloid/celluloid/wiki/Fiber-stack-errors)
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/tasks/task_fiber.rb:21:in `rescue in deliver'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/tasks/task_fiber.rb:19:in `deliver'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/tasks.rb:69:in `resume'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/responses.rb:11:in `dispatch'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/actor.rb:333:in `handle_message'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/actor.rb:176:in `run'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/actor.rb:159:in `block in initialize'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/thread_handle.rb:12:in `block in initialize'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/internal_pool.rb:59:in `call'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/internal_pool.rb:59:in `block in create'
Celluloid::PoolManager#finalize crashed!
NoMethodError: undefined method `+' for nil:NilClass
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/pool_manager.rb:27:in `__shutdown__'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/actor.rb:397:in `block in run_finalizer'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/tasks.rb:42:in `block in initialize'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/tasks/task_fiber.rb:9:in `block in create'
Ridley::Client crashed!
Celluloid::FiberStackError: stack level too deep (please see https://github.com/celluloid/celluloid/wiki/Fiber-stack-errors)
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/tasks/task_fiber.rb:21:in `rescue in deliver'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/tasks/task_fiber.rb:19:in `deliver'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/tasks.rb:69:in `resume'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/responses.rb:11:in `dispatch'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/actor.rb:333:in `handle_message'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/actor.rb:176:in `run'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/actor.rb:159:in `block in initialize'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/thread_handle.rb:12:in `block in initialize'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/internal_pool.rb:59:in `call'
    /home/simon/.vagrant.d/gems/gems/celluloid-0.14.0/lib/celluloid/internal_pool.rb:59:in `block in create'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.1/lib/vagrant/action/warden.rb:53: stack level too deep (SystemStackError)

Creating a config.json in ~/.berkshelf via berks configure so it looks like this

{
  "chef": {
    "chef_server_url": "http:\/\/......:4000",
    "validation_client_name": ..",
    "validation_key_path": "...",
    "client_key": "...",
    "node_name": "..."
  },
  "cookbook": {
    "copyright": "YOUR_NAME",
    "email": "YOUR_EMAIL",
    "license": "reserved"
  },
  "vagrant": {
    "vm": {
      "box": "Berkshelf-CentOS-6.3-x86_64-minimal",
      "box_url": "https:\/\/dl.dropbox.com\/u\/31081437\/Berkshelf-CentOS-6.3-x86_64-minimal.box",
      "forward_port": {

      },
      "network": {
        "bridged": false,
        "hostonly": "33.33.33.10"
      },
      "provision": "chef_solo"
    }
  },
  "ssl": {
    "verify": true
  }
}

doesnt help either.

But by removing the last line in the Berksfile, everything works as expected again, including using the base cookbook.

A way to enable/disable plugin

Right now the berkshelf-vagrant plugin will hi-jack your Vagrant installation and always run. It will run even if your project isn't using Berkshelf.

Adding a require 'berkshelf/vagrant' line at the top of your Vagrantfile was the way to enable Berkshelf integration into Vagrant 1.0.x. In Vagrant 1.1.x the plugins are automatically loaded.

We should add a way to enable or disable Berkshelf on a per project basis.

One way to go about this is to add a configuration option berkshelf.enable to the global config of the Vagrantfile. If this is option is present and true then the Berkshelf middleware will execute. If it is not present or is set to false.

Berkshelf would of course generate a Vagrantfile with this option set to true.

The plugin 'vagrant-berkshelf' could not be found in local or remote repositories ?

$: ruby -v
$: ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]

$: v -v
Vagrant version 1.2.2

$: VAGRANT_LOG=debug v plugin install vagrant-berkshelf
 INFO global: Vagrant version: 1.2.2
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/box/plugin.rb
 INFO manager: Registered plugin: box command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/destroy/plugin.rb
 INFO manager: Registered plugin: destroy command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/halt/plugin.rb
 INFO manager: Registered plugin: halt command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/init/plugin.rb
 INFO manager: Registered plugin: init command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/package/plugin.rb
 INFO manager: Registered plugin: package command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/plugin.rb
 INFO manager: Registered plugin: plugin command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/provision/plugin.rb
 INFO manager: Registered plugin: provision command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/reload/plugin.rb
 INFO manager: Registered plugin: reload command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/resume/plugin.rb
 INFO manager: Registered plugin: resume command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/ssh/plugin.rb
 INFO manager: Registered plugin: ssh command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/ssh_config/plugin.rb
 INFO manager: Registered plugin: ssh-config command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/status/plugin.rb
 INFO manager: Registered plugin: status command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/suspend/plugin.rb
 INFO manager: Registered plugin: suspend command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/up/plugin.rb
 INFO manager: Registered plugin: up command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/communicators/ssh/plugin.rb
 INFO manager: Registered plugin: ssh communicator
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/arch/plugin.rb
 INFO manager: Registered plugin: Arch guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/debian/plugin.rb
 INFO manager: Registered plugin: Debian guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/fedora/plugin.rb
 INFO manager: Registered plugin: Fedora guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/freebsd/plugin.rb
 INFO manager: Registered plugin: FreeBSD guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/gentoo/plugin.rb
 INFO manager: Registered plugin: Gentoo guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/linux/plugin.rb
 INFO manager: Registered plugin: Linux guest.
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/openbsd/plugin.rb
 INFO manager: Registered plugin: OpenBSD guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/pld/plugin.rb
 INFO manager: Registered plugin: PLD Linux guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/redhat/plugin.rb
 INFO manager: Registered plugin: RedHat guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/solaris/plugin.rb
 INFO manager: Registered plugin: Solaris guest.
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/suse/plugin.rb
 INFO manager: Registered plugin: SUSE guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/ubuntu/plugin.rb
 INFO manager: Registered plugin: Ubuntu guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/arch/plugin.rb
 INFO manager: Registered plugin: Arch host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/bsd/plugin.rb
 INFO manager: Registered plugin: BSD host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/fedora/plugin.rb
 INFO manager: Registered plugin: Fedora host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/freebsd/plugin.rb
 INFO manager: Registered plugin: FreeBSD host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/gentoo/plugin.rb
 INFO manager: Registered plugin: Gentoo host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/linux/plugin.rb
 INFO manager: Registered plugin: Linux host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/opensuse/plugin.rb
 INFO manager: Registered plugin: OpenSUSE host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/windows/plugin.rb
 INFO manager: Registered plugin: Windows host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/kernel_v1/plugin.rb
 INFO manager: Registered plugin: kernel
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/kernel_v2/plugin.rb
 INFO manager: Registered plugin: kernel
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/plugin.rb
 INFO manager: Registered plugin: VirtualBox provider
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provisioners/ansible/plugin.rb
 INFO manager: Registered plugin: ansible
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provisioners/cfengine/plugin.rb
 INFO manager: Registered plugin: CFEngine Provisioner
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provisioners/chef/plugin.rb
 INFO manager: Registered plugin: chef
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provisioners/puppet/plugin.rb
 INFO manager: Registered plugin: puppet
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provisioners/shell/plugin.rb
 INFO manager: Registered plugin: shell
 INFO vagrant: `vagrant` invoked: ["plugin", "install", "vagrant-berkshelf"]
DEBUG vagrant: Creating Vagrant environment
 INFO environment: Environment initialized (#<Vagrant::Environment:0x000001021d7218>)
 INFO environment:   - cwd: /Applications
 INFO environment: Home path: /Users/dfang/.vagrant.d
 WARN environment: No local data path is set. Local data cannot be stored.
DEBUG environment: Loading plugins from: /Users/dfang/.vagrant.d/plugins.json
 INFO environment: Running hook: environment_load
 INFO environment: Initializing config...
 INFO loader: Set :default = "/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/config/default.rb"
DEBUG loader: Populating proc cache for "/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/config/default.rb"
DEBUG loader: Load procs for pathname: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/config/default.rb
 INFO loader: Loading configuration in order: [:default, :home, :root]
DEBUG loader: Loading from: default (evaluating)
DEBUG loader: Configuration loaded successfully, finalizing and returning
DEBUG hosts: Host path search classes: [VagrantPlugins::HostWindows::Host, VagrantPlugins::HostOpenSUSE::Host, VagrantPlugins::HostArch::Host, VagrantPlugins::HostFedora::Host, VagrantPlugins::HostFreeBSD::Host, VagrantPlugins::HostGentoo::Host, VagrantPlugins::HostLinux::Host, VagrantPlugins::HostBSD::Host]
 INFO hosts: Host class: VagrantPlugins::HostBSD::Host
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000103037560>
 INFO cli: CLI: [] "plugin" ["install", "vagrant-berkshelf"]
DEBUG cli: Invoking command class: VagrantPlugins::CommandPlugin::Command::Root ["install", "vagrant-berkshelf"]
DEBUG root: Invoking command class: VagrantPlugins::CommandPlugin::Command::Install ["vagrant-berkshelf"]
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000100af47d0>
 INFO warden: Calling action: #<VagrantPlugins::CommandPlugin::Action::BundlerCheck:0x00000100a17c40>
 INFO warden: Calling action: #<VagrantPlugins::CommandPlugin::Action::InstallGem:0x00000100a17c18>
 INFO interface: info: Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
DEBUG gemhelper: Set GEM_* to: /Users/dfang/.vagrant.d/gems
ERROR warden: Error occurred: The plugin 'vagrant-berkshelf' could not be found in local or remote
repositories. Please check the name of the plugin and try again.
 INFO warden: Beginning recovery process...
 INFO warden: Calling recover: #<VagrantPlugins::CommandPlugin::Action::InstallGem:0x00000100a17c18>
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO environment: Running hook: environment_unload
 INFO runner: Running action: #<Vagrant::Action::Builder:0x000001031f4948>
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<Vagrant::Errors::PluginInstallNotFound: The plugin 'vagrant-berkshelf' could not be found in local or remote
repositories. Please check the name of the plugin and try again.>
ERROR vagrant: The plugin 'vagrant-berkshelf' could not be found in local or remote
repositories. Please check the name of the plugin and try again.
ERROR vagrant: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/action/install_gem.rb:40:in `rescue in block in call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/action/install_gem.rb:37:in `block in call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
/Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/action/install_gem.rb:28:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/command/base.rb:17:in `action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/command/install.rb:44:in `execute'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/command/root.rb:47:in `execute'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/cli.rb:46:in `execute'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:467:in `cli'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:84:in `<top (required)>'
/Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
/Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'
 INFO interface: error: The plugin 'vagrant-berkshelf' could not be found in local or remote
repositories. Please check the name of the plugin and try again.
The plugin 'vagrant-berkshelf' could not be found in local or remote
repositories. Please check the name of the plugin and try again.

but i can install vagrant-aws , anyone can help ?

Get a 'Ridley::SandboxResource crashed! Celluloid::FiberStackError: stack level too deep' error when uploading cookbooks

More specifically, I use the vagrant-berkshelf plugin with the chef_client vagrant provisioner. This is the stacktrace I get:

...
[Berkshelf] Uploading chef_handler (1.1.4) to: 'https://chef-server:443/'
[Berkshelf] Uploading rbenv (1.4.2) to: 'https://chef-server:443/'
[Berkshelf] Uploading python (1.3.4) to: 'https://chef-server:443/'
[Berkshelf] Uploading ant (1.0.2) to: 'https://chef-server:443/'
[Berkshelf] Uploading rabbitmq (2.1.2) to: 'https://chef-server:443/'
Ridley::CookbookResource crashed!
Celluloid::FiberStackError: stack level too deep (please see https://github.com/celluloid/celluloid/wiki/Fiber-stack-errors)
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:23:in `rescue in deliver'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:21:in `deliver'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:69:in `resume'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/responses.rb:11:in `dispatch'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/actor.rb:331:in `handle_message'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/actor.rb:174:in `run'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/actor.rb:157:in `block in initialize'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/thread_handle.rb:13:in `block in initialize'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/internal_pool.rb:59:in `call'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/internal_pool.rb:59:in `block in create'
Ridley::SandboxResource crashed!
Celluloid::FiberStackError: stack level too deep (please see https://github.com/celluloid/celluloid/wiki/Fiber-stack-errors)
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:23:in `rescue in deliver'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:21:in `deliver'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:69:in `resume'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/responses.rb:11:in `dispatch'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/actor.rb:331:in `handle_message'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/actor.rb:174:in `run'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/actor.rb:157:in `block in initialize'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/thread_handle.rb:13:in `block in initialize'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/internal_pool.rb:59:in `call'
    /home/tomdz/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/internal_pool.rb:59:in `block in create'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:53: stack level too deep (SystemStackError)

This is with

  • Vagrant 1.2.2
  • Berkshelf 2.0.5
  • vagrant-berkshelf 1.3.2

Support for Vagrant 1.1.5

Hi,

I am running Vagrant 1.1.5 in order to work with the vagrant-windows plugin. Can you please backport vagrant-berkshelf so it also can work with Windows VMs along with the vagrant-windows plugin? Here's what I see when I run

vagrant plugin install vagrant-berkshelf
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:556:in `rescue in block in build_extensions':
 ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

        C:/vagrant/vagrant/embedded/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/vagrant/vagrant/embedded/bin/ruby
C:/vagrant/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file.
(RuntimeError)
You have to install development tools first.
        from C:/vagrant/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
        from C:/vagrant/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:476:in `try_link'
        from C:/vagrant/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:619:in `try_func'
        from C:/vagrant/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:894:in `block in have_func'
        from C:/vagrant/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
        from C:/vagrant/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
        from C:/vagrant/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:254:in `open'
        from C:/vagrant/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
        from C:/vagrant/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:254:in `open'
        from C:/vagrant/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
        from C:/vagrant/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
        from C:/vagrant/vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:893:in `have_func'
        from extconf.rb:3:in `<main>'


Gem files will remain installed in C:/Users/my_user/.vagrant.d/gems/gems/nio4r-0.4.6 for inspection.
Results logged to C:/Users/my_user/.vagrant.d/gems/gems/nio4r-0.4.6/ext/nio4r/gem_make.out
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:534:in `block in build_extensions'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:509:in `each'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:509:in `build_extensions'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:180:in `install'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:297:in `block in install'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each_with_index'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:270:in `install'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/action/install_gem.rb:38:in `block in call'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
        from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/action/install_gem.rb:28:in `call'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/builder.rb:109:in `call'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:61:in `block in run'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:61:in `run'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/command/base.rb:17:in `action'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/command/install.rb:44:in `execute'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/command/root.rb:47:in `execute'

        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/cli.rb:46:in `execute'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/environment.rb:408:in `cli'
        from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/bin/vagrant:75:in `<top (required)>'
        from C:/vagrant/vagrant/bin//../embedded/../embedded/gems/bin/vagrant:23:in `load'
        from C:/vagrant/vagrant/bin//../embedded/../embedded/gems/bin/vagrant:23:in `<main>'

cookbook source always uses name from metadata.rb

Given the following Berksfile:

cookbook 'foo', path: './cookbooks/foo-cookbook'

It appears that the name paramater ("foo") is never used, so you can't reference it in your recipes. The actual cookbook name seems to come from the "name" paramater of the cookbook's metadata.rb.

berksfile_path does not work for individual VMs in a multi-VM setup

Assume a multi-VM setup like this:

Vagrant.configure("2") do |config|
  config.vm.define "foo" do |cfg|
    ...
  end
  config.vm.define "bar" do |cfg|
    ...
  end
end

This won't work:

Vagrant.configure("2") do |config|
  config.vm.define "foo" do |cfg|
    cfg.berkshelf.enabled = true
    cfg.berkshelf.berksfile_path = "../Berksfile"
  end
  ...
end

(The plugin ignores this outright.)
Whereas this does:

Vagrant.configure("2") do |config|
  config.berkshelf.enabled = true
  config.berkshelf.berksfile_path = "../Berksfile"
  config.vm.define "foo" do |cfg|
    ...
  end
  ...
end

If I don't want a different Berksfile, then this works just fine:

Vagrant.configure("2") do |config|
  config.vm.define "foo" do |cfg|
    cfg.berkshelf.enabled = true
  end
  config.vm.define "bar" do |cfg|
    ...
  end
end

In effect this means, if I want a different Berksfile, then all VMs have to use berkshelf and use the same Berksfile.

This seems to be because parts of the plugin use

env[:global_config].berkshelf

(e.g. the install action) and ignore

env[:machine].config.berkshelf

Ideally the plugin would check the latter first and only if that is not defined, use the former.

This is with

  • Vagrant 1.2.2
  • Berkshelf 2.0.5
  • vagrant-berkshelf 1.3.2

chef solo doesn't update shared folder

When I run vagrant up all cookbooks are updated in the appropriate ~/.berkshelf/vagrant/berkshef-* directory, but when I make a change to a cookbook and run vagrant provision the cookbooks aren't updated. If I runt vagrant halt followed by vagrant up the cookbooks are updated again. Is there a hook missing for the vagrant provision task? I'm using the fusion provider if that helps.

Thanks!

Upload only once in multi-VM environment

In a multi-VM environment, when a bulk 'vagrant up' or 'vagrant provision' operation is performed, vagrant-berkshelf resolves and uploads cookbooks an additional time for each VM being provisioned. This results in the same cookbooks being uploaded over and over again, which is a slow process. Instead, vagrant-berkshelf should resolve and upload cookbooks a single time for the bulk operation.

Berkshelf::BerksfileNotFound: No Berksfile or Berksfile.lock found at:

Just upgraded to Vagrant 1.2.2 with vagrant-berkshelf (1.3.2) and Berkshelf 2.0.5 although it says Berkshelf (1.4.4) with a berks -v (strange).

I've had these three working in combo with virtualbox with no issues on this machine before but since the update vagrant-berkshelf can't file the Berksfile if it's in the same directory as the Vagrantfile or if I point to it with:

config.berkshelf.berksfile_path = "/Workspace/chef-repo/Berksfile"

I get the error:

Berkshelf::BerksfileNotFound: No Berksfile or Berksfile.lock found at: /Workspace/chef-repo/virtualbox/Berksfile

Something obvious or bug?

Don't copy cookbooks for every vagrant run

Moved from berkshelf/berkshelf#165 - please see that issue for full discussion.

If I haven't changed a cookbook (as is the case with all but 1 cookbook), don't recopy the cookbook to the temp directory. Reuse what's already there. Copying takes a while.

Perhaps we only need to copy cookbooks with a path source after the first run?

'vagrant up' fails to run preliminary 'berks upload' on Windows

Operating System: Windows 2008 R2 x86_64
Vagrant Version: 1.1.4
berkshelf-vagrant (plugin) version: 1.0.6
Vagrant Configuration Format: v2

Notes: After installing Vagrant from MSI, deployed berkshelf into same gemset as Vagrant by using 'gem install berkshelf'.
berkshelf-vagrant installed by running 'vagrant plugin install berkshelf-vagrant'

How to replicate:

  1. 'berks cookbook my_face'
  2. Configure :chef_client as Vagrant provisioner in Vagrantfile.
  3. Edit metadata.rb to specify a single constraint. Example: "build-essential", "~> 1.3.0"
  4. Ensure build-essential cookbook doesn't exist in Chef server organization.
  5. Run 'vagrant up', output will be:

The following cookbooks are required by the client but don't exist on the server:

  • build-essential

uninitialized constant Berkshelf::Vagrant::Action::Install::VagrantWrapperError (NameError)

@reset

% vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'ubuntu-10.04'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Destroying VM and associated drives...
/Users/epahl/.vagrant.d/gems/gems/berkshelf-vagrant-1.0.4/lib/berkshelf/vagrant/action/install.rb:20:in `rescue in call': uninitialized constant Berkshelf::Vagrant::Action::Install::VagrantWrapperError (NameError)
    from /Users/epahl/.vagrant.d/gems/gems/berkshelf-vagrant-1.0.4/lib/berkshelf/vagrant/action/install.rb:12:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/builder.rb:109:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:94:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/builtin/provision.rb:45:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:13:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/plugins/providers/virtualbox/action/set_name.rb:35:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/builtin/call.rb:57:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/builder.rb:109:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/machine.rb:129:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/plugins/commands/up/command.rb:37:in `block in execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/plugin/v2/command.rb:182:in `block in with_target_vms'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/plugin/v2/command.rb:180:in `each'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/plugin/v2/command.rb:180:in `with_target_vms'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/plugins/commands/up/command.rb:32:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/cli.rb:46:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/lib/vagrant/environment.rb:406:in `cli'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.2/bin/vagrant:60:in `'
    from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
    from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `'

vagrant plugin install berkshelf-vagrant fails to compile

If there is a more appropriate place to open this issue please let me know.
Below is my GCC version and the resulting stack trace

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin12/4.7.2/lto-wrapper
Target: x86_64-apple-darwin12
Configured with: ../gcc-4.7.2/configure --prefix=/opt/local --build=x86_64-apple-darwin12 --enable-languages=c,c++,objc,obj-c++,lto,fortran,java --libdir=/opt/local/lib/gcc47 --includedir=/opt/local/include/gcc47 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.7 --with-libiconv-prefix=/opt/local --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.7 --with-gxx-include-dir=/opt/local/include/gcc47/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-ppl=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl --disable-cloog-version-check --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --disable-ppl-version-check --with-pkgversion='MacPorts gcc47 4.7.2_2'
Thread model: posix
gcc version 4.7.2 (MacPorts gcc47 4.7.2_2) 
mjolnir:~ clundquist$ vagrant plugin install berkshelf-vagrant
Installing the 'berkshelf-vagrant' plugin. This can take a few minutes...
/Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:562:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

        /Applications/Vagrant/embedded/bin/ruby extconf.rb
creating Makefile

make
compiling yajl.c
compiling yajl_alloc.c
compiling yajl_buf.c
compiling yajl_encode.c
compiling yajl_ext.c
yajl_ext.c: In function 'yajl_encode_part':
yajl_ext.c:117:21: warning: variable 'status' set but not used [-Wunused-but-set-variable]
yajl_ext.c: In function 'rb_yajl_parser_parse':
yajl_ext.c:442:17: warning: variable 'stat' set but not used [-Wunused-but-set-variable]
compiling yajl_gen.c
compiling yajl_lex.c
compiling yajl_parser.c
compiling yajl_version.c
linking shared-object yajl/yajl.bundle
gcc: error: unrecognized option '-R'
make: *** [yajl.bundle] Error 1


Gem files will remain installed in /Users/clundquist/.vagrant.d/gems/gems/yajl-ruby-1.1.0 for inspection.
Results logged to /Users/clundquist/.vagrant.d/gems/gems/yajl-ruby-1.1.0/ext/yajl/gem_make.out
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:540:in `block in build_extensions'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `each'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `build_extensions'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:180:in `install'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:297:in `block in install'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each_with_index'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `install'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/plugins/commands/plugin/action/install_gem.rb:38:in `block in call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
    from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/plugins/commands/plugin/action/install_gem.rb:28:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/lib/vagrant/action/builder.rb:109:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/plugins/commands/plugin/command/base.rb:17:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/plugins/commands/plugin/command/install.rb:44:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/plugins/commands/plugin/command/root.rb:47:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/lib/vagrant/cli.rb:46:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/lib/vagrant/environment.rb:406:in `cli'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.4/bin/vagrant:60:in `<top (required)>'
    from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
    from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

stuck on "loading plugins" on windows

Hi,

I'm having trouble loading the plugin during "vagrant up"

Debug log:

...
...
DEBUG environment: Loading plugins from: C:/Users/username/.vagrant.d/plugins.json
 INFO environment: Loading plugin from JSON: vagrant-berkshelf

It seems to get stuck from this point on. I don't encounter this when running it over cmd.exe

environment details:

vagrant-1.2.2 over virtualbox 4.2.12, windows 7 64-bit
vagrant-berkshelf 1.2.0
Shells: cygwin and msys

vagrant plugin install berkshelf-vagrant fails on windows 7

On a fresh install of vagrant (1.1.5) running on WIndows 7 64bit, i get the following error. Any ideas? Is this a plugin issue or Vagrant issue?


$ vagrant plugin install berkshelf-vagrant
Installing the 'berkshelf-vagrant' plugin. This can take a few minutes...
C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:556:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

    C:/vagrant/vagrant/embedded/bin/ruby.exe extconf.rb

creating Makefile

make
generating generator-i386-mingw32.def
compiling generator.c
make: gcc: Command not found
make: *** [generator.o] Error 127

Gem files will remain installed in C:/Users/tim/.vagrant.d/gems/gems/json-1.7.7 for inspection.
Results logged to C:/Users/tim/.vagrant.d/gems/gems/json-1.7.7/ext/json/ext/generator/gem_make.out
from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:534:in block in build_extensions' from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:509:ineach'
from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:509:in build_extensions' from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:180:ininstall'
from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:297:in block in install' from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:270:ineach'
from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:270:in each_with_index' from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:270:ininstall'
from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/action/install_gem.rb:38:in block in call' from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/gem_helper.rb:42:inblock in with_environment'
from C:/vagrant/vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/user_interaction.rb:40:in use_ui' from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/gem_helper.rb:41:inwith_environment'
from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/action/install_gem.rb:28:in call' from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:incall'
from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/action/bundler_check.rb:20:in call' from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/warden.rb:34:incall'
from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/builder.rb:109:in call' from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:61:inblock in run'
from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/util/busy.rb:19:in busy' from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:61:inrun'
from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/command/base.rb:17:in action' from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/command/install.rb:44:inexecute'
from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/commands/plugin/command/root.rb:47:in execute' from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/cli.rb:46:inexecute'
from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/environment.rb:408:in cli' from C:/vagrant/vagrant/embedded/gems/gems/vagrant-1.1.5/bin/vagrant:75:in<top (required)>'
from C:/vagrant/vagrant/embedded/gems/bin/vagrant:23:in load' from C:/vagrant/vagrant/embedded/gems/bin/vagrant:23:in

'

JSON::ParseError with Vagrant 1.2.2 during `vagrant up`

[Berkshelf] Updating Vagrant's berkshelf: '/Users/matt/.berkshelf/default/vagrant/berkshelf-20130621-46095-1n6w1j4-default'
[default] Destroying VM and associated drives...
/Applications/Vagrant/embedded/gems/gems/json-1.7.7/lib/json/common.rb:155:in `initialize': A JSON text must at least contain two octets! (JSON::ParserError)
    from /Applications/Vagrant/embedded/gems/gems/json-1.7.7/lib/json/common.rb:155:in `new'
    from /Applications/Vagrant/embedded/gems/gems/json-1.7.7/lib/json/common.rb:155:in `parse'
    from /Users/matt/.vagrant.d/gems/gems/berkshelf-2.0.4/lib/berkshelf/lockfile.rb:39:in `load!'
    from /Users/matt/.vagrant.d/gems/gems/berkshelf-2.0.4/lib/berkshelf/lockfile.rb:31:in `initialize'
    from /Users/matt/.vagrant.d/gems/gems/berkshelf-2.0.4/lib/berkshelf/berksfile.rb:694:in `new'
    from /Users/matt/.vagrant.d/gems/gems/berkshelf-2.0.4/lib/berkshelf/berksfile.rb:694:in `lockfile'
    from /Users/matt/.vagrant.d/gems/gems/berkshelf-2.0.4/lib/berkshelf/berksfile.rb:426:in `install'
    from /Users/matt/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.2/lib/berkshelf/vagrant/action/install.rb:46:in `install'
    from /Users/matt/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.2/lib/berkshelf/vagrant/action/install.rb:30:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/provision.rb:45:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:13:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/action/set_name.rb:35:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:57:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/matt/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.2/lib/berkshelf/vagrant/action/configure_chef.rb:23:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/matt/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.2/lib/berkshelf/vagrant/action/load_shelf.rb:28:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/matt/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.2/lib/berkshelf/vagrant/action/set_ui.rb:12:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/env_set.rb:19:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/machine.rb:147:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'

Vagrant version 1.2.2 is out

Vagrant version 1.2.2 came out, and when running with vagrant-berkshelf (1.2.0), produces a warning:

       [Berkshelf] This version of the Berkshelf plugin has not been fully tested on this version of Vagrant.
       [Berkshelf] You should check for a newer version of vagrant-berkshelf.
       [Berkshelf] If you encounter any errors with this version, please report them at https://github.com/RiotGames/vagrant-berkshelf/issues
       [Berkshelf] You can also join the discussion in #berkshelf on Freenode.

Does this mean that every release of Vagrant is going to need a release of vagrant-berkshelf to be "quiet"?

Berkshelf fails because it can't find metadata.rb if Berksfile.lock exists

I have an application I'm developing. I have a cookbook which I'm writing to deploy it, and I have some roles defined. I laid out my project like this:

/(project root)
  chef/
    cookbooks/ - cookbooks here
      myapp/ - My app's cookbook here
    roles/ - role files here
  src/
  ...

I put my Berksfile in /chef/cookbooks/myapp, since that seemed to be the place to put it. I wanted my Vagrantfile in /, so that you could just check out a project, do "vagrant up" and have a server up and running, so in my Vagrantfile I did:

config.berkshelf.enabled = true
config.berkshelf.berksfile_path = "./chef/cookbooks/myapp/Berksfile"

config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "./chef/cookbooks"
chef.add_recipe("nodeloop")

chef.roles_path = "./chef/roles"
chef.add_role("base")

end

Then I ran vagrant up and everything worked fine. Then I ran vagrant destroy and vagrant up a second time, and it failed with:

11:14:55 [jwalton@nimue ~/benbria/myapp (vagrant)] $ vagrant up
[Berkshelf] This version of the Berkshelf plugin has not been fully tested on this version of Vagrant.
[Berkshelf] You should check for a newer version of vagrant-berkshelf.
[Berkshelf] If you encounter any errors with this version, please report them at https://github.com/RiotGames/vagrant-berkshelf/issues
[Berkshelf] You can also join the discussion in #berkshelf on Freenode.
[Berkshelf] Updating Vagrant's berkshelf: '/Users/jwalton/.berkshelf/default/vagrant/berkshelf-20130625-25992-1po45yt-default'
Berkshelf::CookbookNotFound: no metadata.rb or metadata.json found at .

If I delete chef/cookbooks/myapp/Berksfile.lock, then this all works again!

So then I tried moving my Vagrantfile to chef/cookbooks/myapp as a workaround. This works so long as I don't try to use any roles from my Vagrantfile. Vagrant doesn't seem to like having roles defined in "../roles", though:

2013-06-25T15:36:19+00:00] INFO: *** Chef 10.26.0 ***
[2013-06-25T15:36:19+00:00] INFO: Setting the run_list to ["recipe[myapp]", "role[base]"] from JSON

================================================================================

Error expanding the run_list:

================================================================================


Unexpected Error:

-----------------

TypeError: can't convert nil into String

My Berksfile:

site :opscode

metadata

cookbook 'zeromq', git: 'git://github.com/hw-cookbooks/zeromq.git'
cookbook 'mongodb', git: 'git://github.com/edelight/chef-mongodb.git'

group :integration do
  cookbook 'apt', '= 1.9.0'
end

Installed plugin "ridley"

This may be a vagrant bug, but install vagrant plugin install vagrant-berkshelf yields:

$ vagrant plugin install vagrant-berkshelf
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
Installed the plugin 'ridley (0.12.4)'!

/cc @mitchellh

Compatibility with Vagrant 1.2.0

When running Vagrant v1.2.0 with Berkshelf plugin v1.1.0, an error is thrown:

/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.0/lib/vagrant/ui.rb:59:in `initialize': wrong number of arguments (1 for 0) (ArgumentError)
    from /Users/tmatilai/.vagrant.d/gems/gems/berkshelf-vagrant-1.1.0/lib/berkshelf/vagrant/env.rb:17:in `new'
    ...

The reason is that Vagrant::UI constructor doesn't take arguments any more. The failing call is here.

Support for http:// URLs in `berksfile_path`

Right now you can do that:

Vagrant.configure("2") do |config|
  ...
  config.berkshelf.berksfile_path = "/Users/reset/code/my_face/Berksfile"
end

However, it would be super neat if you could also do this instead:

Vagrant.configure("2") do |config|
  ...
  config.berkshelf.berksfile_path = "https://raw.github.com/reset/myface-cookbook/0.3.3/Berksfile"
end

Using this approach you don't need the myface cookbook locally available. All you need is a Vagrantfile which would bootstrap / install the remote Berksfile dependencies to the berkshelf transparently by itself - no need to do the extra git clone step manually...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.