Skip to content

Instantly share code, notes, and snippets.

[root@cs couchdb]# tail couch.log
{links,[<0.41.0>,<0.1202.0>]},
{dictionary,[]},
{trap_exit,false},
{status,runnable},
{heap_size,233},
{stack_size,14},
{reductions,46}]}]]}}
[Tue, 16 Jun 2009 09:34:34 GMT] [info] [<0.1198.0>] 127.0.0.1 - - 'GET' /chef/_design/nodes/_view/all_id 500
[Tue, 16 Jun 2009 08:56:29 GMT] [info] [<0.59.0>] 127.0.0.1 - - 'GET' /chef/_design%2Fnodes 500
[Tue, 16 Jun 2009 08:56:29 GMT] [error] [<0.69.0>] {error_report,<0.21.0>,
{<0.69.0>,crash_report,
[[{pid,<0.69.0>},
{registered_name,[]},
{error_info,
{exit,
{bad_return_value,
~ Started request handling: Tue Jun 16 05:41:29 -0700 2009
~ Routed to: {"format"=>nil, "action"=>"show", "id"=>"cct_localdomain", "controller"=>"chef_server_slice/openid_register"}
~ Params: {"format"=>nil, "action"=>"show", "id"=>"cct_localdomain", "controller"=>"chef_server_slice/openid_register"}
~ Sending HTTP Request via GET to /chef/openid_registration_cct_localdomain
~ #<Chef::OpenIDRegistration:0x2aaaac1b7db8 @couchdb_rev="2-1115954838", @name="cct_localdomain", @validated=true, @password="e971878ba07102281210d6ed01405ea90a447b25", @couchdb=#<Chef::CouchDB:0x2aaaac1b7d68 @rest=#<Chef::REST:0x2aaaac1b7d18 @url="http://localhost:5984", @cookies={}>>, @salt="Tue Jun 16 04:09:15 -0700 2009LwlH8WBtwBvZhmtHfp02PihwgRY74d", @admin=false>
~ {:dispatch_time=>0.013226, :before_filters_time=>0.000211, :action_time=>0.010409, :after_filters_time=>2.6e-05}
~
~ Started request handling: Tue Jun 16 05:41:29 -0700 2009
[root@cct ~]# chef-client -j base.json
/usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/cookbook_loader.rb:111:in `[]': Cannot find a cookbook named quick_start; did you forget to add metadata to a cookbook? (http://wiki.opscode.com/display/chef/Metadata) (ArgumentError)
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/compile.rb:121:in `load_recipes'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/compile.rb:112:in `each'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/compile.rb:112:in `load_recipes'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/client.rb:369:in `converge'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/client.rb:81:in `run'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/application/client.rb:164:in `run_application'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/application/client.rb:162:in `loop'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/application/client.rb:162:in `run_applic
@cliffdickerson
cliffdickerson / default.rb
Created July 9, 2009 03:55 — forked from btm/default.rb
cookbook info in a templated file
template "/tmp/foo" do
source "foo.erb"
variables({
:recipe_name => self.recipe_name,
:cookbook_name => self.cookbook_name
})
end
fqdns = Array.new
search(:node) do
with :fqdn, '*opscode.com'
with(:uptime).less_than Time.now
order_by :updtime, :desc
result do |n|
fqdns << n.fqdn
end
end
ips = {}
ips[:internal] = node[:ipaddress]
eth = node[:network][:interfaces][:eth1][:addresses]
eth.each_key do |i|
if eth[i][:family] == "inet"
ips[:external] = i
end
end
# create a partition and file system for mpath14
execute "mkfs-ext3-mpath14p1" do
command "mkfs.ext3 -q /dev/mapper/mpath14p1"
action :nothing
end
execute "parted_mpath14" do
command "parted -s -- /dev/mapper/mpath14 mkpart primary ext3 0 -1"
creates "/dev/mapper/mpath14p1"
action :run
$ bin/shef
Loading Node Data
Ohai2u!
chef > recipe
=> :recipe
chef:recipe > file "/tmp/foo"
=> #<Chef::Resource::File:0x1c3cd2c @provider=nil, @not_if=nil, @params={}, @recipe_name=nil, @action="create", @source_line="/Users/danielsdeleo/ruby/shef/(irb) line 2", @actions={}, @ignore_failure=false, @name="/tmp/foo", @cookbook_name=nil, @enclosing_provider=nil, @resource_name=:file, @before=nil, @supports={}, @backup=5, @allowed_actions=[:nothing, :create, :delete, :touch, :create_if_missing], @path="/tmp/foo", @only_if=nil, @noop=nil, @updated=false, @node=eigenstate.local, @collection=#<Chef::ResourceCollection:0x1c4f328 @insert_after_idx=nil, @resources=[#<Chef::Resource::File:0x1c3cd2c ...>], @resources_by_name={"file[/tmp/foo]"=>0}>>
chef:recipe > run_chef
[Tue, 03 Nov 2009 22:16:27 -0700] DEBUG: Processing file[/tmp/foo]
[Tue, 03 Nov 2009 22:16:27 -0700] DEBUG: file[/tmp/foo] using Chef::Provider::File
@cliffdickerson
cliffdickerson / build_chef_0.8
Created January 20, 2010 02:00 — forked from btm/build_chef_0.8
Chef .8 on ubuntu
# ec2 ami-1515f67c
sudo sed -i 's/universe/multiverse universe/' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert rubygems git-core rake librspec-ruby libxml-ruby thin couchdb zlib1g-dev libxml2-dev
sudo gem sources -a http://gems.opscode.com
sudo gem install cucumber merb-core jeweler uuidtools json libxml-ruby --no-ri --no-rdoc
mkdir ~/src
cd ~/src
git clone git://github.com/opscode/chef.git
git clone git://github.com/opscode/ohai.git