gem install thor
mkdir -p ~/vagrants && cd ~/vagrants
curl -LO https://raw.github.com/gist/1528832/vagrantify
chmod 755 vagrantify
./vagrantify init webserver
# Source accepts the protocol region:// with the host as the bucket | |
# access_key_id and secret_access_key are just that | |
# for the eu-west-1 region: | |
s3_file "/var/bulk/the_file.tar.gz" do | |
source "s3-eu-west-1://your.bucket/the_file.tar.gz" | |
access_key_id your_key | |
secret_access_key your_secret | |
owner "root" | |
group "root" |
bash -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 | |
cd /tmp | |
wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz | |
tar zxf rubygems-1.3.7.tgz | |
cd rubygems-1.3.7 |
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v1.4.11 (GNU/Linux) | |
mQMuBE6groMRCADgZsZHKVwPzl4JRhWYLbukOPS65Xn+BiMCSt0b4faFy1ieBICG | |
T+87F+wH0pQ69Gkq6XhO41u69uu3uHry9DSDNgkkDU9mIJtDjFgYD2rnWch5iSQo | |
p8/9the41uTVxKUBes9yMXa84EYrrPkn3i7bKQggJo99wA2M2sl7Ya4LtQvU5vLv | |
yQPsrkhpxqGu82DpyuxnJDW9aZzkoxhXhDTNIZPskNKMd1jbbBCgt/a4fIWXKQum | |
PRRPOzqM5nLsixR5Dx8a35cLze8o0myQdPK8iKszhLe5CTga7m47NjG91qd5XO+R | |
o03C64tjRIj+fS5X/LPUgRwDpqVQukWC2Qi3AQDC0gQCq251YU7s7e2Xsnv/KF2c | |
nPvOdHFRAzD1Vh/fuQf/XuyIe/l4ivWH9FYz/AUFZDiRUOs+GRSKKlYCusiLwqWw |
#!/usr/bin/env ruby | |
# A lil' snip to submodule cookbooks in bulk. | |
require 'rubygems' | |
require 'octokit' | |
github_org = 'guidance-cookbooks' | |
Octokit.repositories(github_org).each do |repo| | |
unless File.exists?(File.join(File.dirname(__FILE__), "cookbooks", repo.name)) |
bash <<'EOF' || echo "Chef bootstrap failed!" | |
# This is a mixture of the Ironfan and @fnichol bootstraps. | |
# It keeps the chef ruby away from our other rubies. | |
# | |
# * installs a chef ruby using ruby_build. | |
# * upgrades rubygems rather than installing from source | |
# * pushes the node identity into the first-boot.json | |
# * installs the chef-client service and kicks off the first run of chef |
# A limited way to interact with the Heroku API. | |
# | |
# INSTALLATION: | |
# 1. Create file in scripts folder in hubot folder | |
# 2. Update package.json for hubot and add dependency on "sprintf": "0.1.1" | |
# 3. Set heroku config variable HEROKU_USER to heroku user account to use | |
# 4. Set heroku config variable HEROKU_APIKEY to heroku user account apikey (from My Account page) | |
# | |
# heroku status - Retrieve the most recent tweet from the @herokustatus account | |
# heroku ps --app <appname> - Get process information for application |
input { | |
exec { | |
type => "dstat" | |
command => "dstat -cdngypms --nocolor 1 0" | |
interval => 13 | |
} | |
exec { | |
type => "apache-benchmark" |