Chef Intro @ SF Bay Area LSPE meetup

1,446 views

Published on

Published in: Self Improvement, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,446
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
28
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Chef Intro @ SF Bay Area LSPE meetup

  1. 1. Infrastructure Automation with Chef Marius Ducea SF Bay Area #LSPE Sep 23, 2010
  2. 2. whoami •  System Administrator •  Web Operations Engineer •  Consultant
  3. 3. http://www.flickr.com/photos/dunechaser/161509118/
  4. 4. Chef history •  March 2008 – first commit •  September 2008 – Opscode founded •  January 2009 – public release •  Today – v0.9.8
  5. 5. Key Chef Principles•  Idempotent•  Extensible, uses ruby as the configuration language•  Prefers failure over non-deterministic success•  Order matters, simplifying dependencies•  Chef Clients do most of the work, not the server.
  6. 6. Chef-Server Chef-Solo Opscode Platform Chef-Server
  7. 7. Chef-Server Chef-Solo Opscode Platform Chef-Solo • run chef without a server • no scalability issues • no search
  8. 8. Chef-Server Chef-Solo Opscode Platform Opscode Platform
  9. 9. Chef-Client Ohai Chef-Client • runs on all your nodes • executes its recipes locally • runs as a daemon or from cron
  10. 10. Chef-Client Ohai Ohai•  separate project•  provides metadata from thelocal system to chef-client•  this info can be used inrecipes or templates•  produces a JSON data blob
  11. 11. Nodes Chef components RolesCookbooks Node • any system than runs chef-client • has a run list • recipes and roles are applied in order
  12. 12. Nodes Chef components RolesCookbooks Role
  13. 13. Nodes Chef components RolesCookbooks Recipes Recipe Attributes Templates Metadata
  14. 14. Nodes Chef components RolesCookbooks Recipes Attributes Attributes Templates Metadata
  15. 15. Nodes Chef components RolesCookbooks Recipes Template Attributes Templates Metadata
  16. 16. Nodes Chef components RolesCookbooks Recipes Metadata Attributes Templates Metadata
  17. 17. Nodes Chef components RolesCookbooks Recipes Cookbook Attributes Templates Metadata
  18. 18. Nodes Reuse RolesCookbooks Recipes Cookbooks Attributes Templates Metadata
  19. 19. Nodes Share RolesCookbooks Recipes cookbooks.opscode.com Attributes Templates Metadata
  20. 20. Nodes Chef components RolesCookbooks Recipes Attributes Templates Metadata Search Search sample nagios nrpe recipe
  21. 21. Nodes Chef components RolesCookbooks Recipes nrpe recipe Attributes Templates Metadata Search
  22. 22. Nodes Chef components RolesCookbooks Recipes nagios recipe Attributes Templates Metadata Search
  23. 23. WorkflowFirst youll need a chef-repo(git clone git://github.com/opscode/chef-repo.git)cookbooks/ - Cookbooks you download or create.roles/ - Store roles in .rb or .json in the repository.Use rake tasks to upload to the chef server(rake roles upload_cookbooks) http://wiki.opscode.com/display/chef/Chef+Repository
  24. 24. knife command line utility uses the chef-server api. it can create/update/delete roles, cookbooks has support for various cloud providers like ec2, rackspace: knife ec2 server list knife ec2 server create role[Web] -i ami-1634de7f -f t1.micro -x ubuntu -I ~/.ssh/id_rsa-my-keypair -S my-keypair http://wiki.opscode.com/display/chef/Knife
  25. 25. Contributing to chefApache license version 2Very active and helpful communityFill out the CLAGithub used for opscode projects (chef/cookbooks/ohai)Fork the project, work on topic branches.  http://wiki.opscode.com/display/chef/How+to+Contribute http://wiki.opscode.com/display/chef/Working+with+git
  26. 26. Chef is awesome...•  a library for configuration management•  an api for your entire infrastructure•  powerful search•  sharable cookbooksKeep in mind...•  chef is still young•  limited os support•  ubuntu love
  27. 27. Questions?Marius Duceamarius@promethost.com@mariusduceagithub.com/mdxp/cookbooksblog: www.ducea.comsite: promethost.comslides: slideshare.net/mdxp

×