简体   繁体   中英

chef::Exception::RecipeNotFound could not find recipe default for cookbook java

I am new to chef. I am trying to run the cookbook weblogic that I downloaded from the CHEF supermarket.

under cookbook, I have both weblogic & java

when I run chef-solo, it is giving the error. chef::Exception::RecipeNotFound could not find recipe default for cookbook java

my solo.json has only the following: How should I modify the below to fix this? Any info would be great. thanks.

{"run_list": [ "recipe[weblogic]"]}

The weblogic cookbook depends on the java cookbook (the java cookbook does not have any dependencies), you can see this in the weblogic metadata.rb file:

java >= 0.0.0

It's likely that the path in your cookbook_path in your solo.rb file does not contain all of the necessary cookbooks ( are both java and weblogic folders in that path )? The default recipe is part of the java cookbook, so if they are both on the path maybe you should try:

{"run_list": [ "recipe[java]", "recipe[weblogic]"]}

Alternatively you could call recipes explicitly in each like:

{"run_list": [ "recipe[java::openjdk]", "recipe[weblogic::default]"]}

I was working with the same Weblogic recipe, and came to the same error. This error says that there is no default.rb recipe under recipes/ folder.

So I created one, and voila!

The code for my default recipe was:

weblogic '12.1.3' do
  ownername 'weblogic'
  groupname 'weblogic_admin' 
end

Because, in the resources files, there are specified configurations for many Weblogic's versions. So, in the default recipe, you just need to specify the version your are installing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM