Managing Infrastructure – On Chef and Rails

We’ve recently been making some upgrades to the HiringThing hosting infrastructure, and one of our initiatives is to add more automation, DevOps style HiringThing runs on many servers behind the scenes, so configuration changes can take a lot of time. Our goal was to implement a tool that allows us to make changes to our stack without logging into each server one by one.

The Right Tool for the Right Job


First off, we started by reviewing the breadth of tools available, and there are dozens of them. I won’t go into detail on every option we looked at, but one of the conclusions we came to is that there are a lot of “right answers.” There are many ways to do the job, but you have to select the right tool for your environment. For us, that is Chef ( with Puppet coming in a close second.)

Beyond the basic ability to configure and manage servers remotely, we like Chef for a few specific reasons:

  • Ruby-centric, developer-friendly design . Some other packages felt more IT/configuration focused. That might be a plus for some teams, but we like our code.
  • Robust hosted service . Opscode provides hosted chef, which enables us to skip a bunch of setup and config (we want fewer IT tasks, not more .)
  • Active community . Lots of activity and templates available (cookbooks, in the Chef parlance) – this was important as viable examples really speed implementation time.

First Contact

To get started, we needed to integrate with our automated deployment process ( based on Capistrano ) While Chef can handle everything end to end, we were reluctant to just abandon our finely tuned deployment process. Our goal is to ease Chef into our infrastructure, allowing us to slowly add more automation over time.

Our first target was the Rails database.yml file . This file contains database connection information, and in our case, we’ve added a dozen or so additional configuration options specific to HiringThing. For example, we use a pool of Memcached servers. When we add one, it gets added to an array in the database.yml file, and the Rails client ( Dalli ) load balances between them.

It’s definitely been useful to have this file managed. When a change needs to be made, I simply update my local Chef repo (Chef uses Git heavily to manage your configs,) push it up to the hosted Chef server, and then the Chef client installed on each server updates the file. I have different configurations set up for different roles in our stack, and I can do everything from my local workstation rather then having to login to each server.

I Dream of Full Automation

While the Rails config is a useful addition to our process, it’s really only a proof of concept. Over the next few months, we’ll be extending our Chef implementation to include replacing Amazon servers, adding/removing capacity, applying OS updates and other IT chores.

Maybe I’ll never have to log into a server again. (yeah, right)


Author: HiringThing

HiringThing is easy to use, intuitive online recruiting software that makes it easy to post jobs online, manage applicants and hire great employees.