F3 Technology Partners | Transform your IT Infrastructure

Get Started with Automation: Part 1

Setting Up Our Toolbox

Picture of Mike Ross

Mike Ross

Director of IT Automation & DevOps Solutions

All Posts
Facebook
Twitter
LinkedIn

"The best time to plant a tree was 20 years ago, the second best time is now"

That saying applies to many things in life (See Nike, ‘Just do It‘) but it also applies to automation. It can be daunting to dive in to automation given the sheer number of ways to automate, so like Maria we will “start at the very beginning”. Over the next three weeks I’ll be releasing a “Getting Started 101” for several different starting points. Are you a windows admin looking to get into scripting and automation?  Got you covered. Are you a Linux Admin looking to automate some common tasks? Got you covered. Already know Powershell and Bash? Probably need to wait for the next set of articles. These first few are going to be very introductory. So, without further ado:

Let’s talk tools. Just like with any project, success or failure starts with the tools. Let’s get you started on the right foot by setting up an automation toolset. Firstly, automation implies code. You’re going to be getting really familiar with coding tools and methodologies on your journey. Where do you put this code? In Notepad, right?

Listen, we’re not trying to be anti-notepad here, but while it does do the bare minimum of allowing you to type code and save it as a file, it doesn’t do a whole lot more than that. “Well, Mike, what else is there?” you ask? Let me introduce you to the wonderful world of the Integrated Development Environment or IDE.

As automation professionals, we need something that will catch us when we make one very common human-error – the dreaded typo. We need a tool that will help us to remember what that command is that allows us to output text to the screen. We also want a tool that helps us to run and test our automation code. This is what an IDE does best. It provides a little pop of color to help us distinguish between different types of code. It provides context and auto-complete for commonly used commands and also allows us to run our code and provides feedback on what may or may not be wrong with that code.

You can see how the IDE knows what each section of the code is and highlights it using color to help you identify the text from the commands.

It also allows you to run the code you’ve just developed from within the IDE and gives you useful feedback if you ever make a mistake. [sarcasm] This never happens [/sarcasm].

I’ve just run the code and gotten back a useful error message. It must be something in the underlined section. Oh yeah! Unless PowerShell was written by Rammstein, the correct command is Write-Host. Let me fix and re-run.

That’s much better. Literally.

This can be largely dependent on the automation or scripting language you’re working with but there are a few that stand out and are largely used:

Notepad ++

For a very lightweight and open-source feel, there’s Notepad++.  

This one has been around for a long time and provides plugins for just about any language you can think of. It gives you all the IDE goodness of code auto-complete, syntax checking, and integrated run environment. As a plus it’s entirely open source and free! Mac or Linux users beware though, as this is only released for Windows.

Atom

Maintained by GitHub themselves (that will be in a later post), Atom is an incredibly configurable IDE environment. Dubbed as the ‘Hackable Text Editor for the 21st Century’ Atom offers a ton of customization options through packages that can be installed to extend the functionality of Atom. Check out the information page here. It is incredibly stylish and infinitely customizable. Although some of the customizations require a bit more work than some other editors out there.

VSCode

This editor was created by Microsoft and is built on Open Source. It has a wide range of plugins and can even be run directly from the GitHub website to edit code by pressing “.”  This is the one that I use on a daily basis as it has the right mix of ease of customization and powerful features that make developing scripts and automation a breeze. Check out the official site here. It’s also available for just about any OS out there, including Linux, Mac, and Windows.

There are many others out there, and if you find one that you really like that’s not in this list, feel free to let me know.  But, until then, play around with the ones I’ve listed and pick your favorite one for the next phase in your automation journey.

There! Now that you’ve picked your favorite one, we’re ready to start automating all the things! Come back for Part 2 where we’ll use your new toolset to do something (sort of) useful!

-Mike

Verified by MonsterInsights