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
340
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
28
Other Decks in Programming
See All in Programming
第9回 情シス転職ミートアップ 株式会社IVRy(アイブリー)の紹介
ivry_presentationmaterials
1
280
Blazing Fast UI Development with Compose Hot Reload (droidcon New York 2025)
zsmb
1
280
テストから始めるAgentic Coding 〜Claude Codeと共に行うTDD〜 / Agentic Coding starts with testing
rkaga
1
140
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
140
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
420
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
3
440
Team topologies and the microservice architecture: a synergistic relationship
cer
PRO
0
1.2k
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
530
Team operations that are not burdened by SRE
kazatohiei
1
310
0626 Findy Product Manager LT Night_高田スライド_speaker deck用
mana_takada
0
150
すべてのコンテキストを、 ユーザー価値に変える
applism118
3
1.2k
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
3
750
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
77
9.4k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
500
KATA
mclloyd
30
14k
A designer walks into a library…
pauljervisheath
207
24k
Balancing Empowerment & Direction
lara
1
410
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
Side Projects
sachag
455
42k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
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?