• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Cooking an Omelette with Chef
 

Cooking an Omelette with Chef

on

  • 592 views

A talk given at Rails Israel about getting value with Chef at your enterprise while minimizing the common errors that people make.

A talk given at Rails Israel about getting value with Chef at your enterprise while minimizing the common errors that people make.

Statistics

Views

Total Views
592
Views on SlideShare
519
Embed Views
73

Actions

Likes
1
Downloads
7
Comments
0

2 Embeds 73

http://railsisrael2013.events.co.il 72
https://twitter.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

    Cooking an Omelette with Chef Cooking an Omelette with Chef Presentation Transcript

    • Cooking an Omelette with Chef Case Taintor Wednesday, October 9, 13
    • Survey • Who has been manually configuring their machines? • Who has been using a tool like Chef or Puppet? • Who is an expert in Chef? Wednesday, October 9, 13
    • Purpose Wednesday, October 9, 13
    • Wednesday, October 9, 13
    • How did we work? Wednesday, October 9, 13
    • Wednesday, October 9, 13
    • Infrastructure as Code Wednesday, October 9, 13
    • Wednesday, October 9, 13
    • Wednesday, October 9, 13
    • Wednesday, October 9, 13
    • Wednesday, October 9, 13
    • Wednesday, October 9, 13
    • Wednesday, October 9, 13
    • Where do we start? Wednesday, October 9, 13
    • Priorities • Reproducibility • Testability • Traceability • Keep It Simple, Stupid Wednesday, October 9, 13
    • How does Chef work? • Figures out which instructions to run • Runs them in an idempotent way Wednesday, October 9, 13
    • Cookbook Everything to install & configure a component Wednesday, October 9, 13
    • Cookbooks attributes definitions files libraries providers recipes resources templates attributes definitions files libraries providers recipes resources templates metadata.rb $ ls -1 cookbook Wednesday, October 9, 13
    • Cookbooks attributes definitions files libraries providers recipes resources templates metadata.rb $ ls -1 cookbook Wednesday, October 9, 13
    • nginx cookbook attributes definitions files libraries providers recipes resources templates attributes attributes/default.rb attributes/source.rb definitions files recipes recipes/default.rb recipes/source.rb templates metadata.rb $ ls -1 nginx Wednesday, October 9, 13
    • Then What? Wednesday, October 9, 13
    • run_list { ... "run_list": [ "recipe[rvm::system]", "recipe[nginx]", "recipe[user]" ] ... } Wednesday, October 9, 13
    • How do I run Chef? node1 chef-solo all config node2 chef-solo all config chef-solo node1 chef-client config node2 chef-client config chef-server chef-server config Wednesday, October 9, 13
    • Problems Problem Solution Repeatability Reproducibility Idempotence Chef Wednesday, October 9, 13
    • Problems Problem Solution Repeatability Reproducibility Idempotence Chef Versioning Wednesday, October 9, 13
    • default rvm default['rvm']['default_ruby'] = "ruby-1.9.3-p327" default['rvm']['rubies'] = [] default[‘rvm][‘version’] = “head” rvm/attributes/default.rb Wednesday, October 9, 13
    • Berkshelf Wednesday, October 9, 13
    • Problems Problem Solution Repeatability Reproducibility Idempotence Chef Versioning Berkshelf Wednesday, October 9, 13
    • Problems Problem Solution Repeatability Reproducibility Idempotence Chef Versioning Berkshelf Development Wednesday, October 9, 13
    • Wednesday, October 9, 13
    • Problems Problem Solution Repeatability Reproducibility Idempotence Chef Versioning Berkshelf Development Vagrant +VirtualBox Wednesday, October 9, 13
    • Problems Problem Solution Repeatability Reproducibility Idempotence Chef Versioning Berkshelf Development Vagrant +VirtualBox KISS Wednesday, October 9, 13
    • Gusteau Wednesday, October 9, 13
    • Problems Problem Solution Repeatability Reproducibility Idempotence Chef Versioning Berkshelf Development Vagrant +VirtualBox KISS Gusteau Wednesday, October 9, 13
    • omelette-server • rvm • nginx • users Wednesday, October 9, 13
    • Process $ gusteau init omelette-cooker Wednesday, October 9, 13
    • Berksfile site :opscode cookbook 'rvm', :github => 'fnichol/chef-rvm' cookbook 'nginx' cookbook 'user' Wednesday, October 9, 13
    • .gusteau.yml ... environments: development: nodes: web: run_list: - recipe[rvm::system] - recipe[nginx] - recipe[user::data_bag] ... Wednesday, October 9, 13
    • $ vagrant up development-web $ gusteau converge development-web Wednesday, October 9, 13
    • Wednesday, October 9, 13
    • Next Problems Wednesday, October 9, 13
    • Share your stuff • Inside your organization • Outside your organization Wednesday, October 9, 13
    • default rvm default['rvm']['default_ruby'] = "ruby-1.9.3-p327" default['rvm']['rubies'] = [] default[‘rvm][‘version’] = “head” rvm/attributes/default.rb Wednesday, October 9, 13
    • your rvm modifications default['rvm']['default_ruby'] = "ruby-1.9.3-p448" default['rvm']['rubies'] = ["ruby-1.9.3-p448", "ruby-1.9.3-p327"] default[‘rvm][‘version’] = "1.21.4" rvm/attributes/default.rb Wednesday, October 9, 13
    • Wrapper Cookbooks $ knife cookbook create wrapper-rvm -o site-cookbooks normal[:rvm][:default_ruby] = "ruby-1.9.3-p448" normal[:rvm][:rubies] = ["ruby-1.9.3-p448", "ruby-1.9.3-p327"] normal[:rvm][:version] = "1.21.4" include_recipe "rvm::system" site-cookbooks/wrapper-rvm/attributes/default.rb site-cookbooks/wrapper-rvm/recipes/default.rb Wednesday, October 9, 13
    • Wrapper Cookbooks place dependencies in metadata.rb depends ‘rvm’, ‘0.9.1’ site-cookbooks/wrapper-rvm/metadata.rb Wednesday, October 9, 13
    • .gusteau.yml ... environments: development: nodes: web: run_list: - recipe[wrapper-rvm] - recipe[nginx] - recipe[user::data_bag] ... Wednesday, October 9, 13
    • $ vagrant up development-web $ gusteau converge development-web Wednesday, October 9, 13
    • Share Wednesday, October 9, 13
    • Berksfile site :opscode cookbook 'rvm', :github => 'fnichol/chef-rvm' cookbook 'nginx' cookbook 'user' cookbook ‘wrapper-rvm’, :git => ‘...:wrapper- rvm.git, :branch => ‘0.1.0’ Wednesday, October 9, 13
    • Next Steps • Sharing common setups • Cookbook development • Move to Chef Server Wednesday, October 9, 13
    • Wrap Up • Recognize what you want • Use tools • Iterate Wednesday, October 9, 13
    • Questions? More Info: @ctaintor Wednesday, October 9, 13
    • Image References Danley, Brent. "Crowded Beach." Flickr.Yahoo!, n.d.Web. 05 Oct. 2013. <http:// www.flickr.com/photos/brentdanley/1086226020/>. Goehring, David. "Does Not Work." Flickr.Yahoo!, n.d.Web. 04 Oct. 2013. <http://www.flickr.com/photos/carbonnyc/496721450/>. Harber, Chris. "Food I Made 1." Flickr.Yahoo!, n.d.Web. 07 Oct. 2013. <http:// www.flickr.com/photos/britishchris/4437265186/>. Johnson, Darren. "Koh Ngai." Flickr. ShotHotspot.com, n.d.Web. 04 Oct. 2013. <http://www.flickr.com/photos/dazjohnson/7424536244/>. Komulainen,Tommi. "Handlebar Is No More." Flickr.Yahoo!, n.d.Web. 05 Oct. 2013. <http://www.flickr.com/photos/tommikomulainen/137069098/>. Reck, Bob. "My Motorcycle." Flickr.Yahoo!, n.d.Web. 05 Oct. 2013. <http:// www.flickr.com/photos/u2sockmonkey/116641053/>.Used with permission. Wednesday, October 9, 13