Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add Ruby Enterprise Edition Ubuntu bootstrap target

  • Loading branch information...
commit db7d482962f7fcee523fb57b4334371c29ce2d5b 1 parent 485ef3c
@mipearson authored
Showing with 37 additions and 0 deletions.
  1. +37 −0 chef/lib/chef/knife/bootstrap/ubuntu10.04-ree.erb
View
37 chef/lib/chef/knife/bootstrap/ubuntu10.04-ree.erb
@@ -0,0 +1,37 @@
+bash -c '
+<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>
+
+if [ ! -f /usr/bin/chef-client ]; then
+ wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise_1.8.7-2011.03_amd64_ubuntu10.04.deb
+ dpkg -i ruby-enterprise_1.8.7-2011.03_amd64_ubuntu10.04.deb
+ gem install rubygems-update -v 1.3.7
+ update_rubygems
+ apt-get install -y build-essential
+ gem install ohai --no-rdoc --no-ri --verbose
+ gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %>
+ ln -sf /usr/local/bin/chef-client /usr/bin/chef-client
+fi
+
+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
+
+<%= start_chef %>'
Please sign in to comment.
Something went wrong with that request. Please try again.