Skip to content

Instantly share code, notes, and snippets.

View briancain's full-sized avatar
🌀

Brian Cain briancain

🌀
View GitHub Profile
@briancain
briancain / conf.cfg
Last active August 29, 2015 14:05
beaker config for pe acceptance tests
HOSTS:
puppetmaster.local:
roles:
- master
- database
- agent
- dashboard
platform: el-6-x86_64
CONFIG:
@briancain
briancain / Vagrantfile
Last active August 29, 2015 14:03
Multi-master Split PE install Vagrant Script (does not install PE)
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
BOX = "centos-65-x64-virtualbox-nocm.box"
# Multi-node setup
# Make sure to run this:
# vagrant plugin install vagrant-hostmanager
@briancain
briancain / feeder.md
Last active August 29, 2015 14:03
Gating Feeder Scenario

Modifying a gatling scenario with feeder

After you have using the proxy recorder to generate all of the appropriate files like the gatling recording scala file (don't forget to change the request values within the .exec calls as mentioned before), and the request_body txt file, and placed the catalog-zero modules and included it in your default node def on your site.pp, there are several modifications required for the feeder functionality.

The first thing you should do is use the generate-node-feeder.sh bash script to generate all of the fake hostnames that will be used in the gatling simulation. It should walk you through what you need to enter in and where to put the resulting csv file.

Note: If you'd like to follow along, just check out this commit here https://github.com/briancain/gatling-puppet-load-test/commit/eddaf1dfe41e41a9b8a31aea1d999ca5824fc599

Next, you must add a line in your gatling simulation to reference the new generated csv file, as seen below. (Make sure the csv file you generat

# this works in puppet-acceptance/
# Puppet Open Source Tests
# debug
# time ./systest.rb --type manual --no-install --debug --ntp --config ../conf/cent6mda-cent5a.cfg --helper ../puppetdb/acceptance/helper.rb --options-file ../puppetdb/acceptance/options/postgres.rb --setup ./foo -t ../puppetdb/acceptance/setup/pre_suite/00_setup_test_env.rb --tests $@
# non-debug
# time ./systest.rb --type manual --no-install --ntp --config ../conf/cent6mda-cent5a.cfg --helper ../puppetdb/acceptance/helper.rb --options-file ../puppetdb/acceptance/options/postgres.rb --setup ./foo -t ../puppetdb/acceptance/setup/pre_suite/00_setup_test_env.rb --tests $@
# Puppet Enterprise run tests
# Debug
# time ./systest.rb --type pe --no-install --debug --ntp --config ../conf/cent6mda-cent5a.cfg --helper ../puppetdb/acceptance/helper.rb --options-file ../puppetdb/acceptance/options/postgres.rb --setup ./foo -t ../puppetdb/acceptance/setup/pre_suite/00_setup_test_env.rb --tests $@
# Single node
@briancain
briancain / woot.md
Last active August 29, 2015 14:00
GithubGist bug?

Is this going to break GithubGist??

  • yes
  • no
  • maybe
@briancain
briancain / keybase.md
Created April 8, 2014 16:48
Keybase auth

Keybase proof

I hereby claim:

  • I am briancain on github.
  • I am briancain (https://keybase.io/briancain) on keybase.
  • I have a public key whose fingerprint is 735C 39F6 4136 A7E8 538A DBD4 F582 FE9C 4DDE FD10

To claim this, I am signing this object:

@briancain
briancain / issue.md
Last active August 29, 2015 13:58
Potential issues with ancor

After I did an environment remove, ANCOR still had instances and roles (potentially other things) left over in the database. Shouldn't this endpoint clean up these left over values in mongo?

This was discovered after I redeployed a new environment. ANCOR said I had 22 instances.

roles leftover? duplicate roles

vagrant@ancor-precise64:/vagrant$ ancor role list
  +--------------------------+------------+-------------------------------+-----+-----+
  | id                       | slug       | name                          | min | max |
@briancain
briancain / compilereport.sh
Last active August 29, 2015 13:57
compile latex
#! /bin/bash
# Brian Cain
#
# Stop wasting your time with
# pdflatex and bibtex. Just
# run this script.
# Don't forget to change REPORT_NAME
@briancain
briancain / brian.zsh-theme
Last active August 29, 2015 13:56
My custom theme for oh-my-zsh
# Display user and host in prompt
local user_host='%{$terminfo[bold]$fg[blue]%}%n@%m%{$reset_color%}'
# Build left hand prompt
PROMPT="${user_host}:%{$fg_bold[green]%}%p%{$fg[cyan]%}%c%{$reset_color%} $ "
# rvm development
# local rvm_ruby=''
# if which rvm-prompt &> /dev/null; then
# rvm_ruby='%{$fg[red]%}[$(rvm-prompt i v g)]%{$reset_color%}'
@briancain
briancain / help.txt
Last active July 25, 2016 12:46
Trollbot Help Commands
17:27 < Trollbot2> !buzzword - Returns a random buzzword
17:27 < Trollbot2> !proof - Returns a random proof
17:27 < Trollbot2> <name>++
17:27 < Trollbot2> <name>--
17:27 < Trollbot2> Events:
17:27 < Trollbot2> N/A
17:27 < Trollbot2> deal with it - display a "deal with it" gif
17:27 < Trollbot2> Trollbot2 <user> doesn't have <role> role - Removes a role from a user
17:27 < Trollbot2> Trollbot2 <user> has <role> role - Assigns a role to a user
17:27 < Trollbot2> Trollbot2 <user> is a badass guitarist - assign a role to a user