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
cooking infrastructure with chef
Search
Mathias Meyer
May 13, 2013
Technology
240
4
Share
cooking infrastructure with chef
An introduction to Chef with the simplest Chef that could possibly work.
Mathias Meyer
May 13, 2013
More Decks by Mathias Meyer
See All by Mathias Meyer
Building and Scaling an Distributed and Inclusive Team
roidrage
0
1.4k
The Message Queue is Dead, Long Live the Message Queue
roidrage
4
720
riak-js
roidrage
1
300
designing for concurrency with riak
roidrage
11
1.9k
metrics, monitoring, logging
roidrage
82
15k
design for cloud - jax 2012
roidrage
2
320
A Riak Query Tale
roidrage
5
1k
Don't Use NoSQL
roidrage
10
1.1k
Designing Applications for Amazon Web Services (GOTO Aarhus)
roidrage
6
370
Other Decks in Technology
See All in Technology
QGISプラグイン CMChangeDetector
naokimuroki
1
200
LLM とプロンプトエンジニアリング/チューターを定義する / LLMs and Prompt Engineering, and Defining Tutors
ks91
PRO
0
360
Azure Static Web Apps の自動ビルドがタイムアウトしやすくなった状況に対応した件/global-azure2026
thara0402
0
180
Discordでリモートポケカしてたら、なぜかDOを25分間動かせるようになった話
umireon
0
130
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
74k
組織的なAI活用を阻む 最大のハードルは コンテキストデザインだった
ixbox
7
1.8k
Bluesky Meetup in Tokyo vol.4 - 2023to2026
shinoharata
0
180
ADOTで始めるサーバレスアーキテクチャのオブザーバビリティ
alchemy1115
3
280
AgentCore RuntimeからS3 Filesをマウントしてみる
har1101
4
430
昔はシンプルだった_AmazonS3
kawaji_scratch
0
220
サイバーフィジカル社会とは何か / What Is a Cyber-Physical Society?
ks91
PRO
0
170
AIペネトレーションテスト・ セキュリティ検証「AgenticSec」ご紹介資料
laysakura
0
2.1k
Featured
See All Featured
Amusing Abliteration
ianozsvald
1
150
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
790
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
220
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
110
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Docker and Python
trallard
47
3.8k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
880
Context Engineering - Making Every Token Count
addyosmani
9
810
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.3k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
96
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Transcript
cooking infrastructure with chef ruby for scotland 2013, mathias meyer,
@roidrage
travis-ci.org
None
in the beginning...
manual steps
useradd -h /var/www deploy
apt-get install nginx vi /etc/nginx/nginx.conf mkdir /var/www/travis-ci.org cp ~/ssl.cert /etc/nginx/
service nginx reload
apt-get install mysql-server vi /etc/mysql/my.cnf service mysql-server restart mkdir /var/www/travis-ci.org/shared
vi /var/www/travis-ci.org/shared/database.yml
cp /tmp/id_rsa ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa git clone
[email protected]
:travis-ci/travis-ci.git
artisanal shell scripts
every installation howto ever
None
infrastructure grows
infrastructure changes
teams grow and change
automation
chef
None
chef lingo
bork nodes attributes resources providers recipes cookbooks
nodes
attributes
default[:nginx][:version] = '1.1.19-1' default[:users] = [{ id: 1001, username: 'deploy',
home: '/var/www', shell: '/bin/zsh' }]
resources
package "nginx" do version "1.1.19-1" action :install end
package "nginx" do version node[:nginx][:version] action :install end
user 'deploy' do id 1001 shell '/bin/zsh' home '/var/www' end
default[:users] = [{ id: 1001, username: 'deploy', home: '/var/www', shell:
'/bin/zsh' }]
node[:users].each do |user| user user[:login] do uid user[:id] shell user[:shell]
home user[:home] end end
it's all ruby
providers
directories
directory node[:nginx][:www_root] do action :create recursive true end
configuration files
template "/etc/nginx/sites-available/travis-ci.org" do source "travis-ci.org.erb" owner "www-data" group "www-data" mode
"0644" end
template "/etc/nginx/sites-available/travis-ci.org" do source "travis-ci.org.erb" owner "www-data" group "www-data" mode
"0644" end
default[:nginx][:sites_available] = '/etc/nginx/sites-available' default[:nginx][:sites_enabled] = '/etc/nginx/sites-enabled' default[:nginx][:site_config] = "#{node[:nginx][:sites_available]}/" +
"#{node[:nginx][:host_name]}"
template node[:nginx][:site_config] do source "travis-ci.org.erb" owner "www-data" group "www-data" mode
"0644" end
services
service "nginx" do supports reload: true, restart: true action :start
end
template node[:nginx][:site_config] do source "travis-ci.org.erb" owner "www-data" group "www-data" mode
"0644" notifies :reload, 'service[nginx]' end
customizing templates
server { listen 80; server_name <%= @host_name %>; root <%=
@www_root %>; location / { index index.html } }
template "/etc/nginx/sites-available/travis-ci.org" do source "travis-ci.org.erb" notifies :reload, 'service[nginx]' variables www_root:
node[:nginx][:www_root], host_name: node[:nginx][:host_name] end
default[:nginx][:www_root] = '/var/www/travis-ci.org' default[:nginx][:host_name] = 'travis-ci.org'
link "#{node[:nginx][:sites_enabled]}/" + node[:nginx][:host_name] do to node[:nginx][:sites_config] owner "www-data" group
"www-data" end
recipes
package "nginx" do ... end template "/etc/nginx/sites-available/travis-ci.org" do ... end
service "nginx" do ... end
cookbooks
None
simplest chef that could possibly work
chef mantras
order of execution
idempodence
chef is hard
infrastructure is hard
infrastructure automation
big upfront effort
plan to throw 1000 servers away
quantifyable benefits?
how is this better than shell scripts?
common language for infrastructure automation
mttns* mean time to new server
mttr
orchestration
chef solo
opsworks
chef server
chef server stores cookbooks environments nodes data roles
roles www rails mysql-master mysql-slave
environments staging production testing
automate your servers
automate your laptop
learnchef.com
None
github.com/roidrage/scotrubyconf2013