5 Things You Always Wanted to Know About Chef

When I first started working with Chef, there were a couple of areas that I knew were going to be really awesome and helpful but I wasn't sure how to get started with them. In this presentation, I'll provide a quick introduction to five things you've always wanted to know about Chef but were afraid to ask.

I gave this presentation at #ChefConf 2012.

Level-up your Chef skills by learning about these areas of Chef:

One thing I didn't mention in the presentation was how to use the data from the encrypted data bag. I've updated the slides to include this info but it doesn't appear in the video. In any case, here's a quick demo of how you might use it:

creds = Chef::EncryptedDataBagItem.load("db", "creds")
env_db_creds = db_creds[node["rails_env"]]

template "#{app_dir}/shared/config/database.yml" do
  source "database.yml.erb"
  variables(
    :rails_env => node["rails_env"],
    :username => env_db_creds["username"],
    :password => env_db_creds["password"]
  )
end

Video

Slides


by Nathen Harvery