- The network is reliable.
- Latency is zero.
- Bandwidth is infinite.
- The network is secure.
- Topology doesn't change.
- There is one administrator.
- Transport cost is zero.
- The network is homogeneous.
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
# | |
# Eric Lindvall <[email protected]> | |
# | |
# Update the process name for the process you're running in. | |
# | |
# This will allow top, lsof, and killall to see the process as the | |
# name you specify. | |
# | |
# Just use: | |
# |
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
# | |
# Cookbook Name:: template_checker | |
# Recipe:: default | |
# | |
# Copyright 2011, Opscode, 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 | |
# |
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
# | |
# @author Jonathon byrd | |
# | |
############################################################ | |
# first things first, set your iptables for a web server. If you jack these | |
# up you don't want to have to re-install your os after doing much more. | |
# @see http://www.thegeekstuff.com/2011/06/iptables-rules-examples/ | |
# and | |
# @see https://help.ubuntu.com/community/IptablesHowTo |
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
confd = File.join(File.dirname(__FILE__), "conf.d", "*.rb") | |
clientd = File.join(File.dirname(__FILE__), "client.d", "*.rb") | |
[ Dir.glob(confd), Dir.glob(clientd) ].each do |confs| | |
confs.each {|f| Chef::Config.from_file(f)} | |
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
#!/bin/bash | |
# Ruby's GIL is a liability when actually doing CPU work | |
# on a large SMP machine, doubly so on NUMA. This works around it. | |
# Ruby processes are locked onto a single core + its HT sibling | |
# on intel machines, 2 cores on AMD. Ideally this would lock to | |
# one core on non-HT processors, but all of mine are HT so it WFM. | |
max_cpu=$(cat /proc/cpuinfo |awk -F ': ' '/processor/{print $2}' |tail -n 1) |
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
#!/usr/bin/env python | |
""" Git post-receive hook to publish commit data to an AMQP topic. | |
apt-get install python-git python-amqplib | |
or: | |
easy_install amqplib gitpython | |
""" | |
import os, sys, json | |
from datetime import datetime | |
from git import * |
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
include Chef::Mixin::Command | |
action :create do | |
size = new_resource.size | |
volumes = new_resource.volumes.times.map{|i| (i == 0 ? "/dev/sdf" : "/dev/sdf#{i}") } | |
setra = new_resource.blockdev_setra | |
volume_group = new_resource.volume_group | |
logical_volume = new_resource.name | |
mdadm_device = new_resource.mdadm_device | |
mount_point = new_resource.mount_point |
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
include Opscode::Aws::Ec2 | |
#Auto locates and attached ebs devices based on the data bag they reside in. The following test cases need to be performed | |
# Create multiple resources with new node: PASS | |
# | |
# Re-attach multiple resources after a reboot: PASS | |
# | |
# Create resources across 2 runs. First run creates first raid set, second run re-attaches then creates: PASS | |
# |
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/sh | |
diff -x .gitignore -x .DS_Store -x metadata.json -x "README" -qr cookbooks/ /srv/chef/cookbooks/ | grep -v "Only in | |
/srv/chef/cookbooks/" | sed -e "s/.*cookbooks\/[ :]*//;s/\/.*//;s/:.*//" | sort | uniq | xargs knife cookbook upload | |
for a in `diff -x .gitignore -x metadata.json -x "README" -qr cookbooks/ /srv/chef/cookbooks/ | grep "Only in /srv/ | |
chef/cookbooks/" | sed -e "s/.*cookbooks\/[ :]*//;s/\/.*//;s/:.*//" | sort | uniq`; do | |
echo "y" | knife cookbook delete $a | |
done |