After creating my first errbit cookbook, and publishing it on the chef community site, I’d to do some stretches to publish it.
First, you need to tgz your cookbook and it should have the
file otherwise the validation fails and the cookbook won’t be published.
So, I am putting it here for me and others:
In your cookbook dir, create a dir
.chef with a
knife.rb file in it with
the following line:
Then issue the command
knife cookbook metadata . (Don’t forget the dot) This
Better to commit it here and push the changes to your git repo.
Now step out 1 dir path from your cookbook folder and do the compressing.
cd .. tar -czf errbit.tgz --exclude bin --exclude .envrc --exclude .vagrant --exclude .bundle errbit
You might have to change/add the
--exclude vars according to your setup.
Now we’ve the
errbit.tgz file with the
metadata.json file in it which you
can upload to the community site at http://community.opscode.com/cookbooks/ne
When updating the cookbook later, do change the version in
and repeat the same process to publish your cookbook’s changes.