Skip to content

Instantly share code, notes, and snippets.

View briancain's full-sized avatar
🌀

Brian Cain briancain

🌀
View GitHub Profile
@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

@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 / 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:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/GnTS4bPAD38pKX1RoXDxCUVoB6hPmbIn33wPGsIVlJWKvUQcLd4SIBEwWP0CsLZt4pxNCWCCQ8vwgVUBmqUtotvpBZEvzU58qJnzxXBw9t4aULFQB1wiEu/rhN++uFq7b3x/LWyQcjC5bPdcRU6XHI1W1XmZzj1mL+N36kXaYTDQ0nunwToV2qw2ocr9aTGQrRR1r8KKKreUn7BaHJZCTuLy18AcWUntAgYr8gnjMDUYYJw0humFvE03+OHGQH9fn3sTd1/jsRRApU2afXfkXJV3lblhlDNLrgqM1wiyRFOSo5I6MLqmkgu/4vJ7yudEGKDmamFX7XMrIN1XcVbb [email protected]
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
CENTBOX = "../vagrant-boxes/centos-65-x64-virtualbox-nocm.box"
DEBBOX = "../vagrant-boxes/debian-73-x64-virtualbox-nocm.box"
SLESBOX = "../vagrant-boxes/sles-11sp1-x64-vbox4210-nocm.box"
WINDOZE = "../vagrant-boxes/win2012r2-x64-virtualbox-nocm.box"
# -*- 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|
config.vm.define "ubuntu", primary: true do |ubuntu|
(ns markov.core)
(defn transform
[words]
(->> words
(partition 2 1)
(reduce (fn [acc [w next-w]]
(update-in acc
[w next-w]
(fnil inc 0)))
@briancain
briancain / blockip.sh
Created December 1, 2014 16:11
block ips
#1 /bin/bash
# $1 == IP
sudo iptables -A INPUT -s $1 -j DROP
sudo service iptables save
sudo iptables -L INPUT -v -n

Pre-changes

                 user     system      total        real
Run 1        5.740000   0.080000   5.820000 (  5.821333)
Run 2        0.160000   0.000000   0.160000 (  0.174353)
Run 3        0.140000   0.010000   0.150000 (  0.136421)
Run 4        0.170000   0.000000   0.170000 (  0.177465)
Run 5        0.170000   0.000000   0.170000 (  0.173762)
Run 6        0.140000   0.010000   0.150000 (  0.137906)
brian@localghost:dockerdoomd % go run socket.go ±[●●][master]
2017/08/12 14:42:34 Starting echo server
2017/08/12 14:42:34 Created socket at /tmp/go.sock
2017/08/12 14:42:34 about to listen