Hi Mark,
I had a similar problem and it turned out to be the way my client was
abstracting their box configuration similar to the following :
Vagrant.configure("2") do |config|
config.vm.box_url =
"http://mirrors.example.com/vagrant/boxes/ubuntu-12.04-x86_64.box"
config.vm.synced_folder "srv", "/srv", "/srv"
config.vm.define :mybox do |mybox_config|
mybox_config.vm.box = "mybox.dev"
<snip but everything defined around mybox_config (instead of just config)>
end
end
Instead of just using a more standard setup like :
Vagrant.configure("2") do |config|
config.vm.box_url =
"http://mirrors.example.com/vagrant/boxes/ubuntu-12.04-x86_64.box"
config.vm.synced_folder "/srv", "/srv", :nfs => true
config.vm.box = "mybox.dev"
config.vm.network :private_network, ip: "192.168.12.23"
config.vm.network :forwarded_port, guest: 22, host: 2322
<snip - all other definitions etc.>
end
Having the extra abstraction for mybox_config prevented berkshelf from
working correctly for some reason. Changing to the standard way fixed
my problem.
Thought it was worth mentioning in case your Vagrantfile is similarly setup.
Cheers
adh
Andrew Hollingsworth
adh@techopsguru.com
On Thu, Mar 28, 2013 at 6:58 AM, Mark Pimentel markpimentel22@gmail.com wrote:
I still cannot get vagrant provision to work with chef-solo. I followed
your upgrade steps below, and then ran ....
vagrant up
vagrant provision
On the up command it brings up the vagrant box as expected.
On the provision step, it invokes the berkshelf plugin to download all the
cookbooks as defined the Berksfile to some isolated directory for this
vagrant box. But then when it runs the actual chef-solo run, it cannot find
any cookbooks. Am I missing something here? Shouldn't the berkshelf plugin
somehow be injecting the path or creating a shared folder to the isolated
download directory so chef-solo in the VM can find its cookbooks?
On 2013-03-26 12:08 PM, Andrew Gross wrote:
I managed to get the upgrade working, was a little bit of a struggle.
General Steps
- Install new Vagrant DMG (on mac)
- Uninstall Vagrant Gem (from system, rvm, bundler whatever)
- Install Berkshelf Vagrant Plugin (
vagrant plugin install berkshelf-vagrant
)
- Upgrade Berkshelf Gem to 1.3.*
- Rerun Berks install
- Remove any 'require Berkshelf' sections from my Vagrantfile
- Remove references to 'config.berkshelf.berksfile_path' from Vagrantfile
Notes:
vagrant up
seems to not do a vagrant provision
automatically, so now I
have to chain the commands.
The .vagrant
file is now actually a folder, so make sure to use rm -rf to
clean up afterwards.
Granted my Vagrantfiles are very simple, so there may be more conversion
needed.
Andrew
On Tue, Mar 26, 2013 at 10:09 AM, Brian Akins brian@akins.org wrote:
I had so many issues with upgrading Vagrant that I decided to go back
to 1.0 for now. I needed Berkshelf integration. I could not get the
"new" berkshelf-vagrant to work with vagrant 1.0, but that may be just
me.
So, here's my hack that others may find helpful - if only as comedic
relief:
GitHub - bakins/berkshelf-hobo: Berkshelf and Vagrant 1.0