The HolyGrailHarness is a curated Rails application prototype that focuses on simple test patterns for Ruby & JavaScript! Unlike normal Rails Application Templates or more modern Rails application generators like Rails Composer, the HolyGrailHarness is a basic Rails application that can be considered a prototype and customized via a simple setup script. It is also somewhat opinionated in that it promotes simple and powerful testing choices and focuses on using Ruby 1.9 and up, MiniTest::Spec, Capybara, Poltergeist/PhantomJS, and Konacha. More...
We recently ran into a situation where we needed to use Chef Search to modify our /etc/hosts file dynamically on each Chef run. Originally seeming to be a relatively simple task, managing the hosts file with Chef rose some interesting challenges. While there are a few existing community-maintained /etc/hosts management cookbooks out there, none of them suited our needs. We wanted a highly customizable, easily expandable, simple, LWRP that was idempotent. In this post, I will discuss creating your own...
Throughout my internship at CustomInk, I've put a significant focus on Chef cookbook testing. At the time of this writing, there are a few solutions for testing cookbooks - ChefSpec, cucumber-chef, minitest-chef-handler, and rspec-chef – and they each have their own distinct advantages. At the very least, you should run knife cookbook test and foodcritic against all your cookbooks. Nathen Harvey covered this in his MVT: knife test and TravisCI blog post. At CustomInk, we test using ChefSpec. Additionally, we use...
At CustomInk, we recently made the switch to a new DNS provider. During the switch, we mass-imported records from our existing provider to our new provider. Did we get them all? Are they live yet? The immediate solution was to open up the terminal and fire off cURL requests, but there had to be a better way... In this post/tutorial, I will show you how I created a test suite for our DNS records using RSpec. The solution is amazingly...
In Provision your laptop with Chef: Part 1, I showed you how to setup your free Opscode Chef account and register your local development machine as a client. In Part 2, we will explore a few handy ways to manage and provision your new or existing laptop with Chef. Whether it's creating users, installing applications, or always having the perfect desktop background, Chef can make it happen! Part 2 of this series assumes that you have successfully completed all of...
We had a fairly severe production issue the other day. The kind of issue where you get sick to your stomach as you begin to realize what...just....happened...... As the issue escalated, news spread and a core group of people took control to work towards a resolution. The questions were always "what's happening" and "what's changed recently" and "what kinds of things might cause this" and never "who deployed last" and "who worked on this code originally". It says a lot...