Skip to content

Instantly share code, notes, and snippets.

@pesblog
Last active December 21, 2015 19:08
Show Gist options
  • Save pesblog/6351740 to your computer and use it in GitHub Desktop.
Save pesblog/6351740 to your computer and use it in GitHub Desktop.
#!/bin/sh
# usage:
# $ curl -O https://gist.github.com/pesblog/6351740/raw/chef-setup.sh
# $ chmod 755 chef-setup.sh
# $ ./chef-setup.sh
if [[ -d '/opt/chef' ]]; then
echo "chef exists, already installed. finish"
exit 0
fi
sudo echo "=====" # first time sudo
echo "Installing chef start"
curl -Ls http://www.opscode.com/chef/install.sh | sudo bash
echo "Installing chef Done!"
echo "====="
echo "====="
echo "Installing knife-solo start"
sudo /opt/chef/embedded/bin/gem install knife-solo
echo <<EOF
# Installing knife-solo Done!
#
# please add "/opt/chef/bin" to \$PATH
#
EOF
echo "====="
echo "====="
echo "Settings knife configure start"
echo "Please all default( Enter Only )"
knife configure -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment