If you've been automating your internal processes, building CI/CD pipelines, and writing Ansible code for a few years, then it can be hard to remember a time before automation had taken over your everyday workflow. Deciding on what to automate can be daunting for a beginner: There are programming languages to learn, tools to familiarize yourself with, and terms like "idempotency" to add to your vocabulary. How can you decide on where to even begin with automation? In this article, I walk you through five tips that have guided my decisions when it comes to building new automation.
[ You might also enjoy: 3 steps to identifying Linux system automation candidates ]
1. Keep a work log
It might seem obvious, but the biggest automation gains are often found in creating tools that address common, repetitive tasks. While you probably have some general sense of what those tasks are, a great way to narrow in on them is to keep a daily work log. I personally keep a daily notebook and timebox my day. Our other Sudoers have shared their time management tips, and you might find ways that work better for you. Even keeping a simple text file with a list of accomplishments from each day is a quick and easy way to track your work.
The key idea here is that you can use your work log to identify patterns. I can look back through my notebook to identify areas where I'm spending a disproportionate amount of my time. I can evaluate these tasks to see if they make good candidates for automation. I can't automate away my presence in a requirements gathering meeting, but I can see that these meetings often result in building a virtual environment with a standard configuration. That's a perfect candidate for automation: With a few simple Ansible playbooks, I can automate VM deployment and configuration.
2. Trawl through your ticketing system
If you're a member of a larger organization, there's a good chance that you use a formal ticketing system to track your work. While many technical folks want to spend as little time as possible staring at tickets (and more time staring at a terminal), failing to leverage your ticketing system as a rich data repository is a huge mistake. Regularly reviewing tickets can easily reveal work patterns that consume a lot of time and are better off as automated tools. For example, you might find a common pattern in change management tickets to manually adjust load balancer configurations. This is a great opportunity to write an automated tool in your favorite language to handle this repetitive and error-prone task.
The thought of digging through hundreds, or even thousands, of tickets, can be very daunting. My advice is to start small. I've had great success simply meeting with my team on a bi-weekly basis to review the work that we did. These brief meetings have often resulted in several team members expressing that they've worked on very similar tasks. We can then take those repetitive activities and create automated tools to handle them.
3. Identify good manual processes
One of my managers had a firm belief when it came to automation: Any good automation is based on a well-defined manual process. I completely agree with him for two reasons: First, a good manual process spells out exactly what you need to do when writing an automation. Second, a well-defined process clearly defines your success criteria.
One of my first large-scale automation projects at a previous employer involved writing a Python tool to automate all of the steps involved in renaming a host throughout our many systems. After reading our documentation, I decided to work on this, which spelled out every step necessary for this process. Our manual process was strong, and I simply had to translate this into code. If you're thinking about automating something in your environment, make sure you take the time to develop and test a manual process first.
4. Talk to your customers
At the end of the day, your goal as a sysadmin is to support the business. Building robust automated tooling ultimately helps you to better meet the needs of your internal or external customers. It's usually easier to identify the tasks that you want to automate as sysadmins, but what about identifying process improvements for your customers?
Like any requirements gathering task, this begins with strong communication. You should be talking with your stakeholders regularly. If you support internal development teams, make sure that you're regularly meeting with developers at all levels to stay informed about their needs. You might learn that dev teams are frustrated with the build time for new virtual machines, which prevents them from testing new products in a timely manner. If you work in end-user support, you might find that users hate opening tickets for password resets because it's embarrassing and slow. These tasks are candidates for automation.
5. Keep up with the industry
One of my favorite parts about working in tech is that I'm constantly surrounded by people who are smarter than I am. I frequently spend time talking about tech with my colleagues across different companies and in various areas of IT. These conversations often lead to new ideas that I can implement in my environment.
I enjoy reading industry blogs, subreddits, and mailing lists for this same reason. I'll often read about a task that someone else automated, and I add that information to my mental automation toolbox. For example, one of my Enable Sysadmin colleagues recently wrote about how to automate email sending using Ansible and Gmail. I use both tools on a daily basis, so this is a great automation topic to keep in mind for when I need it. You would be surprised at how many good ideas I've had based on simply reading the work of others.
[ Looking for more on system automation? Get started with The Automated Enterprise, a free book from Red Hat. ]
With an endless array of tools and topics to study, beginning your automation journey can seem daunting. Automation, like any technology, is simply a tool. Understanding the problems that you have will help you to select the right tool for the job. In this article, you looked at five different ways to identify those problems that are candidates for automation. I wish you the best of luck on your journey into the exciting world of automation.