# Publishing cookbooks guidelines

**URL:** <https://discourse.chef.io/t/publishing-cookbooks-guidelines/4927>\
**Category:** Chef Infra (archive)\
**Created:** [January 21, 2014, 6:14pm UTC](https://discourse.chef.io/t/publishing-cookbooks-guidelines/4927 "2014-01-21T18:14:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alfredo\_Palhares](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/alfredo_palhares/32/335_2.png) [@Alfredo\_Palhares](https://discourse.chef.io/u/Alfredo_Palhares)\
**Post date:** [January 21, 2014, 6:14pm UTC](https://discourse.chef.io/t/publishing-cookbooks-guidelines/4927/1 "2014-01-21T18:14:15Z")

</div>

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](https://github.com/masterkorp/cookbook-taskwarrior)

–  
Regards,  
Alfredo Palhares

---

<div class="post-metadata">

**Author:** ![Eric\_G\_Wolfe](https://avatars.discourse-cdn.com/v4/letter/e/13edae/32.png) [@Eric\_G\_Wolfe](https://discourse.chef.io/u/Eric_G_Wolfe)\
**Post date:** [January 21, 2014, 6:20pm UTC](https://discourse.chef.io/t/publishing-cookbooks-guidelines/4927/2 "2014-01-21T18:20:55Z")

</div>

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] [GitHub - alfredopalhares/cookbook-taskwarrior: A Chef cookbook to manage taskwarrior and friends.](https://github.com/masterkorp/cookbook-taskwarrior)
> 
> --  
> Regards,  
> Alfredo Palhares

---

<div class="post-metadata">

**Author:** ![sme](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/sme/32/271_2.png) [@sme](https://discourse.chef.io/u/sme)\
**Post date:** [January 21, 2014, 6:26pm UTC](https://discourse.chef.io/t/publishing-cookbooks-guidelines/4927/3 "2014-01-21T18:26:33Z")

</div>

Alfredo Palhares [masterkorp@masterkorp.net](mailto: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:

> **[GitHub - fnichol/emeril: Emeril: Tag And Release Chef Cookbooks As A Library](https://github.com/fnichol/emeril)**
>
> Emeril: Tag And Release Chef Cookbooks As A Library - GitHub - fnichol/emeril: Emeril: Tag And Release Chef Cookbooks As A Library

> **[GitHub - chef-boneyard/stove: DEPRECATED: A utility for packaging and...](https://github.com/chef-boneyard/stove)**
>
> DEPRECATED: A utility for packaging and releasing Chef cookbooks - GitHub - chef-boneyard/stove: DEPRECATED: A utility for packaging and releasing Chef cookbooks

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 🙂

> [1] [GitHub - alfredopalhares/cookbook-taskwarrior: A Chef cookbook to manage taskwarrior and friends.](https://github.com/masterkorp/cookbook-taskwarrior)

> --  
> Regards,  
> Alfredo Palhares
