Ansible: a SysAdmin’s secret weapon
So what is Ansible? Simply put it is a very reliable open source automation platform.
I use Ansible for various daily tasks including configuration management, deployment and task automation. These are all vital tasks in web hosting. As a SysAdmin at Wirehive I use Ansible every day to remotely make changes to various servers at different locations. The multi-tier deployment capability is probably the most valuable aspect of using Ansible for me. The software is used by many industry giants as it enables them to automate in hours instead of minutes. These include: NASA; Twitter; EA; and Spotify.
So what are the advantages of using Ansible?
Easier to manage
I first became aware of Ansible in 2013 as an open source project started in 2012 to iron out some issues in configuration management. Ansible was appealing because it was simple to use, making automation much faster to implement using a human readable language. The software is agentless, using ssh which is generally more efficient and secure to manage. This makes my job much easier as I am able to deploy apps, manage configuration and orchestrate all from one location.
Easier to configure
By using ssh, Ansible is much easier to configure than its competitors. The ‘human readable’ code YAML (A simple mark-up language) can be modified in any text editor. The advantages of this are: it is easy to read; easy to manipulate; and easy to understand, even for non-tech people.
It basically allows you to create your automation jobs in near plain English. For a more detailed breakdown on language please check out the Ansible docs page.
Finally because Ansible runs over ssh to connect to Linux it also includes remote users on the server. This provides secure communication so you don’t need to store the password locally on the server running Ansible.
Ansible has some unique features:
- It can control networking hardware including load balancers, switches and firewalls
- Communicate with any ssh device.
- Manage storage devices exposing an API or shell interface
However, Ansible’s main advantage and the thing that makes it so useful in my opinion, is the ability to orchestrate numerous tiers together rather than separately. It simplifies my tasks meaning I can give more time and dedication to helping our customers.
So are there any downsides?
The only negative element of Ansible stems from constantly upgrading to the latest version. We tend to update the software and the tools available constantly which involves a lot of re-writing. In fact once we have finished an upgrade it is often time for another! We take the time to do this because it enables Ansible to run at optimum speed which keeps our systems running efficiently ensuring a better, more reliable service to our customers.
My top tips for using Ansible
My top tips for using Ansible are basic but very effective.
- Keep things simple – keep your configuration simple because things can get complicated fast.
- Make use of short and custom commands – using short or custom commands can help make life a lot easier as well as saving you a lot of time long term.
I will be attending AnsibleFest 2015 this year in London for the latest updates on the project. We have used Ansible from an early stage and it has been great to see them grow and adapt, becoming stronger and more widely used. I’ll report back on my findings later in February.
For more information about AnsibleFest 2015 click here.