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
6
350
Chef introduction
Presentation about
http://www.opscode.com/chef/
Wojciech Wnętrzak
December 05, 2011
Tweet
Share
More Decks by Wojciech Wnętrzak
See All by Wojciech Wnętrzak
Kamal - pierwsze produkcyjne wrażenia
morgoth
0
30
Other Decks in Programming
See All in Programming
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
1
310
ててべんす独演会〜Flowの全てを語ります〜
tbsten
1
220
2分台で1500examples完走!爆速CIを支える環境構築術 - Kaigi on Rails 2025
falcon8823
3
2.4k
AIを活用したレシート読み取り機能の開発から得られた実践知 / AI Receipt Scan Practice
rockname
2
1.5k
Reduxモダナイズ 〜コードのモダン化を通して、将来のライブラリ移行に備える〜
pvcresin
2
630
SpecKitでどこまでできる? コストはどれくらい?
leveragestech
0
380
詳しくない分野でのVibe Codingで困ったことと学び/vibe-coding-in-unfamiliar-area
shibayu36
1
490
Django Ninja による API 開発効率化とリプレースの実践
kashewnuts
0
790
Reactをクライアントで使わない
yusukebe
7
6.3k
Model Pollution
hschwentner
1
180
開発者への寄付をアプリ内課金として実装する時の気の使いどころ
ski
0
330
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
820
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Balancing Empowerment & Direction
lara
4
670
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Done Done
chrislema
185
16k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
How STYLIGHT went responsive
nonsquared
100
5.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Code Review Best Practice
trishagee
72
19k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
32
2.2k
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?