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
@damm
damm / chef.json
Created December 15, 2009 02:02 — forked from learnist/chef.json
{
"bootstrap": {
"chef": {
"url_type": "http",
"init_style": "init",
"server_fqdn": "ec2-174-129-61-113.compute-1.amazonaws.com",
},
"recipes": "bootstrap::client"
}
}
@damm
damm / config.ru
Created December 1, 2009 18:25 — forked from adamhjk/config.ru
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
[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"
}
<%- @app_servers.each do |app| %>
server <%= app['hostname'] %> <%= app['ipaddress'] %>:80
<%- end %>
@damm
damm / default.rb
Created October 16, 2009 20:15 — forked from adamhjk/default.rb
#
# Cookbook Name:: users
# Recipe:: default
#
# Copyright 2009, Opscode, Inc
package "libshadow-ruby1.8"
group "sysadmin" do
gid 4242
@damm
damm / test.rb
Created September 18, 2009 04:38 — forked from fujin/test.rb
if Gem.const_get "RubyGemsVersion" < "1.3.5"
%w{
rubygems
rubygems-doc
rubygems1.8
rubygems1.9
}.each do |p|
apt_package(p) { action :purge }
end
@damm
damm / gist:186246
Created September 13, 2009 17:16 — forked from anonymous/gist:186245
ruby_block "something" do
block do
require 'expect'
require 'pty'
PTY.spawn( 'dnscache-setup' ) do |read,write,pid|
write.sync = true
$expect_verbose = false
read.expect( '(press enter to begin setup, or press control-C to abort)', 30 ) do |response|
mayo:~ sudo virsh dumpxml chefserver
Connecting to uri: qemu:///system
<domain type='kvm' id='20'>
<name>chefserver</name>
<uuid>e13f3fac-1a96-253c-2e46-4597ce2c9e44</uuid>
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>