Reputation: 23237
I've created this Vagrantfile
's provioner section:
config.vm.provision "chef_solo" do |chef|
chef.add_recipe "wildfly"
end
I'm getting this error:
==> default: Error Resolving Cookbooks for Run List:
==> default:
==> default: Missing Cookbooks:
==> default: ------------------
==> default: No such cookbook: wildfly
So, I've created a Berksfile
and a metadata.rb
files:
Berksfile
:
source 'https://supermarket.chef.io'
metadata
metadata.rb
:
name 'webapi'
maintainer 'The Authors'
maintainer_email '[email protected]'
license 'all_rights'
description 'Installs/Configures webapi'
long_description 'Installs/Configures webapi'
version '0.1.0'
depends 'java_se', '~> 9.0.1'
depends 'wildfly', '~> 0.4.0'
So, then I've performed berks install
command. The first issue I've detected is that I don't quite detect where berks
has placed cookbooks. It seems that it works right, nevertheless, I don't find where cookbooks dependencies are located, I mean, a .\cookbooks
folder is not created after performing berks install
command.
Resolving cookbook dependencies...
Fetching 'olingo' from source at .
Fetching cookbook index from https://supermarket.chef.io...
Using apt (6.1.4)
Using homebrew (4.2.0)
Using java (1.50.0)
Using java_se (9.0.1)
Using ohai (5.2.0)
Using olingo (0.1.0) from source at .
Using wildfly (0.4.0)
Using yum (5.1.0)
Using windows (3.4.0)
Regardless of that, I've performed vagrant provision
again, and wildfly
cookbook is not resolved:
The cookbook path 'D:/projects/swiller/querydsl/olingo/infrastructure/cookbooks' doesn't exist. Ignoring...
Running provisioner: chef_solo...
==> default: Error Resolving Cookbooks for Run List:
==> default:
==> default: Missing Cookbooks:
==> default: ------------------
==> default: No such cookbook: wildfly
Upvotes: 1
Views: 335
Reputation: 54211
You either need to use the vagrant-berkshelf
plugin, or use the berks vendor
command to write all the cookbooks to a folder and then point Vagrant at that (which is what the plugin does internally). berks install
only downloads them to your workstation, it doesn't put the cookbooks in a place/format that anything other than Berkshelf understands.
Upvotes: 2