Skip to content

Instantly share code, notes, and snippets.

View chriseckhardt's full-sized avatar

Christopher Eckhardt chriseckhardt

View GitHub Profile
Renew Puppet CA cert.
Not the perfect idea, but should alleviate the need to resign every cert.
What you need from existing puppet ssl directory:
ca/ca_crt.pem
ca/ca_key.pem
Create an openssl.cnf:
[ca]
# Description:
# spit out random meme images
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
@chriseckhardt
chriseckhardt / gist:7736693
Created December 1, 2013 16:55
clojurescript failed to build on 10.9
# First encountered using 1.7 JDK from Oracle, then continued
# after downgrading to Apple's latest 1.6 + rebooting
# (http://support.apple.com/kb/dl1572)
$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
$ brew update
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
@chriseckhardt
chriseckhardt / gist:8100057
Last active January 1, 2016 05:39
logstashy stuff
# sender:/etc/logstash/shipper.conf
input {
stdin {
debug => true
type => "host-agent-input"
}
}
output {
rabbitmq {
@chriseckhardt
chriseckhardt / gist:8365058
Last active January 2, 2016 21:39
PUPPET Y U NO OVERRIDE?!
class profile::sensu::client {
class {'sensu':
use_embedded_ruby => true,
safe_mode => false,
client => true,
server => false,
api => false,
dashboard => false,
log_level => hiera('sensu::client::log_level', 'info'),
@chriseckhardt
chriseckhardt / statsd_init_spec.rb
Last active January 4, 2016 07:39
This seems to bomb out with "Failure/Error: @content = catalogue.resource('file', '/etc/statsd/config.js').send(:parameters)[:content] ArgumentError: wrong number of arguments (0 for 1)"
# ...
it { should contain_file('/etc/statsd/config.js')
.with(
:ensure => 'file',
:require => 'Package[nodejs-statsd]',
)
}
describe '/etc/statsd/config.js' do
before :each do
describe LeadService do
LeadService.configure(:test) do
before { settings.set(:instance, self) }
end
# Required for Rack::Test
#
def app
LeadService
#!/usr/bin/env bash
# Compress MySQL tables on disk.
# Author: Andrew Berry, andrew.berry@lullabot.com
#
# Compress all tables in a MySQL InnoDB database using compression from the
# Barracuda table format. Tables have to already be in the Barracuda file
# format to actually compress tables, otherwise the table setting is ignored.
#
# innodb_file_per_table = 1 MUST be set in my.cnf for compression to work.
# Puppet definition:
exec {"Clone a copy of ${scm_uri}":
command => "git clone ${scm_uri} ${source_checkout_dir}",
path => ['/usr/local/bin'],
cwd => $::nexus::nexus_root,
user => $::nexus::nexus_user,
creates => $source_checkout_dir,
require => Package['git'],
unless => "/usr/bin/test -e ${source_checkout_dir}/.git",
}