Chef: Is There a Wrong Time To Use It?

This blog is one of a series of blogs on the challenges of learning Chef, ops, and the technical world of IT all in one motion. Jeff Carapetyan is an Ops consultant concentrating on basic Chef work, and is sometimes available for contracts in the Austin area.

Reporting Live From the Studio

I did a two day training Session on how to use Chef, and one of the things that the instructor said to me still sticks. 

"When you guys get done with this, you will probably leave here and try to automate all the things. You need to pump the brakes on that idea, and avoid that thought." 

I kind of dismissed that idea as I wasn't trying to automate all the things, I was just trying to get my head around everything that I had just learned. As we get farther along, the question does have to be asked. Is there a situation where Chef would seem to be overkill? At this point I would certainly say 'yes'. 

Analysis

Depending on your application, there is a point where taking the time to automate things is actually greater than the time savings earned by automating it. There are some that love this as a way of life, but this goes against my pragmatic approach to learning Chef. The main questions that need to be asked are

  1. How long is it going to take to figure out how to Automate this step.
  2. How much work is this going to actually save me. 

Courtesy of the one and only XKCD

(photo courtesy of the one and only xkcd)

While we may be tempted to write a LWRP to be included in a role so that we can idempotently install a tarball (yes I am aware of the ark cookbook), it doesn't make sense to do all that work if all you are doing is unzipping a file one time on one machine.

But what if I need to do this so I can use this code/knowledge for the future?

Actually, That is a pretty good reason to do just that. And that is one thing that has kept me pushing forward and learning new things with Chef. Because I knew I would have to figure out how to use it eventually.

But if trying to learn it now is getting in the way of a deadline to get something done, then stick with manual steps. Eventually you can replace it with code, but don't get the blinders on and become hyperfocused on the task.

There is a saying about "can't see the forest through the trees" that seems very appropriate.