DevOps Is Hard

My friend David and I recently started work on Portland Cafés. The idea was simple enough: we wanted to know which coffee shops were open and how far away they were.

I wouldn’t say the project was complete, but it was usable. Usable enough to go live. We decided that, in publishing our web app, we wanted to incorporate some sort of automated deployment process.

Roughly, this meant:

  1. We commit some changes on a feature or fix. These commits eventually end up in a “production” branch, master in our case.
  2. Changed files are transmitted to our server.
  3. The server builds the project from the new files.

On the surface, these steps don’t seem very complicated. The most obvious hole occurs between steps 1 and 2: something needs to respond to the post-commit hooks and deal with it. Several services exist to fill this hole. We looked at:

CircleCI was our first choice: their virtual machine runs your tests, deploying only when everything passes. That sounds awesome. After browsing the documentation and hooking it up to the repo, Dave and I quickly realized it was overkill. I wrote exactly one unit test. I don’t think Dave’s written any Ruby tests.

So, we settled on Deploy. Eight hours after pulling our hair out, we were set up.

This was my first experience setting up a legitimate deployment system. It was a nightmare. “Development operations” – the integration and automation portions, at least – requires such a broad and deep understanding of several technologies. We’re fairly focused: Dave’s a Ruby and JavaScript guy, I work in front-end land. All that hair-pulling is especially frustrating because it’s peripheral to our actual work. My time would be better spent designing a part of the app or coding up new features.

The initial setup was hell (I could write a whole article on lessons learned) but it will pay off. Automation is future time saved. Now, merely merging code results in deployment, which is easy and awesome.

If only we could stop Readme updates from firing off the whole thing.