Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 39 lines (32 sloc) 1.28 KB
# Chef Solo Bootstrap for SmartOS GZ
# See:
# EXAMPLE USE: curl -s | bash
if [[ -f /opt/custom/smf/chef-solo.xml && -f /var/chef/solo.rb ]]; then
echo "WARNING: Chef Solo already installed and configured. Sleeping for 30s. Ctl-C to abort."
sleep 30
# Download and install Chef Fat Client
cd /tmp && /usr/bin/curl -Os
cd / && gtar xfj /tmp/Chef-fatclient-SmartOS-10.14.2.tar.bz2
cp /usr/bin/gtar /opt/chef/bin/tar
mkdir -p /opt/custom/smf /var/chef
# Create Chef Solo Configuration
cat >/var/chef/solo.rb <<END
## Joyent Chef Solo Configuration
file_cache_path "/var/chef"
cookbook_path "/var/chef/cookbooks"
json_attribs ""
recipe_url ""
if [[ $NODENAME ]]; then
echo "node_name \"${NODENAME}\"" >>/var/chef/solo.rb
# Install and Import SMF Service for Chef Solo
cd /opt/custom/smf && /usr/bin/curl -Os
svccfg import /opt/custom/smf/chef-solo.xml
if svcs chef-solo >/dev/null; then
echo "Installation complete. Chef Solo SMF Service State: `/usr/bin/svcs -Ho state chef-solo`"