The 5 Stages of Chef Grief
My First 6 months with Chef, and Getting Around the Pitfalls
About me
• Graduated from Trinity
University
• Did technical recruiting before
DevOps
• Craft Beer Lover
• Futurama Quoter
Problem Statement
• Learn chef
Problem Statement
• Learn Chef
• Put all our infrastructure as code
Problem Statement
• Learn Chef
• Put all of Our infrastructure as code
• Create a configurable, reusable Hadoop cookbook
Problem Statement
• Learn Chef
• transition all of our infrastructure as code
• Create a configurable, reusable Hadoop Cookbook
• Can you do it in two weeks?
Denial:
A.K.A. ignorant bliss
Denial: About Chef
Chef Denial
• It will be a no-brainer installation
• I will master it in a week
• documentation is easy to look up
• it is always faster than manual or scripts
• I will only have to learn Ruby
Anger:
A.K.A. Ragequit
Easy Installation?
• How do I google it?
• Multiple tutorials
• All very specific to what they are doing
Gem Errors
• Gem Version conflicts
• Incomplete installation
• Have to have Rubygems installed
Solution: Omnibus
• Versions for every distribution
• Easy to follow
• Installs everything you need to set up Chef
Outlining Chef
• You want to data bag me where?
• Role vs. cookbook, vs. environment vs. Chef-Repo
• Why so many attributes?
• Chef-solo vs. client vs. Enterprise
vs. server
• .pem issues
Logically
• I am not a smart man
• It’s all my fault
• I am not cut out for DevOps
Chef is hard
• different way of doing things
• involves learning a lot about a certain product
• requires unlearning and changing of patterns
• You will stumble, and you will fall
use learn chef
• Listen to Nathan Harvey
(he’s a pretty cool guy)
• https://learnchef.opscode.com/
• FOLLOW THE TUTORIALS
BEFORE TRYING
ANYTHING!!!
Bonus: Chef office hours
• Every thursday (12:00-2:00 Pacific)
• Designed to answer beginner questions
• Primarily one on one
Bargaining
and a little depression
Rule: What is the minimum I
can do?
• Minimum cookbooks that I have
to write
• Minimum programming I have
to learn
• Minimum manual scripting I
have to do
Community cookbooks:
expectation
• community.opscode.com
• over 100 cookbooks for basics (java, nagios, Hadoop)
• Written so they can be all-inclusive
• Should be a no-brainer
Community Cookbooks:
reality
• try to be all inclusive, end up as spaghetti code
• often only make sense if you are an advanced user
• highly opinionated
• are often out of date, buggy, or even deprecated
Write my own cookbooks:
expectation
• It’s my code, it should be easy to follow
• still won’t have to learn much Ruby
• should be easy to pick up all the pieces of Chef now
Write my own Cookbooks:
the reality
• the 10x issue of all-inclusive
• Still having to learn ruby/ a lot of chef
• I was still doing manual steps
The solution
• write single-use cookbooks
• do it however it works
• Don’t stress
Avoid what you don’t need
until you are ready
• no data bags
• no wrappers
• No LWRP’s
• no plugins
I am DevOpsing so hard right
now
• Replaced scripts with actual
code!
• Some attributes
• minimal roles
• Getting more Ruby every day
Overwhelmed Understanding
Plugins
• Developed by the community
• There are a lot of them. A lot
• Not easy to decide.
• Don’t solve all of your problems
Solution
• There kind of isn’t one
• adopt as needed
• listen to the community
• Don’t write your own
Testing
• okay, how do I test
• 15 different testing suites
• 4 different ways to run tests
• Adds a lot of time to my workflow
Solution: Chef DK
• Contains all the pieces of the chef
• includes testing harness (test-kitchen) and plugins
• installs pieces for unit, integration testing
• it is officially chef-sponsored
Continuously Evolving
• dramatically transformed in just 6 months
• energetic, enthusiastic community
• Huge things are coming in the future
• chef 12
• chef supermarket
• evolution of chefdk
Acceptance/Awesome!get raise
make money
buy khakis
in just 3 points
• Chef is hard, and that’s okay
• Don’t make it too hard and go to learn chef, take time
• This is an evolving product
-DevOps Borat
“To make error is Human, to propagate error to
all server in automatic way is DevOps”

