Configuration management and init systems

I recently performed a fixup of the service management aspects of the logstash chef cookbook. This took more effort than I expected. Ohai doesn’t provide a working means of detecting the init system (I checked puppet’s facter and it doesn’t handle this either), so any cross-distro cookbook has to include a lot of nested conditionals to choose the right init provider. Much of this logic was wrong, so I fixed it up and added tests. Once I had it writing configurations for the right init system, I had to tweak those service configurations to make them valid.

Run aws commands with mfa

There are a number of programs I use frequently that interact with AWS, such as aws-cli and test-kitchen. I haven’t found any programs that natively support multi-factor authentication with AWS. Thankfully most programs will check the right environment variables, but you have to do a song-and-dance with STS to set them up. I’ve just made a public a program called aws-mfa that I created for work to simplify this process. Enjoy!

Massaging ovf for virtualbox

VirtualBox and VMware’s ovftool have a different idea of how a storage controller should be described. This prevents exporting a VM from, e.g. VMware Fusion, and then importing it into VirtualBox. However, this can be worked around.

Prying the lid off vagrant

When developing software, it’s convenient to have a REPL. For Ruby, the best choice I know of is Pry. In addition to facilitating exploratory programming, it can act as a console for exploring a running program’s state. It also has a plugin for basic integration with a debugger. It sounds like it would come in handy for vagrant plugin development, woudn’t it?