Jenkins Dynamic EC2 Executors

There is a nice plugin for Jenkins that lets you dynamically add capacity by spinning up EC2 instances on demand and then terminating them when the job queue expires. This is a great way to save money on an AWS based build infrastructure. Unfortunately, the plugin documentation is really light and there are a few gotchas to look out for. Security Groups This field only accepts comma separated security group IDs, not names. This is frustrating because other fields in the plugin take a space separated list (e.g. labels) ...

July 25, 2017 · 2 min · dschaaff

Speeding up RSpec Tests in Bamboo

Now that roles and profiles are in my control repo my RSpec tests are taking longer then ever. As of this writing the control repo contains 938 tests and I’m still a long way from 100% coverage. This really slows down the feedback loop when running tests. When running locally I often just run RSpec against a specific spec file rather then run the whole test suite, but I still wanted a way to speed things up in Bamboo. ...

March 29, 2017 · 2 min · dschaaff

Tackling Tech Debt in Puppet

I spent some time tackling technical debt in our Puppet code this week. The biggest outstanding item was implementing eyaml for protecting secrets in Hiera. I’d also been encouraging developers to contribute to the Puppet code base for some time, but they were restricted from the control repo due to some secrets kept in Hiera. This put a big damper on collaboration as Hiera is the data engine for our roles and profiles. Separate git repos were also used for the profile and role modules due to this workflow. ...

March 29, 2017 · 2 min · dschaaff

Update to lita-activedirectory

I updated our Active Directory lita plugin today with support for querying the members of a given group. See https://github.com/knuedge/lita-activedirectory. It still needs some work to properly present errors when a user or group doesn’t actually exist in the directory. Right now it returns nothing rather then a helpful error. It works splendidly with legit users and groups however. ChatOps ftw!

March 21, 2017 · 1 min · dschaaff

Automated Puppet Tests with Bamboo

rnelson0 is walking through automated Puppet testing with Jenkins on his blog. I thought I’d highlight how you can use a similar workflow in Atlassian’s Bamboo application. This assumes you already have a working Bamboo setup and are familiar with the general process for testing Puppet modules with rspec. Create a new plan The first step is to set up a new plan to use for the testing. Click “Create” and then “Create a new plan” in the top menu bar.![Pasted_Image_1_13_17__3_08_PM.png]({{ site.url }}/assets/img/pasted_image_1_13_17__3_08_pm.png) ...

January 14, 2017 · 5 min · dschaaff

Finishing the Puppet 4 Migration

Two days ago I finished our migration to Puppet 4. Overall I’d say the process was pretty painless. The gist of what I did start running rspec tests against Puppet 4 fix issues found in tests run the catalog preview tool and fix any issues found turn on the future parser on the existing master turn off stringify facts create new master and PuppeDB server migrate agents to new master Thankfully our code wasn’t too difficult to update and most of the forge modules we use had also been updated. ...

December 23, 2016 · 5 min · dschaaff

Code Keyboard Tenkeyless - Massdrop

My favorite keyboard is up on Massdrop again. I highly recommend it. For the nerds keeping score I waffle between brown and blue switches(the clears made my fingers tired). https://www.massdrop.com/buy/code-keyboard-tenkeyless?referer=FNWB57

December 23, 2016 · 1 min · dschaaff

This is great.

My Priorities for the Next Four Years —Schneier on Security “Like many, I was surprised and shocked by the election of Donald Trump as president. I believe his ideas, temperament, and inexperience represent a grave threat to our country and world.” https://www.schneier.com/blog/archives/2016/12/my_priorities_f.html

December 15, 2016 · 1 min · dschaaff

Terraform AMI Maps

Up until today we had been using a map variable in terraform to choose our ubuntu 14 ami based on region. variable "ubuntu_amis" { description = "Mapping of Ubuntu 14.04 AMIs." default = { ap-northeast-1 = "ami-a25cffa2" ap-southeast-1 = "ami-967879c4" ap-southeast-2 = "ami-21ce8b1b" cn-north-1 = "ami-d44fd2ed" eu-central-1 = "ami-9cf9c281" eu-west-1 = "ami-664b0a11" sa-east-1 = "ami-c99518d4" us-east-1 = "ami-c135f3aa" us-gov-west-1 = "ami-91cfafb2" us-west-1 = "ami-bf3dccfb" us-west-2 = "ami-f15b5dc1" } } We would then set the ami id like so when creating an ec2 instance. ami = "${lookup(var.ubuntu_amis, var.region)}" The problem we ran into is that we now use Ubuntu 16 by default and wanted to expand the ami map to contain its ID’s as well. I quickly discovered that nested maps like the one below work. ...

December 2, 2016 · 2 min · dschaaff

Adventures in Ruby

I’m learning ruby. Finding time to work towards this goal is proving difficult but I’m forcing myself to use ruby wherever possible to aid in my learning. I’ll be putting some of my lame code on here to chronicle my learning and hopefully get some feedback on how I can improve things. I recently came across a good opportunity when I needed to generate a list of nodes to use with the puppet catalog preview tool ...

November 30, 2016 · 2 min · dschaaff