automation. • Helping hundreds of companies develop fully automated infrastructure behind the firewall and in the cloud. • Supported by a community of thousands of users. • A member of the DevOps movement. • Committed to driving next-generation infrastructure development.
Code. Chef enables people to easily build & manage complex & dynamic applications at massive scale • New model for describing infrastructure that promotes reuse • Programmatically provision and configure • Reconstruct business from code repository, data backup, and bare metal resources Chef is an automation platform for developers & systems engineers to continuously define, build, and manage infrastructure. CHEF USES: “ ”
• Have parameters. • Take action to put the resource in the declared state. • Can send notifications to other resources. package "haproxy" do action :install end template "/etc/haproxy/haproxy.cfg" do source "haproxy.cfg.erb" owner "root" group "root" mode 0644 notifies :restart, "service[haproxy]" end service "haproxy" do supports :restart => true action [:enable, :start] end
Provides a Model for Reuse That Works 11 700+ Cookbooks “Yesterday we started open sourcing some of our Opscode Chef work created at bestbuy.com; bit.ly/ yDV9Hl #Splunk #opschef #expectmor”
require "rubygems" require "mongo" if node['mongodb']['replicaset'].nil? Chef::Log.warn("recipe[mongodb::replset] applied to node without mongodb.replicaset attribute, skipping") next end # Retry 5 times, as we believe that there should # be a mongod accepting connections on localhost conn = nil 10.times do |try| begin conn = Mongo::Connection.new( "localhost", node['mongodb']['port'], :slave_ok => true, :connect_timeout => 5) rescue delay = 2 ** (try + 1) Chef::Log.info("Failed to connect to mongodb, sleeping #{delay}, try #{try}/10") sleep(delay) end end end