Skip to content

Instantly share code, notes, and snippets.

View abrader's full-sized avatar

Andrew Brader abrader

  • Portland, OR 97209
View GitHub Profile
@abrader
abrader / Vagrantfile
Created November 29, 2016 21:09
Basic Vagrant configuration file
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@abrader
abrader / grafana-dashboard.json
Created November 29, 2016 20:31
Grafana Dashboard for Puppet
{
"title": "master",
"services": {
"filter": {
"list": [],
"time": {
"from": "now-5m",
"to": "now"
}
}
@abrader
abrader / get_environment_version.sh
Created October 17, 2016 21:56
Config Version: Get current git commit hash
#! /bin/sh
if (( $# != 1 )); then
echo "Call this script with the name of the environment"
echo "Example: ${0} production"
exit 1
fi
ENVROOT='/etc/puppetlabs/code/environments'
GITDIR="${ENVROOT}/${1}/.git"
@abrader
abrader / winrm_trustedhosts_accept.txt
Created June 28, 2016 21:00
Prompt for WinRM TrustHosts addition
WinRM Security Configuration.
This command modifies the TrustedHosts list for the WinRM client. The computers in the TrustedHosts list might not be
authenticated. The client might send credential information to these computers. Are you sure that you want to modify
this list?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y")
@abrader
abrader / winrm_auth_error.txt
Created June 28, 2016 19:09
WinRM auth error
Test-WSMan : <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2150858980"
Machine="WIN-B0RJROJQUNB"><f:Message>The WinRM client cannot process the request. If the authentication scheme is
different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be used or the
destination machine must be added to the TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts.
Note that computers in the TrustedHosts list might not be authenticated. You can get more information about that by
running the following command: winrm help config. </f:Message></f:WSManFault>
@abrader
abrader / apache_spec.rb
Created May 5, 2016 14:15
Apache Spec Test
require 'spec_helper'
describe 'apache', :type => :class do
let(:node) { 'abrader.puppetlabs.vm' }
describe 'when called with no parameters on RedHat' do
let (:facts) { {
:osfamily => 'Redhat',
:ipaddress => '127.0.0.1'
} }
@abrader
abrader / f5_local_accept.md
Last active March 23, 2016 16:28
Getting F5 AWS acceptance testing to run locally

F5 Acceptance Testing: Running locally

This document will serve as the instructions to convert the F5 acceptance testing suite to run locally vs on AWS as originally intended.

RHEL based prep work (optional)

Install compiler and libs necessary to build Ruby libs if on RHEL

yum -y install zlib-devel libxml2-devel libxslt-devel libstdc++ gcc-c++ git ruby ruby-devel ruby-libs
@abrader
abrader / cmfsf.pp
Last active March 14, 2016 20:54
Code Manager and File Sync off
node_group { 'PE Master':
ensure => present,
classes => {
'pe_repo' => {},
'pe_repo::platform::el_7_x86_64' => {},
'puppet_enterprise::profile::master' =>
{
'code_manager_auto_configure' => false,
'file_sync_enabled' => false,
},
@abrader
abrader / cmfsn.pp
Last active March 15, 2016 14:07
Code Manager and File Sync on
node_group { 'PE Master':
ensure => present,
classes => {
'pe_repo' => {},
'pe_repo::platform::el_7_x86_64' => {},
'puppet_enterprise::profile::master' =>
{
'code_manager_auto_configure' => true,
'file_sync_enabled' => true,
'r10k_private_key' => $code_manager_private_key_path,
@abrader
abrader / gist:850d8788b03a03fb2bec
Created February 18, 2016 00:26
Notes for rbvmomi
yum -y install gcc-c++ libstdc++ ruby-devel zlib-devel
gem install rbvmomi
mini_portile2-2.0.0
nokogiri-1.6.7.2.gem (100%)
builder-3.2.2
trollop-2.1.2
rbvmomi-1.8.2