Introduction to "Chef" framework      Silesian Ruby Users Group          Wojciech Wn¦trzak         December 3, 2010
What Is Chef?Open Source (Apache License v. 2.0)FrameworkRubyInfrastructure conguration management tool
Chef Is YoungReleased on January 15th, 2009
Why To Use Chef?Only one administration guy in company?Forces order in systemExisting solutions for your problemsBest prac...
How To Use Chef?chef-client   +   chef-serverchef-client   + Opscode Platformchef-solo
Chef ServerRuby gem (chef-server)Stores cookbooksStores information about nodesAccessbile by REST API
Chef Server ElementsCouchDB  stores node informationsSOLR  data indexingRabbitMQ  helps in indexingMerb  API and web user ...
Chef Server ElementsCouchDB  stores node informationsSOLR  data indexingRabbitMQ  helps in indexingMerb  API and web user ...
Opscode PlatformFree plan (upto 5 nodes)Conguration step by stepOrganizations and users managment
Chef ClientRuby gem (chef)Runs on machine that we want to congureCommunicates with chef serverAuthenticates using RSA keys
Server  Clients
Chef SoloPart of   chef   gemStandalone run (without connecting to server)Uses cookbooks from local tarballs
Simple WorkowWrite cookbook with recipeUpload it to chef serverDene run list by:               editing node on chef server...
CookbooksCookbooks for Chef are like RubyGems for                                    1                            Ruby1   ...
Cookbook Skeleton
Example Attributes Fileset[:postgresql][:version] = 8.4set[:postgresql][:dir] =  /etc/postgresql/#{node[:postgresql][:vers...
PostgreSQL Server Recipeinclude_recipe postgresql::clientpackage postgresql-#{node[:postgresql][:version]}template #{node[...
Recipe Featuresinclude_recipe postgresql::clientpackage postgresql-#{node[:postgresql][:version]}service postgresql do  se...
Package ProvidersAptYumMacPorts
Package ProvidersAptYumMacPorts           Many more
Supported SystemsDebianGentooFreeBSDMacOSXSolaris
Supported SystemsDebianGentooFreeBSDMacOSXSolarisWindows
Supported SystemsDebianGentooFreeBSDMacOSXSolarisWindows          And more
Resources2     package     template     le     user     execute     script (bash, ruby, perl, python, csh)     http_reques...
Resources2     package     template     le     user     execute     script (bash, ruby, perl, python, csh)     http_reques...
Additional Tools - OhaiReleased as a gem    ohaiCollects system conguration/informationReturns   JSON
Additional Tools - KnifePart of   chef   gemConsole tool for chef server managment
Tips      If using   RVM,   use   rvmsudo   for   chef-client      Take a look at chef      bootstrap3      Remember that ...
Useful Linkshttp://www.opscode.com/chef/http://help.opscode.com/faqs/start/how-to-get-startedhttp://cookbooks.opscode.com/...
Thank YouQuestions?
Upcoming SlideShare
Loading in...5
×

Introduction to chef framework

2,547

Published on

Presentation given at 3 December 2010 at SRUG meeting
http://srug.pl

Published in: Technology, Self Improvement
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,547
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
47
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Introduction to chef framework

  1. 1. Introduction to "Chef" framework Silesian Ruby Users Group Wojciech Wn¦trzak December 3, 2010
  2. 2. What Is Chef?Open Source (Apache License v. 2.0)FrameworkRubyInfrastructure conguration management tool
  3. 3. Chef Is YoungReleased on January 15th, 2009
  4. 4. Why To Use Chef?Only one administration guy in company?Forces order in systemExisting solutions for your problemsBest practices
  5. 5. How To Use Chef?chef-client + chef-serverchef-client + Opscode Platformchef-solo
  6. 6. Chef ServerRuby gem (chef-server)Stores cookbooksStores information about nodesAccessbile by REST API
  7. 7. Chef Server ElementsCouchDB stores node informationsSOLR data indexingRabbitMQ helps in indexingMerb API and web user interface
  8. 8. Chef Server ElementsCouchDB stores node informationsSOLR data indexingRabbitMQ helps in indexingMerb API and web user interface That is lot of stu !
  9. 9. Opscode PlatformFree plan (upto 5 nodes)Conguration step by stepOrganizations and users managment
  10. 10. Chef ClientRuby gem (chef)Runs on machine that we want to congureCommunicates with chef serverAuthenticates using RSA keys
  11. 11. Server Clients
  12. 12. Chef SoloPart of chef gemStandalone run (without connecting to server)Uses cookbooks from local tarballs
  13. 13. Simple WorkowWrite cookbook with recipeUpload it to chef serverDene run list by: editing node on chef server passing JSON le to chef-clientRun chef-client on desired machine
  14. 14. CookbooksCookbooks for Chef are like RubyGems for 1 Ruby1 I couldnt nd author
  15. 15. Cookbook Skeleton
  16. 16. Example Attributes Fileset[:postgresql][:version] = 8.4set[:postgresql][:dir] = /etc/postgresql/#{node[:postgresql][:version]}/main
  17. 17. PostgreSQL Server Recipeinclude_recipe postgresql::clientpackage postgresql-#{node[:postgresql][:version]}template #{node[:postgresql][:dir]}/postgresql.conf do source postgresql.conf.erb owner postgres group postgres mode 0600endservice postgresql-#{node[:postgresql][:version]} do action :startend
  18. 18. Recipe Featuresinclude_recipe postgresql::clientpackage postgresql-#{node[:postgresql][:version]}service postgresql do service_name postgresql-#{node[:postgresql][:version]} supports :restart = true, :status = true action :nothingendtemplate #{node[:postgresql][:dir]}/postgresql.conf do source postgresql.conf.erb owner postgres group postgres mode 0600 notifies :restart, service[postgresql]end
  19. 19. Package ProvidersAptYumMacPorts
  20. 20. Package ProvidersAptYumMacPorts Many more
  21. 21. Supported SystemsDebianGentooFreeBSDMacOSXSolaris
  22. 22. Supported SystemsDebianGentooFreeBSDMacOSXSolarisWindows
  23. 23. Supported SystemsDebianGentooFreeBSDMacOSXSolarisWindows And more
  24. 24. Resources2 package template le user execute script (bash, ruby, perl, python, csh) http_request deploy2 http://wiki.opscode.com/display/chef/Resources
  25. 25. Resources2 package template le user execute script (bash, ruby, perl, python, csh) http_request deploy Many more2 http://wiki.opscode.com/display/chef/Resources
  26. 26. Additional Tools - OhaiReleased as a gem ohaiCollects system conguration/informationReturns JSON
  27. 27. Additional Tools - KnifePart of chef gemConsole tool for chef server managment
  28. 28. Tips If using RVM, use rvmsudo for chef-client Take a look at chef bootstrap3 Remember that Ruby (Chef) uses sh, not bash 3 http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+Installation
  29. 29. Useful Linkshttp://www.opscode.com/chef/http://help.opscode.com/faqs/start/how-to-get-startedhttp://cookbooks.opscode.com/https://github.com/opscode/cookbooks
  30. 30. Thank YouQuestions?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×