Created
May 20, 2011 10:49
-
-
Save rubiojr/982711 to your computer and use it in GitHub Desktop.
rhel5 rbel chef bootstrap script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bash -c ' | |
if [ ! -f /usr/bin/chef-client ]; then | |
cd /tmp | |
rpm -Uvh http://rbel.frameos.org/rbel5 | |
yum install -y ruby rubygem-chef | |
fi | |
# install ntp, clock is important | |
yum install ntp | |
mkdir -p /etc/chef | |
( | |
cat <<'EOP' | |
<%= validation_key %> | |
EOP | |
) > /tmp/validation.pem | |
awk NF /tmp/validation.pem > /etc/chef/validation.pem | |
rm /tmp/validation.pem | |
( | |
cat <<'EOP' | |
<%= config_content %> | |
EOP | |
) > /etc/chef/client.rb | |
( | |
cat <<'EOP' | |
<%= { "run_list" => @run_list }.to_json %> | |
EOP | |
) > /etc/chef/first-boot.json | |
ntpdate -s pool.ntp.org | |
chkconfig chef-client on | |
service chef-client start' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment