• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Introduction to chef framework
 

Introduction to chef framework

on

  • 2,955 views

Presentation given at 3 December 2010 at SRUG meeting

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

Statistics

Views

Total Views
2,955
Views on SlideShare
2,954
Embed Views
1

Actions

Likes
2
Downloads
46
Comments
0

1 Embed 1

http://www.linkedin.com 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Introduction to chef framework Introduction to chef framework Presentation Transcript

    • 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 practices
    • 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 interface
    • Chef Server ElementsCouchDB  stores node informationsSOLR  data indexingRabbitMQ  helps in indexingMerb  API and web user interface That is lot of stu !
    • 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  passing JSON le to chef-clientRun chef-client on desired machine
    • CookbooksCookbooks for Chef are like RubyGems for 1 Ruby1 I couldnt nd author
    • Cookbook Skeleton
    • Example Attributes Fileset[:postgresql][:version] = "8.4"set[:postgresql][:dir] = "/etc/postgresql/#{node[:postgresql][:version]}/main"
    • PostgreSQL Server Recipeinclude_recipe "postgresql::client"package "postgresql-#{node[:postgresql][:version]}"template "#{node[:postgresql][:dir]}/postgresql.conf" do source "postgresql.conf.erb" owner "postgres" group "postgres" mode "0600"endservice "postgresql-#{node[:postgresql][:version]}" do action :startend
    • Recipe Featuresinclude_recipe "postgresql::client"package "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
    • 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_request deploy2 http://wiki.opscode.com/display/chef/Resources
    • Resources2 package template le user execute script (bash, ruby, perl, python, csh) http_request deploy Many more2 http://wiki.opscode.com/display/chef/Resources
    • 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 Ruby (Chef) uses sh, not bash 3 http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+Installation
    • Useful Linkshttp://www.opscode.com/chef/http://help.opscode.com/faqs/start/how-to-get-startedhttp://cookbooks.opscode.com/https://github.com/opscode/cookbooks
    • Thank YouQuestions?