Chef cheat sheet: Difference between revisions

 
(9 intermediate revisions by the same user not shown)
Line 17: Line 17:
  [http://acrmp.github.com/foodcritic/ Foodcritic - A lint tool for your Opscode Chef cookbooks]
  [http://acrmp.github.com/foodcritic/ Foodcritic - A lint tool for your Opscode Chef cookbooks]
  [https://github.com/etsy/foodcritic-rules Etsy's foodcritic rules]
  [https://github.com/etsy/foodcritic-rules Etsy's foodcritic rules]
ここで定義されているスタイルに合わせる。
ここで定義されているスタイルに合わせる。(最近 FC001 が違うという議論もあって面白い ;)
 
[http://wiki.opscode.com/display/chef/Opscode+Community+Summit+2 Opscode Community Summit 2 Session Documentation]
コミュニティサミットのドキュメント いろいろ参考になるかも。


== 導入 ==
== 導入 ==
Line 48: Line 51:
  [http://wiki.opscode.com/display/chef/Installing+Omnibus+Chef+Client+on+Linux+and+Mac Omnibus Installation]
  [http://wiki.opscode.com/display/chef/Installing+Omnibus+Chef+Client+on+Linux+and+Mac Omnibus Installation]


  sudo true && curl -L https://www.opscode.com/chef/install.sh | sudo bash
  <del>sudo true && curl -L https://www.opscode.com/chef/install.sh | sudo bash</del>


upgrade も ↑ で OK
upgrade も ↑ で OK


  sudo true && curl -L https://www.opscode.com/chef/install.sh | sudo bash -s -- -v 10.12.0
  <del>sudo true && curl -L https://www.opscode.com/chef/install.sh | sudo bash -s -- -v 10.12.0</del>
 
とか バージョン指定も可能。(今は 10.16.2)


とか バージョン指定も可能 (いまのところ chef-client 10.14.2 は駄目っぽい) (10.14.4 が出た)
(2015/06/25 追記: 最近は curl | sudo bash はさすがにマズイという風潮が... なので公式サイトの表面からは消えてるようです。[https://downloads.chef.io/chef-client/])


== my recipes ==
== my recipes ==
Line 76: Line 81:
knife.rb
knife.rb
<pre>
<pre>
# EC2:                                                                                                                    
# EC2:
knife[:aws_access_key_id]    = "---"
knife[:aws_access_key_id]    = "---"
knife[:aws_secret_access_key] = "---"
knife[:aws_secret_access_key] = "---"
Line 169: Line 174:


  knife diff | fgrep diff
  knife diff | fgrep diff
== berkshelf ==
[http://berkshelf.com/ Berkshelf - Manage a Cookbook or an Application's Cookbook dependencies]
便利っぽい
== spiceweasel ==
[http://wiki.opscode.com/display/chef/Spiceweasel Spiceweasel]
便利っぽい


== cookbook motd-tail ==
== cookbook motd-tail ==