Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cookbook not found : Chef Solo

I downloaded the cookbook "oc-java-master" from the Chef community and now I am trying to run it using chef-solo which i have installed on a Windows Server 2008.

After a lot of googling and stackoverflow support i was able to get the JSON file picked up which defines the run lists. But the below error has been troubling me for last 4-5 hours and I am totally clueless.

[2012-11-28T11:33:28+00:00] FATAL: Chef::Exceptions::CookbookNotFound: Cookbook java not found. If you're loading java from another cookbook, make sure you configure the dependency in your metadata

If anyone can look at the cookbook and suggest me some solution I will be grateful to you. The URL of the cookbook is here.

like image 584
dharam Avatar asked Jan 15 '23 21:01

dharam


1 Answers

A few things.

With Chef Solo, you have to tell it more information up front so it finds the cookbooks.

  1. It needs to know what run list (and node attributes if any) to use for the run. This is the "json file" passed with the -j option.

  2. It needs to know the path to the cookbooks. You can download them from a remote tarball with the -r option, and let it handle the rest, or you have to write a config file with the cookbook_path value and un-archive the cookbooks you want to use in that directory. This is c:\var\chef\cookbooks by default.

Also, the Opscode Chef Community Site is not the same as the "Cookbooks" organization on GitHub.

Opscode's Java cookbook does not work on Windows. You'll need to write your own or find another one that does.

Finally, the Chef mailing lists and IRC channels are the best way to get help with Chef quickly.

like image 178
jtimberman Avatar answered Jan 28 '23 21:01

jtimberman