This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bootstrap": { | |
"chef": { | |
"url_type": "http", | |
"init_style": "init", | |
"server_fqdn": "ec2-174-129-61-113.compute-1.amazonaws.com", | |
}, | |
"recipes": "bootstrap::client" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%- @app_servers.each do |app| %> | |
server <%= app['hostname'] %> <%= app['ipaddress'] %>:80 | |
<%- end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: users | |
# Recipe:: default | |
# | |
# Copyright 2009, Opscode, Inc | |
package "libshadow-ruby1.8" | |
group "sysadmin" do | |
gid 4242 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |