1

I've been trying to setup a chef server and supply it with the cookbooks form the opscode github page

http://github.com/opscode/cookbooks.git

I've cloned this repo and set it in both my server config and knife config

server.rb

cookbook_path [ '/opt/chef/cookbooks', '/opt/chef/site-cookbooks' ]

knife.rb

cookbook_path [ '/opt/chef/cookbooks', '/opt/chef/site-cookbooks']

Both directories contain the cookbooks from the repo, but cookbooks are visible either in the web-ui or via knife cookbook list. I'm pretty sure I have everything configured correctly as clients can connect and all the processes seem to be running (as per the server setp doc).

Anyone got this working and can set me on the right track to getting my cookbooks listed?

rgds,

ste

sgargan
  • 235
  • 3
  • 5

1 Answers1

3

The Opscode GitHub repository for cookbooks is considered in development and releases are made to the Cookbooks site, along with other members of the community. Opscode recommends using Knife's "cookbook site" sub-commands to work with this site to download cookbooks and incorporate them in the local Chef Repository.

The Chef Repository page describes how to get your local repo set up to store cookbooks and other configuration bits for your environment (knife's config, etc).

Once you have cookbooks, you upload them to the Chef Server using knife cookbook upload.

knife cookbook upload -a

Or use the rake task in the chef-repo.

rake install

You can upload individual cookbooks, e.g., if you have made changes to just one.

knife cookbook upload COOKBOOK_NAME
jtimberman
  • 7,511
  • 2
  • 33
  • 42
  • Thank you for your answer. They should definitely underline this in their manuals and guides. Took me 2 days to figure out that I must upload them. – Cninroh Jan 17 '12 at 18:16
  • This is enumerated on the Chef wiki documentation for Cookbooks in general, and it is mentioned in the toplevel README.md file in the repository itself. – jtimberman Jan 18 '12 at 02:49