Page 1
Introduction to ChefBy Lex Kridler
Page 2
Lex KridlerSenior Developer at CP+B
@lkrids
Page 7
“Chef is a systems and cloud
infrastructure automation
framework that makes it easy to
deploy servers and applications
to any physical, virtual, or cloud
location, no matter the size of the
infrastructure.”
http://docs.chef.io/
Page 8
1. Problem
2. Solution
3. Demo
Page 11
TCP
RWND and CWND
Page 16
https://www.chef.io/solutions/cloud-management/
Page 17
https://downloads.chef.io/chef-dk/
Page 18
https://www.chef.io/solutions/cloud-management/
Page 19
knife bootstrap <ip> -x <username> -P <password> -N <node_name>
knife bootstrap <ip> -i <ident_file>
Node Setup
(manual)
Page 20
https://www.chef.io/solutions/cloud-management/
Page 21
Starts with a Server
Page 22
Organizations
• Contain members
• Separate keys
• Separate starter kit
Page 24
Cookbook
- recipes
- metadata.rb
- files
- templates
Page 25
Basic Apache Recipe
Page 27
https://www.chef.io/solutions/cloud-management/
Page 29
https://www.chef.io/solutions/cloud-management/
Page 31
Variable Precedence
Page 32
Suggested variable naming convention:
<precedence>[“<cookbook>”][“<attribute>”]
Page 33
https://supermarket.chef.io/cookbooks
Page 34
Dependency Management
• Berkshelf
– Similar to npm, cocoapods, or composer
– Created and opensourced by Riot Games
• League of Legends
Page 35
Bugs (Foodcritic)
• They are hard to track down
• Foodcritic – static analysis of cookbooks
– Doesn’t find everything, similar to jshint
– Give examples of errors it finds
Page 38
Resources
Mobile phone graphic - Created by James Fenton from the Noun ProjectChef graphic - Created by Juan Pablo Bravo from the Noun ProjectTerminal graphic - Created by useiconic.com from the Noun Project
Page 39
Next Steps
• Notifications of cookbook updates
Page 40
Other Ideas
• Combining Chef with Docker or Vagrant to
setup reproducible local dev environments
• Chef can be used to automate setting up
your next workstation