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


#1

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


#2

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. https://github.com/fooforge/
XING. http://www.xing.com/profile/Mike_Adolphs


#3

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:
https://github.com/websterclay/knife-github-cookbooks

And for more sophisticated cookbook management you’d take a look at Librarian:
https://github.com/applicationsonline/librarian

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. https://github.com/fooforge/
XING. http://www.xing.com/profile/Mike_Adolphs


#4

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


#5

@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