Skip to content

Instantly share code, notes, and snippets.

View bixu's full-sized avatar
🦎

Blake Irvin bixu

🦎
  • Berlin
  • 20:16 (UTC +02:00)
View GitHub Profile
bash "install rvm" do
user "root"
code <<-EOH
su - -c 'bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )' user
EOH
not_if { ::FileTest.exists?("/home/user/.rvm/bin/rvm") }
end
[default] [Tue, 28 Sep 2010 16:17:38 -0400] ERROR: bash[install rvm] (/srv/chef/cache/cookbooks/user/recipes/default.rb:66:in `from_file') had an error:
"bash" "/tmp/chef-script.6762.0" returned 2, expected 0
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/mixin/command.rb:184:in `handle_command_failures'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/mixin/command.rb:131:in `run_command'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/provider/execute.rb:49:in `action_run'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/provider/script.rb:33:in `action_run'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:51:in `send'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:51:in `run_action'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:109:in `converge'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/runner.rb:108:in `each'
[Tue, 12 Oct 2010 19:16:30 -0400] DEBUG: Loading Recipe application::unicorn via include_recipe
[Tue, 12 Oct 2010 19:16:30 -0400] DEBUG: Found recipe unicorn in cookbook application
[Tue, 12 Oct 2010 19:16:30 -0400] DEBUG: Loading Recipe unicorn via include_recipe
[Tue, 12 Oct 2010 19:16:30 -0400] DEBUG: Found recipe default in cookbook unicorn
[Tue, 12 Oct 2010 19:16:30 -0400] DEBUG: Loading Recipe ruby via include_recipe
[Tue, 12 Oct 2010 19:16:30 -0400] DEBUG: Found recipe default in cookbook ruby
[Tue, 12 Oct 2010 19:16:30 -0400] DEBUG: Loading Recipe rubygems via include_recipe
[Tue, 12 Oct 2010 19:16:30 -0400] DEBUG: Found recipe default in cookbook rubygems
[Tue, 12 Oct 2010 19:16:30 -0400] DEBUG: Loading Recipe runit via include_recipe
[Tue, 12 Oct 2010 19:16:30 -0400] DEBUG: Found recipe default in cookbook runit
"ruby": "1.8.6",
"git": "",
"openssl-devel": "",
"libxml2-devel": "",
"memcached": "",
"mysql-devel": "",
"gcc-c++": "",
"ncurses-devel": "",
"httpd-devel": "",
"libpcap-devel": "",
## broken:
bash "enable chef-client service" do
user "root"
code <<-EOH
chkconfig --levels 2345 chef-client on
/etc/init.d/chef-client start
EOH
end
@bixu
bixu / gist:819125
Created February 9, 2011 19:43
redis attributes
default[:redis][:redis_slave] = "#{node[:ipaddress]}"
default[:redis][:redis_master] = "#{search(:node, "*:*") do |matching_node|
matching_node.to_s
end}"
service "ssh" do
supports :enable => true, :restart => true, :disable => true
end
template "/etc/ssh/sshd_config" do
source "sshd_config.erb"
mode "0644"
notifies :restart, "service[ssh]"
end
@bixu
bixu / gist:1001384
Created May 31, 2011 22:08
'joyent' chef recipe
#
# Cookbook Name:: joyent
# Recipe:: default
#
# Copyright 2011, ModCloth, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@bixu
bixu / gist:1001394
Created May 31, 2011 22:14
custom sshd_config for joyent
## Created by Chef. Local changes will be overwritten.
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)sshd_config 1.8 04/05/10 SMI"
#
# Configuration file for sshd(1m)
#
# Protocol versions supported
# Uncomment ONLY ONE of the following Protocol statements.
@bixu
bixu / gist:1001398
Created May 31, 2011 22:17
joyent service method for chef-client
#!/bin/bash
#
# chef-client Startup script for the Chef client
#
# description: Client component of the Chef systems integration framework.
exec="/opt/local/bin/chef-client"
prog="chef-client"
config=${CONFIG-/etc/chef/client.rb}