Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Chef Introduction

Chef Introduction

Part of an internal presentation I gave at Pixable.

Avatar for Sergio Rodriguez

Sergio Rodriguez

September 02, 2014

Other Decks in Technology

Transcript

  1. Why Chef? • Ruby • Auditing • Configure once, replicate

    N times • Abstracts away intricacies ◦ package “nginx” ▪ apt-get install nginx ▪ yum install nginx • So you don’t configure graphite from scratch...
  2. Chef Solo • Local Access To: ◦ Cookbooks, roles, etc

    • Lacks: ◦ Environment Support ◦ Search • Good For: ◦ Testing locally ◦ Use with Vagrant
  3. Example Setup: • A web server running Nginx on port

    80 which reverse proxies requests to Node.js, on port 3000 • A database server which runs MongoDB and Redis http://red-badger. com/blog/2013/02/21/automating-your- infrastructure-with-vagrant-chef-from- development-to-the-cloud/
  4. Chef Server • Upside over Chef Solo: ◦ Environment Support

    ◦ Search ▪ Node Attributes • ohai • cookbook, role, env attributes ▪ Knife SSH ▪ Data Bags ◦ Store cookbooks, roles, etc away from your local
  5. Infrastructure As Code • Actions: abstracted ◦ Definitions, Libraries, LWRPs

    • Cookbooks: versioned ◦ metadata.rb • Dependencies: noted ◦ metadata.rb • Environments: cookbook + attribute silos
  6. Want to learn more? • https://github.com/opscode • http://docs.opscode.com/ • http://learn.getchef.com/

    • #chef on irc.freenode.net • https://github.com/mitchellh/vagrant • http://docs.vagrantup.com/v2/