Businesses want simple, automated ways to manage their complex data infrastructure.  Ansible makes this easier with features like modules, roles and playbooks.  This post discusses the two new Ansible roles that have been published for the ONTAP Select product to help with automation for the customers.

Installing an ONTAP Select (OTS) cluster to manage your storage is already simple and straight forward, with an easy to use Deploy engine to help with the process.  However, for customers wanting to take the next step, we now have Ansible roles to automate the installation process, making it even simpler to get an ONTAP Select cluster up and running.  In addition, for sites interested in large scale installations of ONTAP Select, automation is essential.  Ansible roles for ONTAP Select installation enables you to do large scale Select deployment with ease.

An Ansible role is a logical collection of tasks, templates, handlers and variables in a standardized file structure to facilitate reuse and modularize functionality that can be independently used. A role can be easily included in a playbook for execution, along with the list of hosts to run on.  To get started with Ansible, follow NetApp’s Ansible expert David Blackwell’s blog posts on his five part series on this topic here: Getting Started with Ansible.  Once you have installed Ansible, updated the necessary modules and understood what playbooks are, you are ready to download OTS roles from NetApp GitHub and create your own playbook and run them to have Select cluster up and running.

The Roles

We have two roles available for ONTAP Select:

na_ots_deploy:

This role downloads the ova file for OTS Deploy, from a local directory path provided as input, onto a vCenter or ESXi host.  Then, it creates and runs the Deploy VM. The role assumes the appropriate ova file exists in the path provided.

This role takes in the input values for vCenter or ESXi host credentials, values pertaining to the Deploy VM creation such as IP, host name, login, password, datastore, network, etc. and the location of the OVA file.  The simplest way to provide these is through a global variables file in YML format and pass this file in the playbook.

The role has a single task, that imports the Deploy OVA file onto the host, creates the VM and runs it.  You can access and download this role from NetApp’s Ansible GitHub here: OTS Deploy role

na_ots_cluster:

This role utilizes the ONTAP Select Deploy APIs and creates and deploys the ONTAP Select cluster.  It assumes that the Deploy VM has been created and is up and running either manually or using the na_ots_deploy role mentioned above.  Also, the role assumes that the Select hosts(s) are appropriately configured with networking and storage required for ONTAP Select cluster.

The role takes in the input values for the vCenter or ESXI credentials, Deploy VM credentials to access the APIs and all the pertaining information required to create the ONTAP Select cluster and the node VM.

The role performs the following tasks:

  • Adding (vcenter or esxi) host credential
  • Getting and registering the host IDs
  • Validate internal network (for multi-node clusters)
  • Create the cluster
  • Configure the nodes
  • Configure the network & storage pool
  • Deploy the cluster

As a result, the role completes with the cluster VM up and running and the Select cluster fully deployed. You can access and download this role from NetApp’s Ansible github here: OTS Select Cluster Creation role

Example Playbook

Below is an example playbook that calls these two ONTAP Select roles.  Note that the input variables are defined in yml files and passed in via “vars_files”.  Find more details in the README files in each of the roles.

– name: Create ONTAP Select deploy from OVA (ESXi)

vars_files:

– vars_deploy.yml                                                               # All Variables

– vars_deploy_pwd.yml                                                     # host_password & deploy_password

hosts: “{{ target_vcenter_or_esxi_host }}”                     # Entry in Ansible ‘hosts’ file

gather_facts: false

connection: ‘local’

roles:

– na_ots_deploy

– name: Create ONTAP Select Cluster

vars_files:

– vars_cluster_test.yml

– vars_cluster_pwd.yml

hosts: “localhost”

gather_facts: false

roles:

– na_ots_cluster

Once the OTNAP Select cluster is created and running using the above roles, you can leverage the rich set of ONTAP Ansible roles available to further automate ONTAP features and functionality.  The available ONTAP roles can be accessed here.  In summary, the ONTAP Select Ansible roles along with ONTAP roles now enable the customers to fully automate their end-to-end workflow to manage their storage with ONTAP Select.

Begin your NetApp Ansible journey with our getting started series here:  Getting Started with Ansible. Checkout our netapp.io for more information on all our open ecosystem projects.  Join our slack channel #configurationmgmt at netapp.io/slack  to collaborate with our Ansible developers.

 

 

Veena Kannan
Technical Marketing Engineer at NetApp

Pin It on Pinterest