Skip to content

Instantly share code, notes, and snippets.

@CodingFu
Last active August 29, 2015 14:07
Show Gist options
  • Save CodingFu/09d958d912102e363ed7 to your computer and use it in GitHub Desktop.
Save CodingFu/09d958d912102e363ed7 to your computer and use it in GitHub Desktop.
Install chef development kit
#!/usr/bin/env sh
set -e
if [ -d /opt/chefdk ]; then
echo "ChefDK installed in /opt/chefdk, quitting" >&2
exit 0
fi
url="https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.2.2-1_amd64.deb"
pkg="/tmp/`basename \`echo $url\``"
echo "--> Downloading ChefDK package from $url"
curl -L "$url" > "$pkg"
echo "--> Installing $pkg"
dpkg -i "$pkg"
rm -f "$pkg"
echo "--> ChefDK installed into /opt/chefdk"
/opt/chefdk/bin/chef --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment