Skip to content

Instantly share code, notes, and snippets.

@idyll
Created April 11, 2012 13:00
Show Gist options
  • Save idyll/2359166 to your computer and use it in GitHub Desktop.
Save idyll/2359166 to your computer and use it in GitHub Desktop.
Install Chef Solo (w/r 1.9.3p125) for Ubuntu EC2
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential
apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev
cd /tmp
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar xzvf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
gem install chef ruby-shadow --no-ri --no-rdoc
mkdir /var/chef
cd /var/chef
mkdir -p cookbooks/main/recipes
# This is where your main recipe goes...
touch cookbooks/main/recipes/default.rb
# cookbook_path File.expand_path("../cookbooks", __FILE__)
# json_attribs File.expand_path("../node.json", __FILE__)
touch solo.rb
# {
# "user": {
# "name": "deployer",
# "password": "$1$0wLEd9RQ$BHZn7Kyk4oarp4sVBxRt20",
# "ls_color": true
# },
# "run_list": ["recipe[main]"]
# }
touch node.json
chown -R ubuntu:staff /var/chef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment