Skip to content

Instantly share code, notes, and snippets.


Spencer Owen spuder

View GitHub Profile
spuder / node.pp
Last active Aug 29, 2015
View node.pp
node "" {
class { 'ac_logstash_server':}
class { 'elasticsearch':
manage_repo => true,
repo_version => '1.0',
class { 'logstash':
spuder / puppet-symlink-recurse.pp
Created May 15, 2014
puppet recursively create symbolic links
View puppet-symlink-recurse.pp
spuder /
Last active Aug 29, 2015
logstash wont' work unless starting as root

cat /etc/logstash/conf.d/logstash.conf

input {
file {
  path => ['/tmp/foo']
output {
file {
 path => ['/tmp/bar']
View dashing

Tried installing dashing again on mac using ruby 1.9 as suggested by David Onagro

gem uninstall dashing
gem uninstall thin
gem clean
spuder /
Last active Aug 29, 2015
spuder / Vagrantfile.txt
Last active Aug 29, 2015
Spencers standard go to vagrant file, includes 3 major releases
View Vagrantfile.txt
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.synced_folder "../", "/vagrant_data" # Mount directory up a level so puppet module list can find modules
config.vm.synced_folder ".", "/vagrant"
spuder /
Last active Aug 29, 2015
Attempting to create sles docker container following this
sles-packages:~ # kiwi -p /usr/share/doc/packages/kiwi/examples/suse-13.1/suse-docker-container \
>      --root /tmp/mycontainer
Jul-07 20:14:37 <1> : Description provides no MD5 hash, check
Jul-07 20:14:37 <1> : Reading image description [Prepare]...
Jul-07 20:14:37 <1> : Setting up package manager: zypper                                                                                                                  done
Jul-07 20:14:37 <1> : Setting up source channel:
Jul-07 20:14:37 <1> : --> opensuse://13.1/repo/oss/
Jul-07 20:14:38 <1> : Set root log: /tmp/mycontainer.21413.screenrc.log...                                                                                                done
Jul-07 20:14:38 &lt;1&gt; : Creating default template files for new root system done
spuder /
Last active Aug 29, 2015
Docker build script
#!/usr/bin/env bash
# A simple script to build a docker container
# Pre and Post functions are where you place any optional commands (eg. git clone)
# Sets name for docker container docker build -t 'foo/bar:latest
readonly DOCKER_USER='foo'
readonly DOCKER_NAME='bar'
readonly DOCKER_TAG='latest'
# Mac and boot2docker don't use root for docker command
spuder / .bash_profile
Last active Aug 29, 2015
Docker Cleanup for mac
View .bash_profile
# Functions to clean up docker containers on mac
# Based on this blog article, however is more mac friendly (no xargs -r)
# Searches for images and containers that are named/tagged with '<none>' and removes them
# If no results, prints out the usage information
#Create functions since aliases don't play nicely with subshells
dci() {
spuder / metadata.json
Last active Aug 29, 2015
Geppetto 4.2 problem
View metadata.json
How the heck are you supposed to edit the description?
See how I take the from here and add it to my metadata.json
You have to scroll hundreds of lines right!