bring the benefits of configuration management to your entire infrastructure." "You write source code to describe how you want each part of your infrastructure to be built, then apply those descriptions to your servers." "The result is a fully automated infrastructure: when a new server comes on line, the only thing you have to do is tell Chef what role it should play in your architecture."
Fedora Linux detected. >> Checking for RVM... >> Fetching latest version of Lunar Station cookbooks... >> Starting chef-solo run... [Mon, 07 Nov 2011 22:19:54 +0100] INFO: *** Chef 0.10.4 *** [Mon, 07 Nov 2011 22:19:54 +0100] INFO: Setting the run_list to ...
"download rpmfusion free package" do code "wget http://download1.rpmfusion.org/.../" + "rpmfusion-free-release-stable.noarch.rpm -O #{path}" not_if { File.exist?(path) } end package "rpmfusion-free-release-stable" do source path options "--nogpgcheck" end when 'ubuntu' ... end
partner repo package 'skype' when 'mac_os_x' dmg_package "Skype" do source "http://www.skype.com/go/getskype-macosx.dmg" action :install end when 'fedora' ... end
end NODE_LIST.each do |node| role node.to_sym, node end NODE_CONFIG = <<-EOS file_cache_path '/tmp/chef-solo' cookbook_path '/tmp/chef-solo/cookbooks' role_path '/tmp/chef-solo/roles' EOS ...
File.read("/tmp/chef-solo/ssh_keys/#{f}") end template "/home/#{username}/.ssh/authorized_keys" do source "authorized_keys.erb" owner username group 'users' mode "0600" variables :ssh_keys => ssh_keys end