Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Chef introduction
Search
Wojciech Wnętrzak
December 05, 2011
Programming
350
6
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Chef introduction
Presentation about
http://www.opscode.com/chef/
Wojciech Wnętrzak
December 05, 2011
More Decks by Wojciech Wnętrzak
See All by Wojciech Wnętrzak
Kamal - pierwsze produkcyjne wrażenia
morgoth
0
36
Other Decks in Programming
See All in Programming
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
280
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
480
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
120
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
250
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.1k
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.5k
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
160
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
110
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
350
JavaDoc 再入門
nagise
1
340
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
170
AIで効率化できた業務・日常
ochtum
0
130
Featured
See All Featured
Balancing Empowerment & Direction
lara
6
1.2k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
330
How to make the Groovebox
asonas
2
2.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Building Applications with DynamoDB
mza
96
7.1k
Designing Powerful Visuals for Engaging Learning
tmiket
1
410
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
Exploring anti-patterns in Rails
aemeredith
3
410
Paper Plane (Part 1)
katiecoart
PRO
0
8.9k
sira's awesome portfolio website redesign presentation
elsirapls
0
280
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
160
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Transcript
Introduction to "Chef" framework Silesian Ruby Users Group Wojciech Wn¦trzak
December 3, 2010
What Is Chef? Open Source (Apache License v. 2.0) Framework
Ruby Infrastructure conguration management tool
Chef Is Young Released on January 15th, 2009
Why To Use Chef? Only one administration guy in company?
Forces order in system Existing solutions for your problems Best practices
How To Use Chef? chef-client + chef-server chef-client + Opscode
Platform chef-solo
Chef Server Ruby gem (chef-server) Stores cookbooks Stores information about
nodes Accessbile by REST API
Chef Server Elements CouchDB stores node informations SOLR
data indexing RabbitMQ helps in indexing Merb API and web user interface
Chef Server Elements CouchDB stores node informations SOLR
data indexing RabbitMQ helps in indexing Merb API and web user interface That is lot of stu!
Opscode Platform Free plan (upto 5 nodes) Conguration step by
step Organizations and users managment
Chef Client Ruby gem (chef) Runs on machine that we
want to congure Communicates with chef server Authenticates using RSA keys
Server Clients
Chef Solo Part of chef gem Standalone run (without connecting
to server) Uses cookbooks from local tarballs
Simple Workow Write cookbook with recipe Upload it to chef
server Dene run list by: editing node on chef server passing JSON le to chef-client Run chef-client on desired machine
Cookbooks Cookbooks for Chef are like RubyGems for Ruby 1
1I couldn't nd author
Cookbook Skeleton
Example Attributes File set[:postgresql][:version] = "8.4" set[:postgresql][:dir] = "/etc/postgresql/{node[:postgresql][:version]}/main"
PostgreSQL Server Recipe include_recipe "postgresql::client" package "postgresql-{node[:postgresql][:version]}" do action :install
end template "{node[:postgresql][:dir]}/postgresql.conf" do source "postgresql.conf.erb" owner "postgres" group "postgres" mode "0600" end service "postgresql-{node[:postgresql][:version]}" do action :start end
Recipe Features include_recipe "postgresql::client" package "postgresql-{node[:postgresql][:version]}" service "postgresql" do service_name
"postgresql-{node[:postgresql][:version]}" supports :restart => true, :status => true action :nothing end template "{node[:postgresql][:dir]}/postgresql.conf" do source "postgresql.conf.erb" owner "postgres" group "postgres" mode "0600" notifies :restart, "service[postgresql]" end
Package Providers Apt Yum MacPorts
Package Providers Apt Yum MacPorts Many more
Supported Systems Debian Gentoo FreeBSD MacOSX Solaris
Supported Systems Debian Gentoo FreeBSD MacOSX Solaris Windows
Supported Systems Debian Gentoo FreeBSD MacOSX Solaris Windows And more
Resources2 package template le user execute script (bash, ruby, perl,
python, csh) http_request deploy 2http://wiki.opscode.com/display/chef/Resources
Resources2 package template le user execute script (bash, ruby, perl,
python, csh) http_request deploy Many more 2http://wiki.opscode.com/display/chef/Resources
Additional Tools - Ohai Released as a gem ohai
Collects system conguration/information Returns JSON
Additional Tools - Knife Part of chef gem Console tool
for chef server managment
Tips If using RVM, use rvmsudo for chef-client Take a
look at chef bootstrap3 Remember that Ruby (Chef) uses sh, not bash 3http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+ Installation
Useful Links http://www.opscode.com/chef/ http://help.opscode.com/faqs/start/how-to-get-started http://cookbooks.opscode.com/ https://github.com/opscode/cookbooks
Thank You Questions?