Skip to content

Instantly share code, notes, and snippets.

View damm's full-sized avatar

Scott M. Likens damm

  • Seattle, Washington USA
View GitHub Profile
15:28 <Damm> sigmonsays, http://seattlerb.rubyforge.org/SyslogLogger/
15:28 <holoway> sigmonsays: in theory, you can drop in that SyslogLogger for Chef::Log.logger
15:29 <holoway> sigmonsays: something like Chef::Log.logger = SyslogLogger.new("chef")
15:31 >>> bleything <3 SyslogLogger
<%- @app_servers.each do |app| %>
server <%= app['hostname'] %> <%= app['ipaddress'] %>:80
<%- end %>
apt-get install build-essential
cd /usr/src;wget "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p368.tar.bz2" && tar jxfv ruby-1.8.6-p368.tar.bz2
cd ruby-1.8.6-p368
./configure --prefix=/usr --enable-shared --enable-pthread
make
make install
identity : nanite-54af7fd8-fae1-4dd4-b7bc-2c5ca3696541
load : 0.343333333333333
services : ["/index/add", "/index/delete", "/index/commit", "/index/optimize"]
tags: [nil]
require 'rubygems'
require 'merb-core'
require 'chef'
Chef::Config.from_file(File.join("/etc", "chef", "server.rb"))
Merb::Config.setup(:merb_root => File.expand_path(File.dirname(__FILE__)),
:environment => ENV['RACK_ENV'],
:fork_for_class_load => false,
:init_file => File.dirname(__FILE__) / "config/init.rb")
lethe:~ % knife search -i=node -q=*:* --attribute=fqdn
{
"start": 0,
"total": 0,
"rows": [
{
"fqdn": "chef.likens.us",
"id": "chef.likens.us"
},
{
root@ip-10-212-178-191:~/chef/chef# chef-client
[Wed, 25 Nov 2009 01:54:49 +0000] INFO: Starting Chef Run
/usr/lib/ruby/gems/1.8/gems/chef-0.8.0/bin/../lib/chef/resource_collection.rb:115:in `lookup': Cannot find a resource matching service[apache2] (did you define it first?) (ArgumentError)
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.0/bin/../lib/chef/resource_collection.rb:177:in `find_resource_by_hash'
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.0/bin/../lib/chef/resource_collection.rb:175:in `each'
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.0/bin/../lib/chef/resource_collection.rb:175:in `find_resource_by_hash'
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.0/bin/../lib/chef/resource_collection.rb:173:in `each'
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.0/bin/../lib/chef/resource_collection.rb:173:in `find_resource_by_hash'
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.0/bin/../lib/chef/resource_collection.rb:137:in `resources'
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.0/bin/../lib/chef/resource_collection.rb:13
require 'merb-core'
require 'chef'
Chef::Config.from_file('/etc/chef/server.rb')
require 'chef/nanite'
require 'uuidtools'
Chef::Config[:nanite_identity] = "chef-#{UUIDTools::UUID.random_create.to_s}"
Chef::Nanite.in_event { Chef::Log.info "Nanite Booting..." }
time = 17
----------------- Register state dump ----------------------
rax = 0x0000000000000000 rbx = 0x00000000838aa320 rcx = 0x000000000007b7f0 rdx = 0x00000000000018b1
rdi = 0x00000000834691f4 rsi = 0x0000000000000000 rbp = 0x00000000023d0f40 rsp = 0x0000000050d00d60
r8 = 0x0000000000000001 r9 = 0x0000000000000003 r10 = 0x0000000000000050 r11 = 0x0000000000000000
r12 = 0x0000000000000000 r13 = 0x000000008345c040 r14 = 0x0000000000000000 r15 = 0x0000000000000006
rip = 0x0000000083408447 rflags = 0x0000000000010246 cs = 0x0000000000000033 fs = 0x00000000838aa320
gs = 0x00000000023d0f40
-e:1: [BUG] Segmentation fault
ruby 1.8.7 (2009-04-02 patchlevel 159) [x86_64-linux]
[root@zserver chef]# cat chef.json
{
"bootstrap": {
"chef": {
"url_type": "http",
"init_style": "init",
"path": "/opt/chef",
"serve_path": "/opt/chef",
"server_fqdn": "zserver.stompy.lan"
}