An example bash bootstrap to get workstation set-up with chef - update YOUR_ORG below

  • Download Gist
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
#!/usr/bin/env sh
#After forking and editing YOUR_ORG to point at the right repo can be run via:
#bash <(curl -s
#if you use `curl xxx | sh` input will be messed up and there will be no pauses
#I keep XCode and gcc on a thumbdrive along with java, for speeding things up
read -p "Install XCode or gcc ("
#setup your ssh keys for github
echo "Please enter your email: "
read email
ssh-keygen -t rsa -C "$email"
cat ~/.ssh/
cat ~/.ssh/ | pbcopy
read -p "\n\nYour ssh public key has been copied to your clipboard. Add it to github and press any key to continue"
#install homebrew to get latest git. This way it still works if you did gcc, not just XCode
/usr/bin/ruby -e "$(curl -fsSL"
brew install git
#Do a tmp version of your chef recipes. If you you pivotal_workstation:git_projects, you'll end up with the final version in ~/workspace/chef-opts, if you add it to the list
#obviously edit the git path to be your workstation chef cookbook repo
#see for some example recipes setup.
cd /tmp
git clone
cd chef-ops
#Your main chef repo should have pivotal and cdd_workstation as submodules and a valid soloistrc file
git submodule update --init
sudo gem install bundler
bundle install --binstubs
# is a thin wrapper for chef-solo that makes it easy to run and specify a list of recipes/
#Good for workstation usage
#Make sure that bundler and the required gems are installed. May still need a bundle on next use from ~/workstation/chef-opts
bash .rvmrc
gem install bundler

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.