Skip to content

Instantly share code, notes, and snippets.

View intjonathan's full-sized avatar

Jonathan Owens intjonathan

View GitHub Profile
@intjonathan
intjonathan / gist:7254263
Last active December 27, 2015 02:39
puppetdb with newer postgres
class { "postgresql::globals":
version => '9.3',
manage_package_repo => true,
}
# This installs postgres for you
class { '::puppetdb':
database_password => hiera('profile::puppetdb::pg_puppetdb_password'),
java_args => {'-Xmx' => '2g', '-Xms' => '2g'},
}
@intjonathan
intjonathan / upgrade-nodes-pe3.sh
Created December 3, 2013 21:58
Pass a list of FQDNs and it'll nuke PE2 and install PE3.1
#!/bin/bash
for host in "$@"; do
echo "Doing $host"
ssh -tt "${host}" 'curl https://gist.github.com/intjonathan/7663914/raw/17e2638f5db32db2c2d8d7dea80c4c1f8ac09847/pe-3-agent-upgrade.sh | bash'
ssh -tt chi-ops-provision-1 "sudo puppet node deactivate ${host}; sudo puppet cert clean ${host}"
done
@intjonathan
intjonathan / FutureStack 2016 Links.md
Created November 13, 2016 22:06
Monolith Destruction Kit
@intjonathan
intjonathan / pre-commit.sh
Created September 7, 2012 16:29
pre-commit hook (add to .git/hooks/pre-commit) to refuse to commit debugger strings
#!/bin/sh
# Refuse to commit files with the string NOCOMMIT, debugger, or merge markers present.
#
files=$(git diff-index --name-status --cached HEAD | grep -v ^D | cut -c3-)
if [ "$files" != "" ]
then
for f in $files
do
#!/bin/bash
pushd .
cd /tmp/
# Remove PE 2.6.1
curl -o /tmp/pe26.tar.gz "http://chi-boss.newrelic.com/pe-installer/puppet-enterprise-2.6.1-el-6-x86_64.tar.gz"
tar xzf /tmp/pe26.tar.gz
sudo /tmp/puppet-enterprise-2.6.1-el-6-x86_64/puppet-enterprise-uninstaller -p -y