Specify cookbook name in metadata.rb? (or: how to organize your cookbooks on github)?

Ohai Chefs!

Is it possible to specify the cookbook name in metadata.rb?

The trouble I’m having is that when I prefix my github cookbook repos with
"cookbooks-" I have to make sure to clone them into the right directory,
e.g. ‘git clone https://github.com/.../cookbooks-apache2 apache2’ so that I
can use it as ‘recipe[apache2]’ and not ‘recipe[cookbooks-apache2]’.

I didn’t want to create a special github account for cookbooks only, still
I want to be able to somehow group them.

Or any other suggestions?

Thanks,
Torben

On May 29, 2012, at 7:47 AM, Torben Knerr wrote:

Or any other suggestions?

Try knife-github:

And for more sophisticated cookbook management you'd take a look at Librarian:

This way you could manage your github cookbooks like this:

Cheffile

cookbook 'top',
:git => "git@github.com:fooforge/chef-cookbook_top.git",

Regards,
Mike


Mike Adolphs
Stitenstrasse 24
23554 Luebeck

  • Germany -

Mail. mike@fooforge.com
Web. http://fooforge.com/
Github. fooforge (Mike Stojan) · GitHub
XING. http://www.xing.com/profile/Mike_Adolphs

Yes, you can explicitly set the name of your Cookbook in the metadata file.

http://wiki.opscode.com/display/chef/Metadata#Metadata-name

--
Jamie Winsor
@resetexistence

On Tuesday, May 29, 2012 at 1:17 AM, Mike Adolphs wrote:

On May 29, 2012, at 7:47 AM, Torben Knerr wrote:

Or any other suggestions?

Try knife-github:
GitHub - websterclay/knife-github-cookbooks: A knife plugin facilitating installing, updating, and tracking Chef cookbooks found on Github.

And for more sophisticated cookbook management you'd take a look at Librarian:
GitHub - applicationsonline/librarian: Librarian - A Framework for Bundlers. Librarian-Chef is at: https://github.com/applicationsonline/librarian-chef.

This way you could manage your github cookbooks like this:

Cheffile

cookbook 'top',
:git => "git@github.com (mailto:git@github.com):fooforge/chef-cookbook_top.git",

Regards,
Mike


Mike Adolphs
Stitenstrasse 24
23554 Luebeck

  • Germany -

Mail. mike@fooforge.com (mailto:mike@fooforge.com)
Web. http://fooforge.com/
Github. fooforge (Mike Stojan) · GitHub
XING. http://www.xing.com/profile/Mike_Adolphs

Yes. The metadata attribute is “name”.

sent from my phone, excuse any nonsensical autocorrect stuff.

Torben Knerr ukio@gmx.de wrote:

Ohai Chefs!

Is it possible to specify the cookbook name in metadata.rb?

The trouble I’m having is that when I prefix my github cookbook repos with “cookbooks-” I have to make sure to clone them into the right directory, e.g. ‘git clone https://github.com/.../cookbooks-apache2 apache2’ so that I can use it as ‘recipe[apache2]’ and not ‘recipe[cookbooks-apache2]’.

I didn’t want to create a special github account for cookbooks only, still I want to be able to somehow group them.

Or any other suggestions?

Thanks,
Torben

@Jamie, Eric: thanks, exactly what I was looking for!

@Mike: thanks for the pointer to knife-github-cookbooks. Librarian I'm
actually using already. My problem was rather that on my github account I
wanted to separate the cookbook git repos from other git repos

Thanks guys!
Torben

On Tue, May 29, 2012 at 1:23 PM, Wolfe, Eric G eric.wolfe@marshall.eduwrote:

Yes. The metadata attribute is "name".

sent from my phone, excuse any nonsensical autocorrect stuff.

Torben Knerr ukio@gmx.de wrote:

Ohai Chefs!

Is it possible to specify the cookbook name in metadata.rb?

The trouble I'm having is that when I prefix my github cookbook repos with
"cookbooks-" I have to make sure to clone them into the right directory,
e.g. 'git clone https://github.com/.../cookbooks-apache2 apache2' so that
I can use it as 'recipe[apache2]' and not 'recipe[cookbooks-apache2]'.

I didn't want to create a special github account for cookbooks only, still
I want to be able to somehow group them.

Or any other suggestions?

Thanks,
Torben