9
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

「site-cookbooks」に自作cookbookを置くスタイルはどこから広まったのか

Last updated at Posted at 2015-03-25
  • site-cookbooksに自作のcookbookを置く
  • cookbooksにはサードパーティのcookbookを置く

というスタイル、てっきりChefの公式推奨スタイルかと思っていたのですが、調べてみたらそうではありませんでした。
いったいどこから発祥して広まったのでしょうか?

Chef本家

とくにsite-cookbooksについて言及していません。

Cookbooks you download or create.

ということで、自作cookbookをcookbooksに置いてもよいようです。

Berkshelf

The traditional pattern is to place all of your cookbooks in a directory called cookbooks or site-cookbooks within your Chef Repository.

cookbookssite-cookbookを同列のようにみなしています。
とくに、どっちをどの用途に、とは書かれていませんでした。

librarian

Librarian-Chef takes over your cookbooks/ directory and manages it for you based on your Cheffile. Your Cheffile becomes the authoritative source for the cookbooks your infrastructure repository depends on. You should not modify the contents of your cookbooks/ directory when using Librarian-Chef. If you have cookbooks which are, rather than being separate projects, inherently part of your infrastructure repository, then they should go in a separate directory, like your site-cookbooks/ directory, and you do not need to use Librarian-Chef to manage them.

ライブラリはcookbooksに、自作のはsite-cookbooksに置きなさい、と明言されています。
どうやらここが発祥の地のようです。

Knife-solo

A note about the “cookbooks” directory
One common “gotcha” is that you may have Berkshelf or Librarian-Chef installed without knowing it. This will generate a kitchen that is configured to use them which might not have been your intention. Once the configuration file is available, the cookbooks directory will be reserved for cookbooks that are resolved via one of those tools. Any cookbooks that you create there will be removed when you run knife solo cook.

Please use site-cookbooks for custom cookbooks or (better yet) give them their own git repositories which are then included using Berkshelf or Librarian-Chef.

cookbooksはBerkshelf or Librarian-Chefの展開先として使うから、自作のやつはsite-cokbooksに置きなさいとはっきり書かれています。

結論

  • site-cookbooksに自作cookbookを置くスタイルは、特にChef公式ではない。
  • Librarian-Chefから始まって、knife-soloがそれを採用して広めた。
  • 日本では既にデファクトスタンダード(?)っぽくなっている。
9
7
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?