Chef - the second presentation
-
Upload
robert-postill -
Category
Technology
-
view
443 -
download
0
Transcript of Chef - the second presentation
How does it work?
Simple:
You have a set of cookbooks stored in git
They get pushed to the chef server
The chef server pushes them out to the chef clients
The clients run the recipes from the cookbooks based on roles
What does a recipe look like?
user "random" do
comment "Random User"
uid "1000"
gid "users"
home "/home/random"
shell "/bin/zsh"
password "$1$JJsvHslV$szsCjVEroftprNn4JHtDi."
end
Or ...
%w{dir1 dir2 dir3}.each do |dir|
directory "/tmp/mydirs/#{dir}" do
mode 0775
owner "root"
group "root"
action :create
recursive true
end
end
Until...
Your server goes pop!
Or...
You simultaneously nix all your machines at once
Or...
After you have fifty machines you cannot see a thing in the web UI :(
You start thinking...
How do I make this resilient?
How do I try out recipes before hosing machines?
How do I separate out the machines into groups?
What about some general tips?
Sure:
Version 0.7 chef is not a patch on v0.9
Use chef-solo and shef to trial your recipes before pushing them up to a sever...
Beware the abstraction
Data bags are your friend
Questions?
Photo Credits:
(all flickr so flickr.com/<username>)
Millzero – endless love
Lockergnome – I'm Happy?
Istolethetv – awesome bat-shirt
Christine [cbszeto] – Isaac tantrum