5. Problem Statement
• Learn Chef
• Put all of Our infrastructure as code
• Create a configurable, reusable Hadoop cookbook
6. Problem Statement
• Learn Chef
• transition all of our infrastructure as code
• Create a configurable, reusable Hadoop Cookbook
• Can you do it in two weeks?
8. 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
10. Easy Installation?
• How do I google it?
• Multiple tutorials
• All very specific to what they are doing
11. Gem Errors
• Gem Version conflicts
• Incomplete installation
• Have to have Rubygems installed
12. Solution: Omnibus
• Versions for every distribution
• Easy to follow
• Installs everything you need to set up Chef
13. 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
14. Logically
• I am not 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 office hours
• Every thursday (12:00-2:00 Pacific)
• Designed to answer beginner questions
• Primarily one on one
19. 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
21. 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
22. 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
23. 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
24. The solution
• write single-use cookbooks
• do it however it works
• Don’t stress
25. Avoid what you don’t need
until you are ready
• no data bags
• no wrappers
• No LWRP’s
• no plugins
26. I am DevOpsing so hard right
now
• Replaced scripts with actual
code!
• Some attributes
• minimal roles
• Getting more Ruby every day
28. Plugins
• Developed by the community
• There are a lot of them. A lot
• Not easy to decide.
• Don’t solve all of your problems
29. Solution
• There kind of isn’t one
• adopt as needed
• listen to the community
• Don’t write your own
30. Testing
• okay, how do 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
• dramatically transformed in just 6 months
• energetic, enthusiastic community
• Huge things are coming in the future
• chef 12
• chef supermarket
• evolution of chefdk