A couple of comments
NON_INT did indeed get around the need for a yes/no response. For some reason, however, the installer would simply fail without installing the RPM. Chef creates a strange environment and that may be why. I wound up writing a manual workaround where it grabs the GPG key and the latest atomic-release RPM (hard-coded but they don't change a lot) and that worked. Gonna run with that for now. Here's my script for CentOS5. Hopefully it helps.
Code:
remote_file "#{Chef::Config[:file_cache_path]}/atomic.rpm" do
source "http://www.atomicorp.com/channels/atomic/centos/5/" + node['repos']['arch'] + "/RPMS/atomic-release-1.0-13.el5.art.noarch.rpm"
mode "0644"
not_if "test -f /etc/yum.repos.d/atomic.repo"
end
remote_file "#{Chef::Config[:file_cache_path]}/atomic-gpg.txt" do
source "https://www.atomicorp.com/RPM-GPG-KEY.art.txt"
notifies :run, "execute[install_atomic_key]", :immediately
not_if "test -f /etc/yum.repos.d/atomic.repo"
end
execute "install_atomic_key" do
command "rpm --import #{Chef::Config[:file_cache_path]}/atomic-gpg.txt"
not_if "test -f #{Chef::Config[:file_cache_path]}/atomic-gpg.txt"
end
execute "install_atomic_repo" do
command "rpm -i #{Chef::Config[:file_cache_path]}/atomic.rpm"
not_if "test -f /etc/yum.repos.d/atomic.repo"
action :run
end
and the definition of the arch
Code:
if node[:kernel][:machine] == "x86_64"
default[:repos][:arch] = 'x86_64'
else
default[:repos][:arch] = 'i386'
end
Kudos for obsoleting the php53 libraries in favor of ART.
Quote:
why you settled on Chef over the other options for configuration management?
We looked at both Chef and Puppet. Puppet is more mature and has a lot more "recipes", examples, etc, but also has its own scripting language. Chef is written with a vanilla Ruby engine which means it's a bit easier to go "off the map" and write your own code. I've not heard of cfengine.
Here's a slightly pro-chef article on the subject
http://devopsanywhere.blogspot.com/2011 ... =pulsenewsOne comment that got my attention
Quote:
I don't believe there are many in the Puppet community that have extensively experimented with Chef before choosing Puppet. There are many in the Chef community that have worked previously with Puppet and found that it did not meet their needs.
So far we're actively building and deploying EC2 instances with Chef and it's not bad.