Chapter 76. Automate or Not-o-Mate?

Judy Johnson

Ask a group of engineers how to DevOps, and many will say, “Automate all the things!” That’s a great answer that definitely covers a lot of the DevOps process, but it is not all DevOps is about. Here, I discuss why automation is important, how it relates to DevOps, and when automation may or may not be the right tool for the job.

Let’s take a step back and concentrate on automation. Why automate? There are many reasons; among them are to save time, ensure consistency, reduce the chances of human error, save the cost of a human performing the task, or allow the process to be part of a larger automated process (i.e., CI/CD). What do we automate? We automate tasks that are repeated often, are error prone, or need metrics and status collection, as well as ongoing processes such as testing and deployment. How do we automate? We use scripting or computing languages; configuration management tools such as Puppet, Chef, Salt, and Ansible; continuous integration frameworks such as GitLab CI/CD, Jenkins, and Travis; cron jobs; APIs; and variations on these themes.

Now let’s talk about the DevOps phases: plan, code, build, test, release, deploy, operate, monitor. Many of us are automating most of those phases already. In my opinion, the cool thing about DevOps is that if you have completed any phase, you have already made your task simpler.

So you have a process to automate—what do you do? The planning phase is arguably the most important and the least automatable. To see what you are doing, perform it manually, and then document what you have done. You’ve already simplified life with instructions! Next, code or script your process, solidifying the steps and building a product. The test (and peer review) steps allow you and others to understand what’s been done from a slightly different perspective. Automations of the release and deploy phases are time-savers, and can be reused as the product is continuously improved. In production, continue to operate and monitor, as continuous feedback is important.

Sometimes automation may not be the appropriate tool for the job—for example, for code reviews. Yes, automated checks can add consistency, check coverage, and reduce errors, but a human eye is still important in most situations. Your process may need a manual step, such as checking interim results or metrics, or entering a password. Most importantly, there is always a need for human creativity. You may have your entire process automated, but there are always improvements, bug fixes, and new requirements to implement.

Another hindrance to the process is the naysayers—people who think their job will go away if they automate too much of it, or are just not comfortable with the tools. To these people, my response is that you are not taking away your work; you are giving yourself time for more challenging and meaningful work.

My favorite thing about DevOps is the feeling of community. You will likely reach a point where your product is fully automated and you can move your creativity in another direction, but it is important to ensure that every step of the way there involves interaction, communication, knowledge sharing, and documentation. And feedback—you will definitely have lessons learned to apply to your next creative endeavor. To make an analogy to my second-favorite thing (after DevOps), baking: even a perfect recipe needs a little human touch, and perhaps a slight tweak, each time you make it. So automate away, but ensure that the human touch remains part of your process.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.86.56