Minimal Chef Solo

by dagolden
50 deployments · 12 still active · last rev. 5 years ago

Bootstraps Chef Solo from Opscode repository packages. Other than upgrading packages on first boot, it does no other configuration. (That's what you have Chef for, right?)

This is similar to StackScript 1950 but without RVM and using Opscode packages rather than gem files.

Compatible with: No distros currently supported

# Don't prompt during installs
export DEBIAN_FRONTEND=noninteractive

# Enable Opscode repository
echo "deb `lsb_release -cs`-0.10 main" | tee /etc/apt/sources.list.d/opscode.list

# Upgrade the system
apt-get update
apt-get upgrade -y

# Install Opscode key and update database again
apt-get install --allow-unauthenticated -y opscode-keyring 
apt-get update

# Install chef
apt-get install -y chef

# We don't need Chef Client for Chef Solo, so shut it off
/etc/init.d/chef-client stop
update-rc.d -f chef-client remove