Last active
December 16, 2015 15:39
-
-
Save sax/5457464 to your computer and use it in GitHub Desktop.
SmartOS Chef bootstrap template
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
# Wanelo Universal Bootstrap Script (W.U.B.S.) | |
bash -c ' | |
# Linux Distros: | |
if [ $(uname -s | grep Linux) ]; then | |
true && curl -s -L https://www.opscode.com/chef/install.sh | bash | |
# Illumos Distros: | |
elif [ $(uname -s | grep SunOS) ]; then | |
if [ $(chef-client --version 2>/dev/null | grep -c Chef) -ne "1" ]; then | |
true && curl -s -L https://raw.github.com/bixu/chef-bootstrap/master/install.sh | bash -s | |
fi | |
fi | |
mkdir -p /etc/chef | |
( | |
cat <<'EOP' | |
<%= validation_key %> | |
EOP | |
) > /etc/chef/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 | |
/opt/chef/embedded/bin/gem install --no-ri --no-rdoc ipaddr_extensions | |
<%= start_chef %> | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment