Publishing cookbooks guidelines


#1

Hello,

I am ready to relase a firt version of a cookbook I made. [1], I made it pass foodcritic, and
run on test-kitchen, planing to add extensive testing in the future.

Now when uploading the release tarbal to the opscode site, I get the error that it needs a
metada.json. How do you keep this file updated ?

Anything more I should beware before publishing ?

[1] https://github.com/masterkorp/cookbook-taskwarrior


Regards,
Alfredo Palhares


#2

metadata.json should be generated by your API client, i.e. knife, when
you upload to the community site or a chef-server. You can manually
generate the metadata.json with knife cookbook metadata.

You can add metadata.json to your .gitignore, since it is just a JSON
representation of your metadata.rb.

Eric G. Wolfe
Senior Linux Administrator,
IT Infrastructure Systems

Marshall University Computing Services
Drinko Library 428-K
One John Marshall Dr.
Huntington, WV 25755
Phone: 304.942.3970
Email: eric.wolfe@marshall.edu

Modern art is what happens when painters stop looking at girls and persuade
themselves that they have a better idea.
– John Ciardi

On 01/21/2014 01:14 PM, Alfredo Palhares wrote:

Hello,

I am ready to relase a firt version of a cookbook I made. [1], I made it pass foodcritic, and
run on test-kitchen, planing to add extensive testing in the future.

Now when uploading the release tarbal to the opscode site, I get the error that it needs a
metada.json. How do you keep this file updated ?

Anything more I should beware before publishing ?

[1] https://github.com/masterkorp/cookbook-taskwarrior


Regards,
Alfredo Palhares


#3

Alfredo Palhares masterkorp@masterkorp.net writes:

Hello,

I am ready to relase a firt version of a cookbook I made. [1], I made it pass foodcritic, and
run on test-kitchen, planing to add extensive testing in the future.

Now when uploading the release tarbal to the opscode site, I get the error that it needs a
metada.json. How do you keep this file updated ?

There’s many ways to handle the release process for cookbooks. For
generating metadata you could simply use:

knife cookbook metadata from file metadata.rb

tar and gzip the directory and then manually upload it.

There are several tools though that make this process quicker, which you
may be interested to look at:


Both accomplish the same thing and are nice tools.

Anything more I should beware before publishing ?

One thing that both of the tools I mentioned do that is very important
for keeping your sanity, is to tag the specific changeset when the
release happens. Seems like you’ve already done that in your repo :slight_smile:

[1] https://github.com/masterkorp/cookbook-taskwarrior


Regards,
Alfredo Palhares