Your SlideShare is downloading. ×
Introduction to chef framework
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Introduction to chef framework

2,514
views

Published on

Presentation given at 3 December 2010 at SRUG meeting …

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,514
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
46
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Introduction to "Chef" framework Silesian Ruby Users Group Wojciech Wn¦trzak December 3, 2010
  • 2. What Is Chef?Open Source (Apache License v. 2.0)FrameworkRubyInfrastructure conguration management tool
  • 3. Chef Is YoungReleased on January 15th, 2009
  • 4. Why To Use Chef?Only one administration guy in company?Forces order in systemExisting solutions for your problemsBest practices
  • 5. How To Use Chef?chef-client + chef-serverchef-client + Opscode Platformchef-solo
  • 6. Chef ServerRuby gem (chef-server)Stores cookbooksStores information about nodesAccessbile by REST API
  • 7. Chef Server ElementsCouchDB stores node informationsSOLR data indexingRabbitMQ helps in indexingMerb API and web user interface
  • 8. Chef Server ElementsCouchDB stores node informationsSOLR data indexingRabbitMQ helps in indexingMerb API and web user interface That is lot of stu !
  • 9. Opscode PlatformFree plan (upto 5 nodes)Conguration step by stepOrganizations and users managment
  • 10. Chef ClientRuby gem (chef)Runs on machine that we want to congureCommunicates with chef serverAuthenticates using RSA keys
  • 11. Server Clients
  • 12. Chef SoloPart of chef gemStandalone run (without connecting to server)Uses cookbooks from local tarballs
  • 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. CookbooksCookbooks for Chef are like RubyGems for 1 Ruby1 I couldnt nd author
  • 15. Cookbook Skeleton
  • 16. Example Attributes Fileset[:postgresql][:version] = 8.4set[:postgresql][:dir] = /etc/postgresql/#{node[:postgresql][:version]}/main
  • 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. 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. Package ProvidersAptYumMacPorts
  • 20. Package ProvidersAptYumMacPorts Many more
  • 21. Supported SystemsDebianGentooFreeBSDMacOSXSolaris
  • 22. Supported SystemsDebianGentooFreeBSDMacOSXSolarisWindows
  • 23. Supported SystemsDebianGentooFreeBSDMacOSXSolarisWindows And more
  • 24. Resources2 package template le user execute script (bash, ruby, perl, python, csh) http_request deploy2 http://wiki.opscode.com/display/chef/Resources
  • 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. Additional Tools - OhaiReleased as a gem ohaiCollects system conguration/informationReturns JSON
  • 27. Additional Tools - KnifePart of chef gemConsole tool for chef server managment
  • 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. 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. Thank YouQuestions?

×