[chef] What's a cookbook name?


Chronological Thread 
  • From: Russell Bateman < >
  • To:
  • Subject: [chef] What's a cookbook name?
  • Date: Wed, 26 Jun 2013 15:27:22 -0600

I'm discovering that, as I have recipes in subdirectory named cookbook, and have put those recipes up to my Chef server,
~/dev/chef-repos $ knife node run_list add uas-dev-app01 'role[application-node]'
run_list:  [role[application-node]]
~/dev/chef-repos $ knife node run_list add uas-dev-app01 'recipe[chef-repos::tomcat6]'
run_list:
    role[application-node]
    recipe[chef-repos::tomcat6]

nevertheless they aren't useful to me when, on each of my nodes, I execute
chef-client. I used "chef-repos" because of examples I saw Googling.

I get this
:
...
================================================================================
Error Resolving Cookbooks for Run List:
================================================================================

Missing Cookbooks:
------------------
The following cookbooks are required by the client but don't exist on the server:
* chef-repos
...

which clearly shows that, while the Chef server web UI lists the recipes I need, they're referenced by a cookbook the server has no knowledge of. I cannot figure out how, using knife, to tell it. This is pretty confusing.

At my development host (from which I'm administering all of this), I see:
chef-repos
├── .chef
├── cookbooks
│   ├── apt
│   ├── mongodb
│   └── tomcat6
├── nodes
── roles

Based on the error above, I am induced to think that chef-repos is the name of my cookbook:
~/uas/chef-repos $ knife cookbook show chef-repos
ERROR: The object you are looking for could not be found
Response: Cannot find a cookbook named chef-repos
But, it's not. And sometimes in Chef, I can't tell the difference, especially when using knife cookbook, what the difference between a cookbook and a recipe is.

I'd like to know what to tell my server so that when I attempt to get a node up with chef-client, it knows what
chef-repos::tomcat6 is and that this recipe is the tomcat6 recipe sitting in Chef Server UI -> Cookbooks.

Many thanks.





Archive powered by MHonArc 2.6.16.

§