Setting Up Servers Using Ansible

Installing Software Is Fun… eh… Monotonous

Apps

You start a new job.  The laptop needs some software.

A new server needs to be setup.  Packages must be installed.

You do this once and it’s no big deal.  Once you’ve done it five, ten, or even more times, it gets old very quickly.

Not only is it boring, but often it is not the best use of one’s time.  Are there better things you could be doing rather than installing the same software on multiple machines?

I certainly thought so for our team.  There is no reason to setup the same software on multiple machines over and over.  There must be a better way!

A Lot of Time and Debug Effort Can Be Saved Using Automation

When installing software on a new system, not only does it need to be setup, but it also might need to be tested.

Checklist

  • How do you know you checked a different configuration option during installation?
  • What about those questions you answer when running some setup… what if you answer differently?
  • You could potentially forget to install a program, or the wrong version of it.

The problem with manually installing the same stuff on multiple machines isn’t only the time-sink from installation.  You also have potential for forgetting a piece of software or clicking a wrong configuration option.

Unfortunately, those types of errors usually don’t become apparent until later when some application or service is run… and then fails.  It is much better to catch it during installation… and even better to never occur in the first place.

Introducing Ansible

Laptop

Ansible provides a way to write a YAML file that provides instructions on installing software.

Want to source control your installation configuration?  You can do it with using those YAML files.

In addition, you can provision multiple IP addresses in another YAML file and run an Ansible playbook to install those programs on multiple machines… with one command.

All that’s required is SSH access into those machines.  There’s even a way to do it on a Windows client (using Windows remote management).

So why might you use Ansible?

  • You want to put your environment within source control (so you can restore it on other machines or on the same machine in the future)
  • Multiple servers need that same environment, and you don’t want to spend time doing it a thousand times
  • A command needs to be run on multiple machines (Ansible can run commands in bash/Powershell in addition to installing things)

If you have any of these use cases, consider learning this automation tool.

Conclusion

Stop wasting time if you are manually installing software on lots of machines.  There are automated solutions to this problem.

Ansible is just one of them.  Puppet, Chef, and Salt are all alternatives.  I’m only familiar with Ansible, but that’s not to say another solution might be appropriate.

Invest some time in learning one of these automation frameworks in order to save yourself lots of time in the future.  Not only will you make yourself more efficient, but you will also be able to add another skill to your resume!

Please follow and like us:
error

Leave a Reply

avatar
  Subscribe  
Notify of