BrainVault


The Pancake Stack


The Pancake StackAt Nitro we’ve tried to embrace the idea that simple systems are key to scalable and efficient infrastructure and micro-services and help maximize innovation, velocity and trust. If you haven’t heard this talk by Rich Hickey please take the time to watch this talk. The points mad...

serverless docker


Serverless Docker… or stream processing with docker using golang.At dockercon I saw a ‘cool hack’ they called server-less docker. Basically the idea is to use containers as functions in programs instead of using containers as servers. This brings back the concept of cgi. Further on the idea o...

apt-cacher-ng with docker builds


apt-cacher-ng with docker buildsWorking with docker on a laptop testing configuration of containers has some of the same annoyances as working with other configuration managment tools and testing frameworks like test-kitchen, chef, ansible etc… It takes forever to download dependencies. I might t...

Docker Hacks


I’ve found this snippet handy when you need to restart the docker daemon and want to resume currently running containers. 1234docker ps |tail -n +2 > /docker.runningcat /docker.runningservice docker restartdocker start $(awk '{print $1}' /docker.running)

Using Ansible to communicate with rest API


Ansible to interact with a rest APISometimes you may want to interact with a rest api where an Ansible module doesn’t already exist. For those cases you may want to try using the uri module. Ansible already supports interacting with json so its pretty easy. Below I show an example of interacting ...

Tricks for finding directory space usage.


Tricks for finding directory space usage.1find . -iname "*regex" -printf "%s\n" | awk '{f+=$1}END{print f/(1024 *1024 * 1024),"GB"}' 1find . -iname "*.regex" -printf "%s\n" | awk '{f+=$1}END{print f}' another way. 1find -name \*.regex -print0 | du -ch --fi...

Infiniband performance tuning


I don’t currently have access to the original hardware I used so most of this is off memory and some notes I made.Also I’ll present the caveat and warning that all these things I tested not with a view to stability for a production environment but this allowed me to get an Idea of what things I c...

smp affinity makes a difference


A good driver.Having a driver that uses the proper interrupt handling makes a difference in high bandwidth pci devices like RAID cards and Infiniband. For example having the stock 2.6.32-220 megasas driver only makes use of one interrupt. This was the stock driver in the centos 2.6.32-220 kernel ...

BASH tricks


Just a bunch of bash tricks i’ve picked up.Save a backup copy of a file with a datestamp. 1cp script.sh script.sh.$(date +%Y%m%d%H%M) Generate a random string maybe for api key or password. 1cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 Find empty directories. 1fin...