Skip to content

Instantly share code, notes, and snippets.

@fharbe
Created September 17, 2013 12:29
Show Gist options
  • Save fharbe/6593697 to your computer and use it in GitHub Desktop.
Save fharbe/6593697 to your computer and use it in GitHub Desktop.
# bash <(curl -s https://raw.github.com/gist/1454081)
read -p "Install Xcode (from the App store) and gcc for Lion (http://github.com/kennethreitz/osx-gcc-installer) and press enter to continue."
# setup your ssh keys for github
if ! [ -e "$HOME/.ssh/id_rsa.pub" ]
then
echo "Generating ssh key..."
read -p "Please enter the email you want to associate with your ssh key: " email
ssh-keygen -t rsa -C "$email"
fi
cat ~/.ssh/id_rsa.pub
cat ~/.ssh/id_rsa.pub | pbcopy
read -p $'\nYour ssh public key has been printed above and copied to the clipboard for convenience. Add it to your Github account at https://github.com/account/ssh and press enter to continue.'
#install homebrew to get latest git. This way it still works if you did gcc, not just XCode (albeit this is irrelevant if you're installing e.g. Node.js, which requires headers from Xcode)
echo -e "\nRunning Homebrew installer.\n"
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
brew install git
# Chef the machine
git clone git@github.com:brokenladder/chef-ops.git /tmp/bootstrap-chef-ops
rvm rvmrc trust /tmp/bootstrap-chef-ops
cd /tmp/bootstrap-chef-ops
#Your main chef repo should have pivotal_workstation as a submodule, and a valid soloistrc file
git submodule update --init
sudo gem install bundler --no-ri --no-rdoc
bundle
echo -e "\nAbout to run Soloist, which requires root privileges (meaning you may be asked for your password)\n"
bin/soloist
rm -rf /tmp/bootstrap-chef-ops
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment