Reputation: 626
I'm new to using chef and vagrant. We are using chef server but locally we use chef solo with vagrant. I had this working then I moved the directory with the chef Vagrant file and chef cook books
When I run 'vagrant provision' i get the following error. Any assistance would be great.
[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/USER/.berkshelf/dev/vagrant/berkshelf-20140417-33725-1sc0b9p-dev'
[Berkshelf] Using chef-solo-search (0.5.1)
[Berkshelf] Using git (2.7.0)
[Berkshelf] Using subversion (1.1.2)
[Berkshelf] Using simple_iptables (0.3.0)
[Berkshelf] Using yum (2.4.2)
[Berkshelf] Using postgresql (3.3.4)
[Berkshelf] Using database (1.5.2)
[Berkshelf] Using application (4.1.4)
[Berkshelf] Using build-essential (1.4.2)
[Berkshelf] Installing ruby_build (0.8.1) from git: 'https://github.com/fnichol/chef-ruby_build.git' with branch: 'master' at ref: '4d3361995a6953076951693eff1b326ab499fe1e'
[Berkshelf] Installing rbenv (0.7.1) from git: 'https://github.com/fnichol/chef-rbenv' with branch: 'master' at ref: 'c921ab6593dba5384a1884168230edd44a5102e6'
[Berkshelf] Installing application_ruby (3.0.2) from git: 'https://github.com/poise/application_ruby.git' with branch: 'master' at ref: 'f073ae50a58db1a0d496290888da457ee63244c8'
[Berkshelf] Using apache2 (1.8.4)
[Berkshelf] Using owdb-rails-app (0.1.1)
[Berkshelf] Using dmg (2.2.0)
[Berkshelf] Using windows (1.30.2)
[Berkshelf] Using chef_handler (1.1.5)
[Berkshelf] Using runit (1.5.10)
[Berkshelf] Using yum-epel (0.3.4)
[Berkshelf] Using apt (2.3.8)
[Berkshelf] Using openssl (1.1.0)
[Berkshelf] Using mysql (5.0.2)
[Berkshelf] Using aws (2.1.1)
[Berkshelf] Using xfs (1.1.0)
[Berkshelf] Using java (1.22.0)
[Berkshelf] Using unicorn (1.3.0)
[Berkshelf] Using passenger_apache2 (2.2.0)
[Berkshelf] Using logrotate (1.5.0)
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vagrant-omnibus:
* '11.10.0' is not a valid version of Chef.
A list of valid versions can be found at: http://www.opscode.com/chef/install/
Upvotes: 3
Views: 1427
Reputation: 2219
As @Peter mentioned then this might be related to some kind of connection issue to rubygems.com or whatever else:
I had this error pop up at some point always when I was connected to my VPN. After disconnecting from VPN it worked out fine, so it might work also for you assuming you use VPN and disconnecting it is ok.
It started to occure just lately, at the end of year 2019 I guess, before that it was ok.
Upvotes: 0
Reputation: 5190
Vagrant-omnibus uses the Rubygems API to check if the version you give in the Vagrantfile is correct.
However, I just checked and it looks like 11.10.0 is a valid version of chef.
So, the issue could've been that:
Regardless, it seems to work now:
Vagrant.configure('2') do |config|
config.vm.define :old_chef do |old_chef_config|
old_chef_config.vm.box = 'opscode-centos-6.5'
old_chef_config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/#{box_type}/opscode_centos-6.5_chef-provisionerless.box"
old_chef_config.omnibus.chef_version = '11.10.0'
old_chef_config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = File.expand_path('../../../support/cookbooks', __FILE__)
chef.add_recipe 'chef-inator'
end
end
end
Full log:
Bringing machine 'old_chef' up with 'virtualbox' provider...
==> old_chef: Box 'opscode-centos-6.5' could not be found. Attempting to find and install...
old_chef: Box Provider: virtualbox
old_chef: Box Version: >= 0
==> old_chef: Adding box 'opscode-centos-6.5' (v0) for provider: virtualbox
old_chef: Downloading: http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box
==> old_chef: Successfully added box 'opscode-centos-6.5' (v0) for 'virtualbox'!
==> old_chef: Importing base box 'opscode-centos-6.5'...
==> old_chef: Matching MAC address for NAT networking...
==> old_chef: Setting the name of the VM: virtualbox_old_chef_1410431823713_23031
==> old_chef: Clearing any previously set network interfaces...
==> old_chef: Preparing network interfaces based on configuration...
old_chef: Adapter 1: nat
==> old_chef: Forwarding ports...
old_chef: 22 => 2222 (adapter 1)
==> old_chef: Booting VM...
==> old_chef: Waiting for machine to boot. This may take a few minutes...
old_chef: SSH address: 127.0.0.1:2222
old_chef: SSH username: vagrant
old_chef: SSH auth method: private key
old_chef: Warning: Connection timeout. Retrying...
==> old_chef: Machine booted and ready!
==> old_chef: Checking for guest additions in VM...
==> old_chef: Mounting shared folders...
old_chef: /vagrant => /Users/peterso/Projects/vagrant-omnibus/test/acceptance/virtualbox
old_chef: /tmp/vagrant-chef-3/chef-solo-1/cookbooks => /Users/peterso/Projects/vagrant-omnibus/test/support/cookbooks
==> old_chef: Installing Chef 11.10.0 Omnibus package...
==> old_chef: Downloading Chef 11.10.0 for el...
==> old_chef: downloading https://www.getchef.com/chef/metadata?v=11.10.0&prerelease=false&nightlies=false&p=el&pv=6&m=x86_64
==> old_chef: to file /tmp/install.sh.1704/metadata.txt
==> old_chef: trying wget...
==> old_chef: trying curl...
==> old_chef: url https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chef-11.10.0-1.el6.x86_64.rpm
==> old_chef: md5 37a14e0823473baa2ed3df4e59ac8e9e
==> old_chef: sha256 f4a800c1fe8e0caff8809be8315840af89381e77a54e751b8fea06677e5ba878
==> old_chef: downloaded metadata file looks valid...
==> old_chef: downloading https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chef-11.10.0-1.el6.x86_64.rpm
==> old_chef: to file /tmp/install.sh.1704/chef-11.10.0-1.el6.x86_64.rpm
==> old_chef: trying wget...
==> old_chef: Comparing checksum with sha256sum...
==> old_chef: Installing Chef 11.10.0
==> old_chef: installing with rpm...
==> old_chef: warning:
==> old_chef: /tmp/install.sh.1704/chef-11.10.0-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
==> old_chef: Preparing...
==> old_chef: ##################################################
==> old_chef: Thank you for installing Chef!
==> old_chef: Running provisioner: chef_solo...
Generating chef JSON and uploading...
Running chef-solo...
[2014-09-11T10:37:56+00:00] INFO: Forking chef instance to converge...
[2014-09-11T10:37:56+00:00] INFO: *** Chef 11.10.0 ***
[2014-09-11T10:37:56+00:00] INFO: Chef-client pid: 2018
[2014-09-11T10:37:57+00:00] INFO: Setting the run_list to ["recipe[chef-inator]"] from JSON
[2014-09-11T10:37:57+00:00] INFO: Run List is [recipe[chef-inator]]
[2014-09-11T10:37:57+00:00] INFO: Run List expands to [chef-inator]
[2014-09-11T10:37:57+00:00] INFO: Starting Chef Run for localhost
[2014-09-11T10:37:57+00:00] INFO: Running start handlers
[2014-09-11T10:37:57+00:00] INFO: Start handlers complete.
[2014-09-11T10:37:57+00:00] INFO: CURSE YOU...Perry the Platypus!!!!
[2014-09-11T10:37:57+00:00] INFO: Chef Run complete in 0.018895217 seconds
[2014-09-11T10:37:57+00:00] INFO: Running report handlers
[2014-09-11T10:37:57+00:00] INFO: Report handlers complete
Upvotes: 2