Skip to content

Instantly share code, notes, and snippets.

@lordgnu
Forked from tinderfields/gist:2863348
Last active December 19, 2015 03:48
Show Gist options
  • Save lordgnu/5892686 to your computer and use it in GitHub Desktop.
Save lordgnu/5892686 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Update APT
apt-get -y update
# Install Prequisites
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev
# Change to Temp
cd /tmp
# Get Ruby Source Package
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
###
# Needs Further Inspection Past Here
###
gem install chef ruby-shadow mysql --no-ri --no-rdoc
# Add entry to .ssh/config
brew install ssh-copy-id
ssh-copy-id -i ~/.ssh/id_rsa.pub hetzner
# See
http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/
# CD to chef dir and
rsync -r . hetzner:/etc/chef
ssh hetzner "chef-solo"
# Once setup with librarian use
librarian-chef install && rsync -r . hetzner:/etc/chef && ssh hetzner "chef-solo"
# Ideally we could set this up with scripts as per http://www.opinionatedprogrammer.com/2011/06/chef-solo-tutorial-managing-a-single-server-with-chef/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment