Ansible modules for NetApp Storage Platforms: Making Configuration Management Awesome with Ansible

I very clearly remember the first time I wished I could automate something. Now although we still do not have a way to automate school homework (sigh), the Ansible modules for NetApp’s Clustered Data ONTAP, SolidFire, and E-Series platforms are finally available!

During NetApp’s Insight Event at Las Vegas (which was awesome by the way), I had some really interesting conversations with customers and partners around how they are either currently using Ansible to significantly reduce configuration time, or how they plan on using it. Ansible’s agentless and easy-to-learn approach to configuration management definitely makes it a personal favorite, and a tool that I want to keep in my superhero utility-belt.

NetApp has had integrations with other automation tools such as Puppet and Chef that you can get more information on HERE. However, over the past few months, we have seen a rise in interest for Ansible modules for NetApp’s storage platforms. This seems to align with the rise in popularity of Ansible in general. Now if you love learning about industry trends and statistics, you should definitely check out the OpenStack User Survey which also highlights this growth in Ansible’s popularity. The latest version of the survey can be accessed here: https://www.openstack.org/assets/survey/October2016SurveyReport.pdf

Getting Started

Alright, let’s talk about how you can get started!

Now before I proceed any further, I’d like to ensure that we’re all on the same page with respect to modules and playbooks. An Ansible Playbook is basically a definition of WHAT your end environment should look like. On the other hand, an Ansible module takes care of HOW Ansible parses your desired state and relays it to the target environment. As an end-user, you will only need to be concerned with writing Playbooks in YAML. You can of course also write your own modules if you need additional features and capabilities. Join our Slack channel and talk to our open-source community to learn more about how you might go about doing this.

The modules for the E-Series platform have been part of the official Ansible project for a few monthsUPDATE: The ONTAP and SolidFire modules are now part of the Ansible project as well! You can get them by installing Ansible v2.3 (when it comes out), or from here: https://github.com/ansible/ansible/tree/devel/lib/ansible/modules/storage/netapp

The Clustered Data ONTAP and SolidFire modules are currently available on GitHub under a fork of the Ansible Extras project. At this point in time (early November 2016), Ansible is under a feature freeze for the current stable version (version 2.2). I believe these modules will roll out pre-packaged with the next release of Ansible (version 2.3). Until then, you can get the NetApp Clustered Data ONTAP modules here: https://goo.gl/Kaki56, and the SolidFire modules here: https://goo.gl/CKq0im.

These modules are built to help automate some of the basic tasks like setting up licensing, creating aggregates and Storage Virtual Machines (SVMs), creating volumes and LUNs, etc. The basic idea is to help you get to your Day-0 configuration as quickly and as reliably as possible. These modules are open-source (GNU GPL3), and it’s pretty simple to extend them or add new ones since the platforms provide the necessary SDKs.

UPDATE: If you have installed Ansible v2.3, please ignore the following step. Once you have downloaded the modules, please ensure that you have copied them in the ./library folder – the root folder being the location for your playbooks.

Writing a playbook is covered in detail in the associated READMEs, but here’s an example of how you’d write one to setup SVMs and FlexVol volumes on the NetApp Clustered Data ONTAP storage platform:

Once you have the playbook, all you need to do is run it:

ansible_cdot

 

I’ve just shown you a simple example that you can use to get the NetApp Clustered Data ONTAP platform ready and waiting for your applications! So go ahead and give it a shot and let us know what you think about the modules. Oh and jump in on our Slack channel if you have ideas, or if you’d like to have a discussion with the awesome members of thePub!

Sumit Kumar on Twitter
Sumit Kumar
Sumit joined NetApp as a Technical Marketing Engineer for OpenStack in May 2015. He has been an active participant in various Openstack meetups, and has presented sessions on various topics in multiple OpenStack forums. He is very excited about the future and potential of OpenStack, Docker containers, and various infrastructure and DevOps tools!

Leave a Reply