Skip to content

Instantly share code, notes, and snippets.

View cwebberOps's full-sized avatar

Christopher Webber cwebberOps

View GitHub Profile
@cwebberOps
cwebberOps / gist:2946890
Created June 18, 2012 04:50
postgresql fail
[default] Running provisioner: Vagrant::Provisioners::ChefSolo...
[default] Generating chef JSON and uploading...
[default] Running chef-solo...
[default] stdin: is not a tty
: stderr
[default] [Mon, 18 Jun 2012 04:47:14 +0000] INFO: *** Chef 0.10.4 ***
: stdout
[default] [Mon, 18 Jun 2012 04:47:15 +0000] INFO: Setting the run_list to ["recipe[build-essential]", "recipe[postgresql::server]"] from JSON
: stdout
[default] [Mon, 18 Jun 2012 04:47:15 +0000] INFO: Run List is [recipe[build-essential], recipe[postgresql::server]]
@cwebberOps
cwebberOps / ideal ops.md
Created May 29, 2012 15:48 — forked from bhenerey/ideal ops.md
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@cwebberOps
cwebberOps / hack.sh
Created March 31, 2012 14:21 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@cwebberOps
cwebberOps / n07
Created March 26, 2012 15:26
Puppet Hangs
(08:17:28) cwebber@n07 [~] sudo -i
root@n07:~# ps -ef | grep puppet
root 655 1 0 Mar25 ? 00:02:19 /usr/bin/ruby1.8 /usr/bin/puppet agent
root 5956 5937 0 08:17 pts/0 00:00:00 grep puppet
root@n07:~# strace -p 655
Process 655 attached - interrupt to quit
select(8, [7], NULL, NULL, {0, 957204}) = 0 (Timeout)
select(8, [7], NULL, NULL, {2, 0}) = 0 (Timeout)
select(8, [7], NULL, NULL, {2, 0}) = 0 (Timeout)
select(8, [7], NULL, NULL, {2, 0}) = 0 (Timeout)
@cwebberOps
cwebberOps / gist:1857244
Created February 18, 2012 03:40
iptables
root@dashboard:/usr/share/puppet-dashboard# /sbin/iptables -I INPUT 1 -t filter -p all -m comment --comment 000 INPUT allow related and established -m state --state ESTABLISHED,RELATED -j ACCEPT
Bad argument `INPUT'
Try `iptables -h' or 'iptables --help' for more information.
root@dashboard:/usr/share/puppet-dashboard# iptables -t filter -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
@cwebberOps
cwebberOps / container
Created February 13, 2012 16:52
openvz fun
container {"puppet":
state => "running",
id => 201,
interfaces => ['web0,00:0C:29:1E:3C:25,puppet_web0,00:0C:29:E3:AF:E1,br_web', 'pb0,00:0C:29:56:B0:F5,puppet_pb0,00:0C:29:DD:42:BC,br_public', 'infra0,00:0C:29:03:E9:C1,puppet_infra0,00:0C:29:C7:D0:5A,br_infra', 'clust0,00:0C:29:B3:B5:60,puppet_clust0,00:0C:29:5E:93:B1,br_clust'],
network => {
"pb0" => {
"address" => "138.23.xx.xx",
"netmask" => "255.255.255.128",
"gateway" => "138.23.51.1"
},
@cwebberOps
cwebberOps / init.pp
Created January 25, 2012 19:13
vcsrepo
class webapp {
vcsrepo { "/var/www/webapp":
ensure => latest,
provider => git,
source => "git://github.com/cwebberOps/infracode-webstuffs.git",
require => [
Package['git'],
Package['apache2']
]
@cwebberOps
cwebberOps / basic_info
Created January 24, 2012 23:12
rspec-puppet... Doing it wrong
pwd: /Users/cwebber/projects/puppetmaster/puppet/modules/puppet
(15:47:56) cwebber@tron [~/projects/puppetmaster/puppet/modules/puppet] rspec
F
Failures:
1) puppet
Failure/Error: it { should contain_package('puppet').with_ensure('installed') }
Puppet::Error:
@cwebberOps
cwebberOps / gist:1402684
Created November 28, 2011 23:58
arc_summary.pl
cwebber@zeus:~$ ./arc_summary.pl
------------------------------------------------------------------------
ZFS Subsystem Report Mon Nov 28 15:57:26 2011
------------------------------------------------------------------------
ZFS Tunable (sysctl):
Page: 7
------------------------------------------------------------------------