Skip to content

Instantly share code, notes, and snippets.

@cookbooks
cookbooks / gist:950247
Created May 1, 2011 04:26
Zenoss Chef recipe error
[monitor] [Sat, 30 Apr 2011 21:23:38 -0700] INFO: execute[zendmd] sh(/usr/local/zenoss/zenoss/bin/zendmd --commit --script=540975.dmd)
: stdout
[monitor] [Sat, 30 Apr 2011 21:23:45 -0700] ERROR: execute[zendmd] (/srv/chef/file_store/cookbooks/zenoss/providers/zendmd.rb line 15) has had an error
: stdout
[monitor] [Sat, 30 Apr 2011 21:23:45 -0700] ERROR: Running exception handlers
: stdout
[monitor] [Sat, 30 Apr 2011 21:23:45 -0700] FATAL: Saving node information to /srv/chef/file_store/failed-run-data.json
: stdout
[monitor] [Sat, 30 Apr 2011 21:23:45 -0700] ERROR: Exception handlers complete
: stdout
@cookbooks
cookbooks / gist:740071
Created December 14, 2010 06:18
Bundler install rails-quick-start example syntax
$ bundle install --gemfile /path/to/chef-repo/rails-quick-start.gemfile \
--install-path /path/to/chef-repo/rails-quick-start/cookbooks
$ ls /path/to/chef-repo/rails-quick-start/cookbooks
apache2 database passenger_apache2 runit
apache2-0173e252e689 git passenger_enterprise sqlite
application haproxy radiant unicorn
apt mysql rails xfs
aws nginx ruby
build-essential openssl ruby_enterprise
@cookbooks
cookbooks / gist:740068
Created December 14, 2010 06:17
Bundler install log
$ bundle install --gemfile /tmp/rails-quick-start.gemfile \
--install-path /tmp/rails-quick-start
Updating git://github.com/cookbooks/application.git
Updating git://github.com/cookbooks/unicorn.git
Updating git://github.com/cookbooks/passenger_enterprise.git
Updating git://github.com/cookbooks/passenger_apache2.git
Updating git://github.com/cookbooks/rails.git
Updating git://github.com/cookbooks/packages.git
Updating git://github.com/cookbooks/ruby.git
Updating git://github.com/cookbooks/ruby_enterprise.git
@cookbooks
cookbooks / gist:740067
Created December 14, 2010 06:15
rails-quick-start Gemfile (Alpha 2)
# Useage:
# bundle install --gemfile /your/stack/library/rails-quick-start.gemfile \
# --install-path /your/chef-repo/cookbooks
#
gem "apache2",
:git => "git://github.com/cookbooks/apache2.git",
:tag => '0.12.3', :git_decorate => false
gem "application",
:git => "git://github.com/cookbooks/application.git",
@cookbooks
cookbooks / gist:740065
Created December 14, 2010 06:13
Getting setup to bundle Chef cookbooks (Alpha 2)
$ rvm gemset create test-bundler-chef
'test-bundler-chef' gemset created (/home/hedge/.rvm/gems/ruby-1.9.2-p0@test-bundler-chef).
$ gem list
*** LOCAL GEMS ***
rake (0.8.7)
$ git clone git://github.com/hedgehog/bundler.git
<snip>
$ pushd bundler
@cookbooks
cookbooks / gist:733036
Created December 8, 2010 08:33
Bundler Gemfile for Chef's Rails quick start example
# Useage:
# bundle install --gemfile /your/stack/library/rails-quick-start.gemfile \
# --install-path /your/chef-repo/cookbooks
#
gem "cc-apache2",
:git => "git://github.com/cookbooks/cc-apache2.git",
:branch => 'live'
gem "cc-application",
:git => "git://github.com/cookbooks/cc-application.git",
@cookbooks
cookbooks / gist:731502
Created December 7, 2010 05:24
Grit clone example
# Since Git is well structured, Grit uses a method missing (Grit::Git#method_missing) to 'systematically' execute Git commands:
require 'grit'
include Grit
gritty = Grit::Git.new('/tmp/filling-in')
gritty.clone({:quiet => false, :verbose => true, :progress => true, :branch => '37s'}, "git://github.com/cookbooks/cc-aws.git", "/tmp/cc-aws2")
# => "Initialized empty Git repository in /tmp/cc-aws2/.git/\n"
Dir.entries('/tmp/cc-aws2').size
# => 10