Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Useful Chef cookbooks
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yuya.Nishida.
March 15, 2014
Technology
70
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Useful Chef cookbooks
lChefを使うなら知っておいた方が便利なn個のCookbook
使っていて便利だったCookbookの紹介です.
Yuya.Nishida.
March 15, 2014
More Decks by Yuya.Nishida.
See All by Yuya.Nishida.
削除操作 しない させない ゆるさない
nishidayuya
0
56
git cococoとRailsアプリ開発
nishidayuya
0
520
meeting about memo
nishidayuya
0
820
Other Decks in Technology
See All in Technology
Active Directory と Entra ID のむむむな関係
murachiakira
PRO
0
240
視野はAIに、視座は人に / ai-for-breadth-humans-for-perspective
nkzn
6
2.8k
基本から分かる!AWSセキュリティ運用の考え方と任せ方
cmusudakeisuke
1
390
【Oracle AI SPOTLIGHT ウェビナー】事例から見る!なぜOCIが選ばれたのか ― AI時代のクラウド戦略を紐解く ―
oracle4engineer
PRO
2
150
Maestro MCPとClaude Code Skillsによる自律的なE2Eテスト支援
asmz
0
410
生き様としてのSRE
hokkai7go
1
160
FinOpsを導入してマルチプロダクトのコスト最適化を実現する
kworkdev
PRO
0
120
渡米前の準備を制す!re:Invent 2026徹底準備術 / The Ultimate Preparation Guide for re:Invent 2026
yuj1osm
1
530
推論基盤と Scale-Up Interconnect の現状と制約から俯瞰する技術動向
markunet
2
790
[General] 개발자로 해외 기업에서 일하기
skydoves
1
290
あなたのDartコードは丸見えかもしれない ~reFlutterで暴くFlutterアプリの中身と多層防御~
zozotech
PRO
0
770
E2Eってつらくないですか?E2Eの管理コストを下げる手段とその実践
akaboshinit
6
3k
Featured
See All Featured
Mind Mapping
helmedeiros
1
430
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
460
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
The browser strikes back
jonoalderson
0
1.9k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
360
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
47k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
The Curious Case for Waylosing
cassininazir
1
600
The agentic SEO stack - context over prompts
schlessera
0
1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
First, design no harm
axbom
PRO
2
1.4k
Transcript
Chefを使うなら知っておい た方が便利なn個の Cookbook 西田雄也 松江Ruby会議05 Powered by Rabbit 2.1.2
自己 紹介
仕事はRuby と JavaScript
趣味
Chef とか
Vagrant とか
その辺で 遊んでい ます
Chef使っ ている人
サーバ構 成変更ツ ール
他人の Cookbook
で
楽で きる
他人のふんど^h^h^h Cookbook (程度の差はあるけど)よく作り込まれて いるものが多い. Node Objectに書くだけでインストール・ 設定できる. 追加Resourceが使えるようになる. クロスプラットホームで同じように書け る.Debian系とRedHat系とか
12/33
いく つか
便利な Cookbook の
紹介
database
database 各種RDBMSのためのCookbook データベースの作成 (database Resource) database "redmine_production" do provider Chef::Provider::Database::Postgresql
connection {...} # 接続先ホストとか...省略 owner "redmine" encoding "UTF8" action :create end 17/33
database 各種RDBMSのためのCookbook データベースユーザの作成 (database_user Resource) database_user "redmine" do provider Chef::Provider::Database::PostgresqlUser
connection {...} # 接続先ホストとか...省略 password node["redmine_database_password"] privileges [:select, :update, :insert] action :create end 18/33
rbenv
rbenv やれること rbenvそのもののインストールやruby-buildによ るrubyのインストール rbenv管理下のRubyにgemをインストール ユーザごとにrbenvインストール Chef社が出しているもの じゃない ものが 特に便利
# Berksfile cookbook "rbenv", github: "fnichol/chef-rbenv" 20/33
rbenv 使うRubyのバージョン指定ができるscript Resourceがある. rbenv_script "migrate_rails_database" do rbenv_version "2.1.1" user "redmine"
group "redmine" cwd "/opt/redmine/current" code %{rake RAILS_ENV=production db:migrate} end 21/33
build- essential
build-essential Cのコンパイル環境が必要な場合はこの Cookbook rubyをビルドするとき 拡張ライブラリが入ったgemをインストールする とき その他もろもろ 23/33
build-essential Cのコンパイル環境が必要なCookbookで依 存していることが多いCookbook. gccやmakeが 早い 段階で必要な場合は次 のような指定を行う. # nodes/HOST.json ...
"build_essential": { "compiletime": true }, ... 24/33
gem_binary
gem_binary 他人のCookbookでgemがインストールさ れるときに使うgemコマンドのパスを指定 するのに使ったりする. 通常(使わないとき)はChefが動作時の Rubyが使うgemにインストールされる. debパッケージでChefを入れた場合はパッケージ に同梱されているgemにインストールされる. 自分のCookbookであればrbenv Cookbookのrbenv_gem
Resourceを使え ばいいでしょう. 26/33
gem_binary # Berksfile cookbook "gem_binary", github: "royratcliffe/gem_binary-cookbook" # nodes/HOST.json ...
"gem_binary": "/usr/bin/gem1.9.1", ... 27/33
ロカー ル関連
ロカール関連 ロカール関連Cookbook locale-gen ロカールの生成 locales 設定変更 ロカールがen-USになっているときに ja_JP.UTF-8にするために使用する. 例えばどこかから拾ってきたVagrantのBoxがen- USになっているときとか.
29/33
ロカール関連 # nodes/HOST.json ... "localegen": { "lang": [ "ja_JP.UTF-8 UTF-8"
] }, "locales": { "default": "ja_JP.UTF-8", "available": [ "ja_JP.UTF-8 UTF-8" ] }, ... 30/33
まと め
まとめ 他人のふんど^h^h^hCookbook怖くな い. Serverspecでサーバの振舞いを記述すればよ い. 自前で書いても数ヶ月・数年先には忘れる. README.mdに使い方書いてあるし,なか ったらrecipe/default.rbとかを読めばおk 自分の管理ポリシーに合わせられなかった ら合うように修正してより汎用的にできた
らpull-requestしましょう. 32/33
ご静聴あり がとうござ いました