We've all heard of automation, but what does it mean?
Take my personal Google Calendar (I could also examine my work Google Calendar, but where's the fun in that?). As a creative writer, I'm always on the lookout for publications to send my work to. Many only accept stories during specific submission windows — which I discover after visiting their website and discovering they're closed to new work.
Rather than trusting that I'll remember to come back in 32 days, I pull out my phone and make a quick note in Google Calendar. Then, it alerts me the day the submission window opens so I can add my story to the editors' queue. Not only does Google Calendar track these dates for me, but I can also set alerts at specific times based on my schedule.
This feature is better than a traditional calendar where I'm trusting myself to check it routinely (which is almost as problematic). For example, I would set a reminder at 6:00 PM that Strange Horizons opens up for submissions since I will no longer be at work and can submit a piece in a short amount of time. If the event or task is going to take more preparation, I can set alerts further in advance, like a week in advance of a wedding.
The DevOps lifecycle can be automated like how I've automated my writing submissions. In this post, we've broken down what DevOps automation is, the best practices for implementing it, and what you can achieve with an automated workflow.
DevOps and Automation
DevOps and automation go together so naturally that it's easy to assume they're synonymous. In fact, automation is a core value of DevOps and supports the other values of the DevOps philosophy. With standardized notifications and reporting, communication improves between individual stakeholders. Automated handoffs now move the product through the pipeline for quicker turnarounds instead of team members transferring the code manually.
Not only do processes improve from DevOps automation, but team satisfaction increases as well. For example, an automated tool checks application logs to identify potential issues, saving an operations team member from having to manually sift through hundreds of status updates.
Now, the team member can focus on addressing issues instead of identifying them, issues are flagged faster, and the risk of human error is substantially reduced. When DevOps automation is implemented well, everyone benefits.
What is DevOps automation?
DevOps automation is the process of removing menial or repetitive tasks to streamline workflows within the DevOps lifecycle. Automation is achieved using tools and process adjustments for faster deliveries and higher quality applications.
Now that we know what DevOps automation is, let's examine how you can implement this strategy to optimize your software development lifecycle.
Building Automation for DevOps in Your Company
So, how do you start automating your DevOps lifecycle? Planning is key to ensuring a successful rollout. First, map out your existing DevOps pipeline to identify gaps in your toolchains and processes. This information should give you a good idea of where opportunities for automation exist.
Next, compare this map with any existing data you have on turnaround time, iterations, and other metrics that are important to your team. This data should provide additional insights into where automation can produce the most impact and help set measurable goals in the following step. If you do not have all the data that you would like, address this in your automation strategy.
Now that you have targets and data to inform your approach, it's time to decide on the goals for your automation strategy. These should be measurable benchmarks so you can determine if your rollout is meeting expectations.
Ideally, your approach should help achieve one or more of the larger benefits of DevOps:
Now that you have a complete picture of your pipeline and have identified your goals, you can select the areas you will target for automation.
What should you automate?
Every organization and team is unique, but there are a few phases in the DevOps pipeline that teams will commonly automate:
Monitoring and reporting
We'll cover each of these sections in more detail below.
DevOps Automated Software Testing
Software testing is a subset of DevOps automation focused on streamlining the testing process for applications before releasing them to the IT operations team. This process is an important piece of the DevOps lifecycle for catching and fixing issues before the application is deployed to users. Naturally, automation will more thoroughly cover every aspect of an application and its features versus human inspection. Automation also scales to simulate thousands of users for stress testing software.
Software tests are grouped in a few different categories depending on scope:
Unit Testing: examining individual pieces of source code to ensure each functions as expected
Integration Testing: examining groups of code to ensure they work together as expected
End-to-End Testing: examining the entire application to ensure it works as expected in a methodical approach
Exploratory Testing: examining the entire application in an unmethodical approach to mirror user interactions (since one user will probably not use every single feature of your application)
A real-life example of a DevOps automated software testing strategy is using frameworks like Test.ai to simulate user behavior and identify any bugs in the UI to fix before deployment.
Automated Infrastructure Management
Once you have finished testing your application, it's time to deploy it. However, provisioning servers and networks can require a lot of manual work between the initial setup, configuration management, and maintenance.
Fortunately, DevOps automation provides a solution. Software-defined infrastructure (SDI) means that a tool is responsible for these tasks instead of a human. SDI not only frees up team members but provides many of the other benefits we've seen before: scale, consistency, and speed.
A real-life example of DevOps automated infrastructure management is using tools such as AWS CodeDeploy to create software environments using predefined templates. These tools allow teams to deploy new applications and push out updates to existing applications instantaneously.
Automated Monitoring and Reporting
Your application is now live, but the work is not finished, yet. A key part of the DevOps lifecycle is monitoring deployed applications for signs of trouble. Trouble in this context can be anything from bugs to downtime to cyber-attacks; anytime your application is not behaving as expected.
Rather than depending on user feedback — at which point the issue is already disrupting their experience — DevOps teams will implement automated monitoring and reporting for early warnings.
The first step is defining criteria for these tools and setting thresholds for different actions. Monitoring tools will examine different parameters for warning signs, such as average response time for server requests. Some issues may be routine and low priority, so you can orchestrate a response in the tool to address them.
For higher-order issues, monitoring tools should flag these for human intervention with appropriate context to help the operations team respond. Assigning levels of priority to each alert will also help guide operator responses, so you should focus on basing levels of priority around the issue's impact on the application. Alarm fatigue is a real phenomenon; we've all received an email marked "URGENT" only to find out it was not critical.
A real-life example of DevOps automated monitoring and reporting is implementing services like Splunk to monitor your application's network to detect intrusions. Based on your parameters, Splunk will block bad actors from penetrating deeper into the network while the operations team is alerted, mitigating the damage that could result in the time it would take a human operator to react.
How do you automate the DevOps lifecycle?
Returning to my Google Calendar example, good automation depends on good tools. If Google Calendar wasn't flexible and responsive to my needs (e.g. I couldn't adjust the reminder notification time), I might be worse off tracking submission dates in the app. You've already seen DevOps automation tools highlighted in the earlier sections, so let's dive into some best practices for selecting the right tool for the job.
DevOps Automation Best Practices
Focus on tools that will integrate with other systems.
Focus on reusable code and strategies.
Prioritize open-source tools.
Choose tools that are code and operating system agnostic.
Let's run through each of these points.
1. Focus on tools that will integrate with other systems.
There are many tools built to address a specific use case, and with that sole focus, they solve the issue perfectly. However, the best tools for DevOps will offer integrations and plugins with other tools so that code and information can flow between the phases of the DevOps lifecycle.
For example, you finish building the application and commit the production code to GitHub. Jira is integrated with GitHub so that all you need to do is check the task off within GitHub. Now the testing team is automatically notified that the task is completed so they can start testing the application.
2. Focus on reusable code and strategies.
A great DevOps tool will not only satisfy one use case but extend to others as well. The more universal the tool, the more return on the price and onboarding time invested.
Imagine needing to open 20 different applications to complete your daily tasks. You will naturally lose time moving back and forth between them versus a consolidated and centralized tool stack.
3. Prioritize open-source tools.
Open-source tools are not only free in most cases, but offer additional benefits beyond cost savings. First, these tools provide greater visibility "under the hood" so that your team gains a greater understanding of how their features work.
Second, open-source tools have documentation and dedicated user groups that simplify the onboarding and training process. These perks distinguish open-source tools from proprietary tools where you may need specialized training to learn the interface.
4. Choose tools that are code and operating system "agnostic."
Or, if your tool only runs in Linux, then that's another disruption that would come from transitioning to Mac OS. Obviously, it's important to weigh the costs and benefits of large-scale changes and make sure the short-term disruptions won't outweigh the long-term benefits. In any case, save yourself a future headache by choosing a tool that will adapt to your team's strategy — not the other way around.
A common theme in these best practices is flexibility, yet many of the benefits of DevOps automation center on standardization. While these two values may seem at odds, they fully complement each other. The key is to achieve standardization in your ongoing processes while remaining flexible to new approaches as technology evolves. Your product is consistent for your customers and users while your workflow is adaptable.
The Benefits of Achieving DevOps Automation
The goal of automation is to achieve greater outcomes while improving team satisfaction. Google Calendar helps me send my work to more publications and removes the disappointment if I miss a submission window for a magazine.
In the scope of DevOps, automation helps teams achieve greater consistency, speed, and scale while removing menial tasks. Employees are also more satisfied with their work and able to focus their efforts on higher-order tasks. With careful planning backed by data, you can achieve these benefits for your team and supercharge your software development process.
Originally published Nov 16, 2021 7:00:00 AM, updated November 16 2021