This file contains hidden or 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
#!/bin/bash | |
echo 'deb http://apt.opscode.com/ lucid main' | tee /etc/apt/sources.list.d/opscode.list | |
wget -qO - http://apt.opscode.com/[email protected] | apt-key add - | |
apt-get update | |
apt-get install chef -y | |
echo -e "chef\tchef/chef_server_url\tselect" > /tmp/chef.preseed | |
debconf-set-selections /tmp/chef.preseed | |
update-rc.d chef-client disable |
This file contains hidden or 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
#get the war files from the git repo | |
branch = "release-12" | |
bash "name_git_repo" do | |
user "username" | |
cwd "path/to/repo" | |
code "git checkout -b #{branch}-#{DateTime.now} origin/#{branch}" | |
action :nothing | |
end |
This file contains hidden or 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
puts spec.to_s.inspect | |
# => "development" | |
puts configurations.keys.inspect | |
# => [ "development", "test", "cucumber", "production" ] | |
puts configurations.keys.include?(spec.to_s) | |
# => false |
This file contains hidden or 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 'rubygems' | |
require 'gelf' | |
class GELFHandler < Chef::Handler | |
attr_reader :notifier | |
def initialize(server, port, facility) | |
@notifier = GELF::Notifier.new(server, port, 'WAN', :facility => facility) | |
end |
This file contains hidden or 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 'rubygems' | |
require 'gelf' | |
class GELFHandler < Chef::Handler | |
attr_reader :notifier | |
def initialize(server, port, facility) | |
@notifier = GELF::Notifier.new(server, port, 'WAN', :facility => facility) | |
end |
This file contains hidden or 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
sh -c ' | |
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%> | |
if [ ! -f /usr/bin/chef-client ]; then | |
apt-get update | |
apt-get install -y ruby ruby1.8-dev build-essential wget libruby-extras libruby1.8-extras | |
fi | |
# Install a sane version of gems | |
cd /tmp |
This file contains hidden or 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
host "chef.example.org" do | |
ip "192.168.10.1" | |
aliases [ "chef", "kitchen" ] | |
comment "The chef server" | |
end |
This file contains hidden or 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 'capybara' | |
require 'capybara/dsl' | |
require 'capybara/webkit' | |
include Capybara::DSL | |
account = ARGV[0] | |
count = ARGV[1] | |
Capybara.current_driver = :webkit | |
Capybara.app_host = 'http://mobile.twitter.com' |
This file contains hidden or 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
traceroute to 193.219.108.20 (193.219.108.20), 64 hops max, 52 byte packets | |
1 router (192.168.1.1) 1.018 ms 0.612 ms 0.725 ms | |
2 * * * | |
3 * 10.1.3.178 (10.1.3.178) 8.365 ms 8.364 ms | |
4 20ge.bb2.lon1.uk.gbxs.net (195.66.224.231) 7.883 ms 7.640 ms 7.622 ms | |
5 ohtelecom.vlan899.bb2.lon1.uk.gbxs.net (77.243.178.6) 8.212 ms 7.495 ms 8.612 ms | |
6 * * * | |
7 * * * | |
8 * * * | |
# ad infinatum |