Subscribe

Provisioning Mgr custom post-provisioning scripts

Hi All,

I would like to create a custom provisioning script for Provisioning Mgr that sets some specific volume options, but I'm having trouble finding any information/documentation on exactly how to do this.

Does the post-provisioning script:

  1. Run from the OnCommand server or from the workstation where NMC is installed?
  2. Have to be scripted in a way that it rsh/ssh onto the controller and then run each command for the target volume etc?
  3. Is there a list anywhere of the variables required?

If anyone has an example of a post-provisioning script they would like to share, as well as the syntax which is used in the provisioning policy's post-provisioning command field, it would be greatly appreciated.

Many thanks,

John

Re: Provisioning Mgr custom post-provisioning scripts

HI John,

The post provsioning script specified in the provisioning policy is run from DFM/OnCommand server. There you specify the path as on DFM server.

For rest of the queries could you please share following info:

- OS on which DFM is running?

- How many controllers and datasets you have?

- What kind of volume options you are trying to set?

Thanks,

-Amir

Re: Provisioning Mgr custom post-provisioning scripts

Hello John,

In addition to the other suggestions, I might recommend that you look at our Workflow Automation tool.  It is designed to do the things you are looking for and I think you will be impressed with its functionality.  There are plenty of samples from which to draw your own workflows.

https://communities.netapp.com/community/interfaces_and_tools/wfa

Eric

Re: Provisioning Mgr custom post-provisioning scripts

Hi Amir,

to answer your Qs:

- DFM will be running on a Windows (2003 or 2008) server/vm.

- This will be used for separate environments across multiple customers, so it could be as small as a HA-pair (2 controllers) to 14+ controllers.

- The key one I'm trying to set is snapshot_clone_dependency, but I'm also looking at having a template/structure so that I can use it for other options/values in the future also.

Thanks for your help!

Cheers,

John

Re: Provisioning Mgr custom post-provisioning scripts

Hi John,

Ok here is what I would like to suggest.

For OnCommand/DFM Server running on Windows 2003/2008 going with Data ONTAP PowerShell Toolkit is one of the option. You can follow below steps to create the script that sets the options that you are looking for without need to ssh/rsh to the controller:

1. On Win2k3 install WinRM 2.0 & PowerShell 2.0. In case of Win2k8R2/Win7 it comes pre-installed.

 

2. Install Data ONTAP PowerShell Toolkit from following location on OC/DFM server:

https://communities.netapp.com/community/products_and_solutions/microsoft/powershell/data_ontap_powershell_toolkit_downloads

 

3. Create a powershell script and save it on DFM server. This script will set the option "snapshot_clone_dependency" on the volume being used for provisioning. Simple PowerShell commands in the script (withput error/exception handling and after successfully connecting to the appropriate controller within the script) would look like:

   

   $vol_name = $ENV:PM_VOLUME_NAME

    Set-NaVolOption $vol_name snapshot_clone_dependency on

 

The volume name is passed to the script as environment variable i.e.$ENV:PM_VOLUME_NAME. You may want to check out other env variables that are avaialble to you inside the script. For detailed list please refer to thread:https://communities.netapp.com/message/52073#52073

Make the script executable.

4. Specify the path to this executable script in the provisioning policy under "Provsisioing Script" tab in NMC or "dfpm policy set provisioning-policy-name-or-id scriptPath=post-provisioning-script-path" command on DFM server.

5. For any specific queryhowtos on PowerShell related issues feel free to reach out to fellow community members on:

http://communities.netapp.com/community/interfaces_and_tools/data_ontap_powershell_toolkit

Now henceforth whenever the provisioning is done using the policy that has this script defined this script will be executed post-provisioning.

HTH,

-Amir