Forge Home

netapp

NetApp Network Device support for Puppet

15,137 downloads

8,750 latest version

3.8 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.5.0 (latest)
  • 0.4.4
  • 0.4.3
  • 0.4.2
  • 0.4.1
  • 0.4.0
  • 0.3.0
  • 0.2.4
  • 0.2.3
  • 0.2.2
  • 0.2.1
  • 0.2.0 (deleted)
  • 0.1.2 (deleted)
  • 0.1.1 (deleted)
  • 0.1.0
released Sep 14th 2015

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'fatmcgav-netapp', '0.5.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add fatmcgav-netapp
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install fatmcgav-netapp --version 0.5.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

fatmcgav/netapp — version 0.5.0 Sep 14th 2015

NetApp network device module

N.B. Please note that this module is no longer being maintained.
For the supported version, please see the Puppetlabs-NetApp

Coverage Status

Table of Contents

Overview

The NetApp network device module is designed to add support for managing NetApp filer configuration using Puppet and its Network Device functionality.

The Netapp network device module has been written and tested against NetApp ONTAP 8.0.4 7-mode and NetApp ONTAP 8.2 C-Mode However it may well be compatible with other ONTAP versions.

Features

The following items are supported:

  • Creation, modification and deletion of volumes, including auto-increment, snapshot schedules and volume options.
  • Creation, modification and deletion of QTrees.
  • Creation, modification and deletion of NFS Exports, including NFS export security.
  • Creation, modification and deletion of users, groups and roles.
  • Creation, modification and deletion of Quotas.
  • Creation of snapmirror relationships.
  • Creation of snapmirror schedules.

Requirements

Since we can not directly install a puppet agent on the NetApp filers, it can either be managed from the Puppet Master server, or through an intermediate proxy system running a puppet agent. The requirement for the proxy system:

  • Puppet 2.7.+
  • NetApp Manageability SDK Ruby libraries

NetApp Manageability SDK

The NetApp Ruby libraries are contained within the NetApp Manageability SDK, currently at v5.0, which is available to download directly from NetApp. Please note you need a NetApp NOW account in order to be able to download the SDK.

Once you have downloaded and extracted the SDK, the following files need to be copied onto your Puppet Master: ../lib/ruby/NetApp > [module dir]/netapp/lib/puppet/util/network_device/netapp/

Once the files have been copied into place on your Puppet Master, a patch needs to be applied to NaServer.rb and NaElement.rb.
The patches can be found under the files directory.
To apply, change into the netapp module root directory and run:

patch lib/puppet/util/network_device/netapp/NaServer.rb < files/NaServer.patch
patch lib/puppet/util/network_device/netapp/NaElement.rb < files/NaElement.patch

This should apply the patch without any errors, as below:

$ patch lib/puppet/util/network_device/netapp/NaServer.rb < files/NaServer.patch
patching file lib/puppet/util/network_device/netapp/NaServer.rb
$ patch lib/puppet/util/network_device/netapp/NaElement.rb < files/NaElement.patch
patching file lib/puppet/util/network_device/netapp/NaElement.rb
$

Usage

Device Setup

In order to configure a NetApp network device, the device type should be netapp. You can either configure the device within /etc/puppet/device.conf or, preferrably, create an individual config file for each device within a subfolder. This is preferred as it allows you to run puppet against individual devices, rather than all devices configured...

In order to run puppet against a single device, you can use the following command:

puppet device --deviceconfig /etc/puppet/device/[device].conf

Example configuration /etc/puppet/device/pfiler01.example.com.conf:

[pfiler01.example.com]
  type netapp
  url https://root:secret@pfiler01.example.com

You can also specify a virtual filer or vserver you want to operate on: Simply provide the connection information for your physical filer and specify an optional path that represents the name of your virtual filer. Example configuration /etc/puppet/device/vfiler01.example.com.conf:

[vfiler01.example.com]
  type netapp
  url https://root:secret@pfiler01.example.com/vfiler01

NetApp operations

As part of this module, there is a defined type called 'netapp::vqe', which can be used to create a volume, add a qtree and create an NFS export. An example of this is:

netapp::vqe { 'volume_name':
  ensure         => present,
  size           => '1t',
  aggr           => 'aggr2',
  spaceres       => 'volume',
  snapresv       => 20,
  autoincrement  => true,
  persistent     => true
}

This will create a NetApp volume called v_volume_name with a qtree called q_volume_name. The volume will have an initial size of 1 Terabyte in Aggregate aggr2. The space reservation mode will be set to volume, and snapshot space reserve will be set to 20%. The volume will be able to auto increment, and the NFS export will be persistent.

You can also use any of the types individually, or create new defined types as required.

Type/Provider Support

This module supports both NetApp filers operating in both 7-Mode and Cluster-Mode. The table below outlines what modes are supported by what types/providers.

Resource 7-Mode supported CMode supported
netapp_aggregate No Yes
netapp_cluster_id No Yes
netapp_cluster_peer No Yes
netapp_export_policy No Yes
netapp_group Yes No
netapp_igroup No Yes
netapp_license No Yes
netapp_lif No Yes
netapp_lun No Yes
netapp_lun_map No Yes
netapp_nfs_export Yes No
netapp_notify Yes Yes
netapp_qtree Yes Yes
netapp_quota Yes Yes
netapp_role Yes No
netapp_snapmirror Yes Yes
netapp_user Yes No
netapp_volume Yes Yes
netapp_vserver No Yes
netapp_vserver_option No Yes

Contributors

Thanks to the following people who have helped with this module:

  • Stefan Schulte

TODO

The following items are yet to be implemented:

  • Data Fabric Manager support
  • Support adding/deleting/modifying cifs shares
  • LDAP and/or AD configuration
  • ???

Development

The following section applies to developers of this module only.

Testing

You will need to install the NetApp Manageability SDK Ruby libraries for most of the tests to work. How to obtain these files is detailed in the NetApp Manageability SDK section above.