24
Chef – The second presentation Robert Postill [email protected]

Chef - the second presentation

Embed Size (px)

Citation preview

Chef – The second presentationRobert Postill

[email protected]

So recap the first presentation then...

Configuration Management is lovely

Chef is a configuration management tool

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

Awesome!

So you set up a config like this...

You're a superhero!

Until...

Until...

Your server goes pop!

Until...

Your server goes pop!

Or...

Until...

Your server goes pop!

Or...

You simultaneously nix all your machines at once

Until...

Your server goes pop!

Or...

You simultaneously nix all your machines at once

Or...

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 :(

BOBBINS!!!!!

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?

Behold! The future!

Does it work?

I'll let you know... :)

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

Inside you get this: