Chef in a nutshell

3,518 views

Published on

Published in: Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,518
On SlideShare
0
From Embeds
0
Number of Embeds
27
Actions
Shares
0
Downloads
60
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Chef in a nutshell

  1. 1. ChefIn a Nutshell
  2. 2. Chef?● Thick Clients, Thin Server● Order Matters● Ruby● Chef Solo● OHAI● Knife
  3. 3. Chef Server Architecture
  4. 4. Chef Components● Chef Client ○ Public/Private key ○ Machines/Humans● Chef Node● Chef Indexer ○ RabbitMQ ○ Chef Expander/SOLR● Chef Server ○ CouchDB ○ Web Interface ○ REST API● Chef Solo ○ Vagrant - development and tests
  5. 5. Cooking with Chef● Nodes ○ Roles ○ Cookbooks ○ Recipes ○ Resources● Environment● Data bags (JSON)
  6. 6. Anatomy of a Chef Run
  7. 7. Anatomy of a Chef Run● Build, Register, and Authenticate the Node ○ OHAI ○ chef-validator ○ client.pem● Synchronize Cookbooks ○ Libraries ○ Attributes ○ Definitions ○ Recipes
  8. 8. Anatomy of a Chef Run● Compile Resource Collection ○ Load Libraries ○ Load Attributes ○ Load Definitions ○ Load Recipes● Configure Node ○ Converge ○ Save Node ○ Run Notifications
  9. 9. OHAI● Gem● Windows● Standalone● Ruby library● Plugins
  10. 10. Chef Basics● Node ○ Run List ■ Recipe ■ Role (Ruby/JSON) ○ Attributes ○ Tags● Data Bags ○ JSON ○ Search ○ Encrypte● Search
  11. 11. Chef Basics ● Cookbooks ○ Recipe ○ Resources ■ Deploy ■ AWS ■ Dynect ■ Gem, PyPi e PEAR ○ Metadata ○ Providers ■ LWRP ○ Search ○ Exception and Report Handler
  12. 12. Cookbooks● Version● Library ○ Ruby code● Metadata ○ name ○ version ○ depends/conflicts/replaces ○ supports● Templates ○ ERB
  13. 13. Cookbooks ● Attributes ○ override ○ normal ○ default ● Definitions ● File Distribution ● Recipes ○ include ○ search ○ data bags ○ tag
  14. 14. Managing Chef● Knife ○ Bootstrap ○ Exec ■ SSH ○ Plugin ■ Windows ■ knife-windows ■ Windows Remote Management ■ PowerShell ■ EC2/Rackspace/Slicehost/Terremark● Shef ○ irb
  15. 15. Workflow ● Environments ● Freeze ● Metadata versionDevelopment 1. Bump the version number as appropriate 2. Hack 3. Upload and test 4. Repeat 2 and 3 as necessaryProduction 1. Upload and freeze your cookbooks 2. Modify your environment to prefer the new version you uploaded 3. Upload the updated environment 4. Deploy
  16. 16. LinksOpscode Platform "The first five nodes are free!"Opscode WikiA Brief Chef TutorialExample Cookbooks:http://github.com/opscode/cookbookshttp://github.com/37signals/37s_cookbookshttp://github.com/engineyard/ey-cloud-recipes

×