The Five Stages of Chef Grief: My First 6 months with Chef, and Getting Around the Pitfalls

  • 1.
    The 5 Stagesof Chef Grief My First 6 months with Chef, and Getting Around the Pitfalls
  • 2.
    About me • Graduatedfrom Trinity University • Did technical recruiting before DevOps • Craft Beer Lover • Futurama Quoter
  • 3.
  • 4.
    Problem Statement • LearnChef • Put all our infrastructure as code
  • 5.
    Problem Statement • LearnChef • Put all of Our infrastructure as code • Create a configurable, reusable Hadoop cookbook
  • 6.
    Problem Statement • LearnChef • transition all of our infrastructure as code • Create a configurable, reusable Hadoop Cookbook • Can you do it in two weeks?
  • 7.
  • 8.
    Denial: About Chef ChefDenial • It will be a no-brainer installation • I will master it in a week • documentation is easy to look up • it is always faster than manual or scripts • I will only have to learn Ruby
  • 9.
  • 10.
    Easy Installation? • Howdo I google it? • Multiple tutorials • All very specific to what they are doing
  • 11.
    Gem Errors • GemVersion conflicts • Incomplete installation • Have to have Rubygems installed
  • 12.
    Solution: Omnibus • Versionsfor every distribution • Easy to follow • Installs everything you need to set up Chef
  • 13.
    Outlining Chef • Youwant to data bag me where? • Role vs. cookbook, vs. environment vs. Chef-Repo • Why so many attributes? • Chef-solo vs. client vs. Enterprise vs. server • .pem issues
  • 14.
    Logically • I amnot a smart man • It’s all my fault • I am not cut out for DevOps
  • 15.
    Chef is hard •different way of doing things • involves learning a lot about a certain product • requires unlearning and changing of patterns • You will stumble, and you will fall
  • 16.
    use learn chef •Listen to Nathan Harvey (he’s a pretty cool guy) • https://learnchef.opscode.com/ • FOLLOW THE TUTORIALS BEFORE TRYING ANYTHING!!!
  • 17.
    Bonus: Chef officehours • Every thursday (12:00-2:00 Pacific) • Designed to answer beginner questions • Primarily one on one
  • 18.
  • 19.
    Rule: What isthe minimum I can do? • Minimum cookbooks that I have to write • Minimum programming I have to learn • Minimum manual scripting I have to do
  • 20.
    Community cookbooks: expectation • community.opscode.com •over 100 cookbooks for basics (java, nagios, Hadoop) • Written so they can be all-inclusive • Should be a no-brainer
  • 21.
    Community Cookbooks: reality • tryto be all inclusive, end up as spaghetti code • often only make sense if you are an advanced user • highly opinionated • are often out of date, buggy, or even deprecated
  • 22.
    Write my owncookbooks: expectation • It’s my code, it should be easy to follow • still won’t have to learn much Ruby • should be easy to pick up all the pieces of Chef now
  • 23.
    Write my ownCookbooks: the reality • the 10x issue of all-inclusive • Still having to learn ruby/ a lot of chef • I was still doing manual steps
  • 24.
    The solution • writesingle-use cookbooks • do it however it works • Don’t stress
  • 25.
    Avoid what youdon’t need until you are ready • no data bags • no wrappers • No LWRP’s • no plugins
  • 26.
    I am DevOpsingso hard right now • Replaced scripts with actual code! • Some attributes • minimal roles • Getting more Ruby every day
  • 27.
  • 28.
    Plugins • Developed bythe community • There are a lot of them. A lot • Not easy to decide. • Don’t solve all of your problems
  • 29.
    Solution • There kindof isn’t one • adopt as needed • listen to the community • Don’t write your own
  • 30.
    Testing • okay, howdo I test • 15 different testing suites • 4 different ways to run tests • Adds a lot of time to my workflow
  • 31.
    Solution: Chef DK •Contains all the pieces of the chef • includes testing harness (test-kitchen) and plugins • installs pieces for unit, integration testing • it is officially chef-sponsored
  • 32.
    Continuously Evolving • dramaticallytransformed in just 6 months • energetic, enthusiastic community • Huge things are coming in the future • chef 12 • chef supermarket • evolution of chefdk
  • 33.
  • 34.
    in just 3points • Chef is hard, and that’s okay • Don’t make it too hard and go to learn chef, take time • This is an evolving product
  • 35.
    -DevOps Borat “To makeerror is Human, to propagate error to all server in automatic way is DevOps”