-
-
Save stephenlauck/2999929 to your computer and use it in GitHub Desktop.
joyent-smartos.erb
This file contains hidden or 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
# shove this in ~/.chef/bootstrap/joyent-smartos.erb | |
# run knife bootstrap <hostname> -d joyent-smartos | |
# works with joyent images: | |
# 01b2c898-945f-11e1-a523-af1afbe22822 smartos 1.6.3 smartos smartmachine | |
# f9e4be48-9466-11e1-bc41-9f993f5dff36 smartos64 1.6.3 smartos smartmachine | |
bash -c ' | |
if [ ! -f /opt/local/bin/chef-client ]; then | |
pkgin -f update | |
pkgin -y install gcc-compiler gcc-runtime gcc-tools scmgit-base scmgit-docs gmake ruby193-base ruby193-yajl-ruby | |
gem update --system | |
gem install --no-ri --no-rdoc ohai | |
gem install --no-ri --no-rdoc chef | |
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 %>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment