Build application templates for your organization

Contributors netapp-tonacki Download PDF of this page

Select one or more of the NetApp-provided "actions" and quickly build an application template that your organization can use to start optimizing the creation of resources.

Quick start

Get started quickly by following these steps, or scroll down to the remaining sections for full details.

Number 1 Verify required prerequisites

  • Before users can create a volume for a Cloud Volumes ONTAP, on-premises ONTAP, or Azure NetApp Files system using a template, make sure they have access to an appropriate working environment where the volume will be deployed.

  • If you plan to add a Cloud service "action" to your template, such as Cloud Backup or Cloud Data Sense, ensure that the service is active and licensed in your environment.

Number 2 Launch the Application Templates service

Select the AppTemplate service, click the Editor tab, and select the template.

Number 3 Build the template by selecting "actions" and defining parameters

Follow the creation steps and define the actions that will be performed by the template.

Requirements

Read the following requirements to make sure that you have a supported configuration.

  • If you don’t already have a Connector, see how to create Connectors for AWS, Azure, and GCP.

  • When creating a Cloud Volumes ONTAP volume template, make sure you have a Cloud Volumes ONTAP working environment available for your users. See how to launch a Cloud Volumes ONTAP system in AWS, Azure, or in GCP.

  • When creating an on-premises ONTAP volume template, make sure you have an on-premises ONTAP working environment available for your users. See how to discover an on-premises ONTAP system in Cloud Manager.

  • When creating an Azure NetApp Files volume template, make sure you have an Azure NetApp Files working environment available for your users. See how to create an Azure NetApp Files working environment in Cloud Manager.

  • If you plan to enable Cloud Backup in the template, ensure that your environment has an active and licensed Cloud Backup service.

  • If you plan to enable Cloud Data Sense in the template, ensure that your environment has an active and licensed Cloud Data Sense service.

  • If you plan to enable Replication in the template, and the template is for an on-premises ONTAP volume, the ONTAP cluster must have an active SnapMirror license.

Template features

There are certain features you can use when building a template to help your users to easily create resources from the template.

Special template controls

Before you start creating your template, you should understand some special options that you can set when pre-populating a value for a parameter in a template.

A screenshot of the editable and drift on options that you can set for parameter values.

Editable checkbox

Check this box to let the storage admin override the pre-populated value you have entered in the template. This gives the storage admin a suggestion for what the value should be, but it allows them to customize the value when creating the resource.

When unchecked, the user can’t change the value and the hard-coded value in the template is always used when the admin deploys a resource.

Drift checkbox

Check this box so that Cloud Manager monitors the hard-coded value you entered for a parameter when a resource is created with the template. Later, you can run a Drift Report to see which fields configured with Drift are no longer compliant with the template settings.

When unchecked, the user can change the value to any value after the resource has been created.

For the drift feature to work, after you have defined drift for some parameters in the template, you must enable the drift feature for the template. This is the last step when creating a template. Drift doesn’t work if it is enabled for a parameter but has not been enabled on the template.

Using a regular expression (regex) in fields

There are a few fields within templates that allow you to enter a regex to define the value that your admin can enter in the field; for example "Volume Name" and "Share Name".

A screenshot of using a regex to define the allowed values for a volume name.

As an example, if you enter "^[a-zA-Z][0-9a-zA-Z_]{0,149}$" as the regex for the volume name, it means that "the name should start with an alphabetic character, it can contain only numbers, letters, or the underscore, and it should be 150 or fewer characters in length".

Pass values between template actions

Templates have the ability to use information from a previous action to populate a field in a future action. For example, when defining the name of the volume that will have Cloud Backup functionality enabled, you can instruct the Backup action to use the value the storage admin entered as the name of the volume from the Create Cloud Volumes ONTAP action.

There are three types of information that the AppTemplate service can use:

  • Input value - This is the actual value the storage admin entered into a field in a previous template action.

  • Output value - This is the value Cloud Manager generates after creating a resource from a previous template action.

  • Enter your own value - This is a value that you enter; it is not accessed from a previous action in the template.

For example, to enable compliance scanning on a volume, the Cloud Data Sense service needs both the "volume name" that the storage admin enters (the Input value), and the "volume uuid" that Cloud Manager generates when it creates the volume (the Output value).

The following illustration shows how to enter this information in the Cloud Data Sense action section of the template.

An illustration showing how to use a value entered in a previous action to populate a field in another action.

Use conditions to perform different actions based on logic statements

Conditions tell the template to execute different actions depending on whether the condition is true or false when the storage admin runs the template.

For example, you may have guideline that if a volume has a capacity larger than 50 GB then Cloud Backup is required to be enabled on that volume. If the volume has a smaller capacity, then Cloud Backup is not enabled. You can implement this in your template as shown below.

A screenshot showing how conditions may be used in your template to conditionally enable Cloud Backup.

Conditions consist of two parts:

  • Rules - The item you are checking for being either true or false.

  • And/Or statement - Allows you to use multiple rules to further refine whether additional actions are added.

A Rule is made up of three parts:

Source field - The location from which you will get the value to compare.

  • Get input value from action - The actual value the storage admin entered into a field in a previous template action.

  • Get output value from action - The value Cloud Manager generated after creating a resource from a previous template action.

  • Enter value - This is a value that you enter; it is not accessed from a previous action in the template. This can be a value from a resource that already exists; for example an existing volume.

Operator - The operator used for the comparison. The options are Equal, Not Equal, Greater Than, Less Than, Greater Than or Equal, Less Than or Equal.

Field value - The actual value you are comparing. The options are the same as those for the Source field.

An And/Or statement enables you to conditionally add more actions for users when they run the template based on whether multiple rules are evaluated as True or False. And requires all rules to be true or false, and Or requires just one of the rules needs to be true or false.

When using both an And and Or statement with your rules, the evaluation process follows standard mathematical order where “AND” precedes “OR”. For example:

  • <Rule1> OR <Rule2> AND <Rule3>

    This statement is evaluated in the following order:
    <Rule1> OR (<Rule2> AND <Rule3>)

Examples of creating different types of templates

Create a template for a Cloud Volumes ONTAP volume

See how to provision Cloud Volumes ONTAP volumes for details about all the parameters you need to complete in the Cloud Volumes ONTAP volume template.

For this example we’ll create a template named "CVO volume for databases" and include the following 2 actions:

  • Create Cloud Volumes ONTAP Volume

    Make the volume for the AWS environment, configure it with 100 GB of storage, set the Snapshot Policy to "default", and enable Storage Efficiency.

  • Enable Cloud Backup

    Create daily backups with a retention value of 30 copies.

Steps
  1. Select the AppTemplate service, click the Templates tab, and click Add New Template.

    The Select_a Template page is displayed.

    A screenshot showing how to select the primary action that will be performed using this template.

  2. Select Volume for Cloud Volumes ONTAP + Backup as the type of resource you want to create, and click Get Started.

    The Create Volume in Cloud Volumes ONTAP Action Definition page is displayed.

    A screenshot showing a blank CVO template that you need to fill in.

  3. Action Name: Optionally, enter a customized action name instead of the default value.

  4. Context: Enter the Cloud Volumes ONTAP working environment context; if required.

    When users launch the template from an existing working environment, this information gets filled in automatically.

    When users launch the template from the Templates Dashboard (not in a working environment context), then they need to select the working environment and the SVM where the volume will be created. That’s why these fields are marked as "Editable".

  5. Details: Enter the volume name and size.

    Field Description

    Volume Name

    Click in the field and select one of the 5 options. You can let the admin enter any name by selecting Free Text, or you can specify that the volume name must have a certain prefix or suffix, that it contains certain characters, or that it follows rules from a regular expression (regex) you enter.

    For example, you could specify that "db" be a required prefix, suffix, or contains; requiring the user to add volume names like "db_vol1", "vol1_db", or "vol_db_1".

    Volume Size

    You can specify a range of allowable values, or you can specify a fixed size. This value is in GB. For our example we can add a fixed value 100.

  6. Protection: Choose whether this volume will have Snapshot copies created by selecting "Default" or some other policy, or choose "None" if you do not want to create Snapshot copies.

  7. Usage Profile: Choose whether or not NetApp storage efficiency features are applied to the volume. This includes Thin Provisioning, Deduplication, and Compression. For our example, keep storage efficiency enabled.

  8. Disk Type: Choose the cloud storage provider and the type of disk. For some disk selections you can also select a minimum and maximum IOPS or Throughput (MB/s) value; basically defining a certain Quality of Service (QoS).

  9. Protocol Options: Select NFS or SMB to set the protocol of the volume. And then the provide the protocol details.

    NFS Fields Description

    Access Control

    Choose whether access controls are needed to access the volume.

    Export Policy

    Create an export policy to define the clients in the subnet that can access the volume.

    NFS Version

    Select the NFS version for the volume: either NFSv3 or NFSv4, or you can select both.

    SMB Fields Description

    Share Name

    Click in the field and select one of the 5 options. You can let the admin enter any name (Free Text) or you can specify that the share name must have a certain prefix or suffix, that it contains certain characters, or that it follows rules from a regular expression (regex) you enter.

    Permissions

    Select the level of access to a share for users and groups (also called access control lists, or ACLs).

    Users / Groups

    Specify local or domain Windows users or groups, or UNIX users or groups. If you specify a domain Windows user name, you must include the user’s domain using the format domain\username.

  10. Tiering: Choose the tiering policy that you would like applied to the volume, or set this to "None" if you do not want to tier cold data from this volume to object storage.

    See volume tiering policies for an overview, and see Tiering inactive data to object storage to make sure your environment is set up for tiering.

  11. Click Apply after you have defined the parameters needed for this action.

    If the template values are correctly completed, a green checkmark is added to the "Create Volume in Cloud Volumes ONTAP" box.

  12. Click the Enable Cloud Backup box and the Enable Cloud Backup Action Definition dialog is displayed so you can fill in the Cloud Backup details.

    A screenshot showing additional actions that you can add to the created volume.

  13. Define the backup policy to create daily backups with a 30-day retention value.

  14. Below the Volume Name field there are three fields you use to indicate which volume will have backup enabled. See how to complete these fields.

  15. Click Apply and the Cloud Backup dialog is saved.

  16. Enter the template name CVO volume for databases (for this example) in the top left.

  17. Click Settings & Drift to provide a more detailed description so that this template can be distinguished from other similar templates, and so you can enable Drift for the overall template, and then click Apply.

    Drift allows Cloud Manager to monitor the hard-coded values you entered for parameters when creating this template.

  18. Click Save Template.

Result

The template is created and you are returned to the Templates Dashboard where your new template appears.

Create a template for an Azure NetApp Files volume

Creating a template for an Azure NetApp Files volume is done in the same manner as creating a template for a Cloud Volumes ONTAP volume.

See how to provision Azure NetApp Files volumes for details about all the parameters you need to complete in the ANF volume template.

Steps
  1. Select the AppTemplate service, click the Templates tab, and click Add New Template.

    The Select_a Template page is displayed.

    A screenshot showing how to select the primary action that will be performed using this template.

  2. Select Volume for Azure NetApp Files as the type of resource you want to create, and click Get Started.

    The Create Volume in Azure NetApp Files Action Definition page is displayed.

    A screenshot showing a blank ANF template that you need to fill in.

  3. Action Name: Optionally, enter a customized action name instead of the default value.

  4. Context: Enter the Cloud Volumes ONTAP working environment context; if required.

    When users launch the template from an existing working environment, this information gets filled in automatically.

    When users launch the template from the Templates Dashboard (not in a working environment context), then they need to select the working environment where the volume will be created. That’s why these fields are marked as "Editable".

  5. Details: Enter the details for a new or an existing Azure NetApp Files account.

    Field Description

    NetApp Account Name

    Enter the name you want to use for the account.

    Azure Subscription ID

    Enter the Azure Subscription ID. This is the full ID in a format similar to "2b04f26-7de6-42eb-9234-e2903d7s327".

    Region

    Enter the region using the internal region name.

    Resource Group Name

    Enter the name of the Resource Group you want to use.

    Capacity Pool Name

    Enter the name of an existing capacity pool.

  6. Volume Details: Enter a volume name and size, the VNet and subnet where the volume should reside, and optionally specify tags for the volume.

    Field Description

    Volume Name

    Click in the field and select one of the 5 options. You can let the admin enter any name by selecting Free Text, or you can specify that the volume name must have a certain prefix or suffix, that it contains certain characters, or that it follows rules from a regular expression (regex) you enter.

    For example, you could specify that "db" be a required prefix, suffix, or contains; requiring the user to add volume names like "db_vol1", "vol1_db", or "vol_db_1".

    Volume Size

    You can specify a range of allowable values, or you can specify a fixed size. This value is in GB.

    Subnet

    Enter the VNet and subnet. This value includes the full path, in a format similar to "/subscriptions/<subscription_id>/resourceGroups/<resource_group>/ providers/Microsoft.Network/virtualNetworks/<vpc_name>/subnets/<subhet_name>".

  7. Protocol: Select NFSv3, NFSv4.1, or SMB to set the protocol of the volume. And then the provide the protocol details.

    NFS Fields Description

    Volume Path

    Select one of the 5 options. You can let the admin enter any path by selecting Free Text, or you can specify that the path name must have a certain prefix or suffix, that it contains certain characters, or that it follows rules from a regular expression (regex) you enter.

    Export Policy Rules

    Create an export policy to define the clients in the subnet that can access the volume.

    SMB Fields Description

    Volume Path

    Select one of the 5 options. You can let the admin enter any path by selecting Free Text, or you can specify that the path name must have a certain prefix or suffix, that it contains certain characters, or that it follows rules from a regular expression (regex) you enter.

  8. Snapshot Copy: Enter the Snapshot ID for an existing volume Snapshot if you want this new volume to be created using characteristics from an existing volume.

  9. Click Apply after you have defined the parameters needed for this action.

  10. Enter the name you want to use for the template in the top left.

  11. Click Settings & Drift to provide a more detailed description so that this template can be distinguished from other similar templates, and so you can enable Drift for the overall template, and then click Apply.

    Drift allows Cloud Manager to monitor the hard-coded values you entered for parameters when creating this template.

  12. Click Save Template.

Result

The template is created and you are returned to the Templates Dashboard where your new template appears.

Create a template for an on-premises ONTAP volume

See how to provision on-premises ONTAP volumes for details about all the parameters you need to complete in the on-premises ONTAP volume template.

Steps
  1. Select the AppTemplate service, click the Templates tab, and click Add New Template.

    The Select_a Template page is displayed.

    A screenshot showing how to select the primary action that will be performed using this template.

  2. Select Blank template and click Get Started.

    The Add New Action page is displayed.

    A screenshot showing how to select the primary action from the Add New Action page.

  3. Select Create Volume in On-Premises ONTAP as the type of resource you want to create, and click Apply.

    The Create Volume in On-Premises ONTAP Action Definition page is displayed.

    A screenshot showing a blank onprem ONTAP template that you need to fill in.

  4. Action Name: Optionally, enter a customized action name instead of the default value.

  5. Context: Enter the on-premises ONTAP working environment context; if required.

    When users launch the template from an existing working environment, this information gets filled in automatically.

    When users launch the template from the Templates Dashboard (not in a working environment context), then they need to select the working environment, the SVM, and the aggregate where the volume will be created.

  6. Details: Enter the volume name and size.

    Field Description

    Volume Name

    Click in the field and select one of the 5 options. You can let the admin enter any name by selecting Free Text, or you can specify that the volume name must have a certain prefix or suffix, that it contains certain characters, or that it follows rules from a regular expression (regex) you enter.

    For example, you could specify that "db" be a required prefix, suffix, or contains; requiring the user to add volume names like "db_vol1", "vol1_db", or "vol_db_1".

    Volume Size

    You can specify a range of allowable values, or you can specify a fixed size. This value is in GB. For our example we can add a fixed value 100.

  7. Protection: Choose whether this volume will have Snapshot copies created by selecting "Default" or some other policy, or choose "None" if you do not want to create Snapshot copies.

  8. Usage Profile: Choose whether or not NetApp storage efficiency features are applied to the volume. This includes Thin Provisioning, Deduplication, and Compression. For our example, keep storage efficiency enabled.

  9. Protocol Options: Select NFS or SMB to set the protocol of the volume. And then the provide the protocol details.

    NFS Fields Description

    Access Control

    Choose whether access controls are needed to access the volume.

    Export Policy

    Create an export policy to define the clients in the subnet that can access the volume.

    NFS Version

    Select the NFS version for the volume: either NFSv3 or NFSv4, or you can select both.

    SMB Fields Description

    Share Name

    Click in the field and select one of the 5 options. You can let the admin enter any name (Free Text) or you can specify that the share name must have a certain prefix or suffix, that it contains certain characters, or that it follows rules from a regular expression (regex) you enter.

    Permissions

    Select the level of access to a share for users and groups (also called access control lists, or ACLs).

    Users / Groups

    Specify local or domain Windows users or groups, or UNIX users or groups. If you specify a domain Windows user name, you must include the user’s domain using the format domain\username.

  10. Click Apply after you have defined the parameters needed for this action.

    If the template values are correctly completed, a green checkmark is added to the "Create Volume in On-Premises ONTAP" box.

  11. Enter the template name in the top left.

  12. Click Settings & Drift to provide a more detailed description so that this template can be distinguished from other similar templates, and so you can enable Drift for the overall template, and then click Apply.

    Drift allows Cloud Manager to monitor the hard-coded values you entered for parameters when creating this template.

  13. Click Save Template.

Result

The template is created and you are returned to the Template Dashboard where your new template appears.

Add Backup functionality to a volume

When creating a volume template, you can add in the template that you want to create backups of the volume periodically using the Cloud Backup service. This action is not applicable for Azure NetApp Files volumes.

A screenshot of the page to enable backup functionality for your volumes.

  1. Context: You can enter a working environment Name and storage VM name if you are using this action in a template without first creating a volume. Otherwise, leave these fields as "Editable."

  2. Policy: Define the backup policy to create daily, weekly, or monthly backups with a specific number of backup copies to retain.

  3. Volume Name: Typically the volume is the one created prior to the backup action in the same template. In this case, see how to complete the fields within the volume name to indicate that volume.

  4. Click Apply to save your changes.

Add Data Sense functionality to a volume

When creating a volume template, you can add in the template that you want to scan the volume for compliance and classification using the Cloud Data Sense service.

A screenshot of the page to enable scanning functionality for your volumes.

  1. Context: You can enter a working environment Name if you are using this action in a template without first creating a volume. Otherwise, leave this field as "Editable."

  2. Volume Name: Typically the volume is the one created prior to the Data Sense action in the same template. In this case, see how to complete the fields within the volume name to indicate that volume.

  3. Volume UUID: Data Sense needs the UUID of the volume before it can scan the volume. See how to complete the three fields below the volume name to indicate that volume.

  4. Click Apply to save your changes.

Add Replication functionality to a volume

When creating a volume template, you can add in the template that you want to replicate the data in the volume to another volume using the Replication service. You can replicate data to a Cloud Volumes ONTAP cluster or to an on-prem ONTAP cluster.

This action is not applicable for Azure NetApp Files volumes.

Replication functionality consists of three parts: selecting the source volume, selecting the destination volume, and defining the replication settings. Each section is described below.

  1. Source Details: Enter the details about the source volume you want to replicate:

    A screenshot of the page to define the replication source volume location.

    1. Select the working environment where the volume resides.

    2. Select the storage VM on which the volume resides.

    3. Typically the volume is the one created prior to the replication action in the same template. In this case, see how to complete the fields within the Source Volume Name field to indicate that volume.

    4. Replication requires that the source and destination working environments are connected through their intercluster LIFs. Enter the intercluster LIF IP address for the source working environment.

      To get this information: double-click the working environment, click the menu icon, and click Information.

  2. Destination Details: Enter the details about the destination volume that will be created by the replication operation:

    A screenshot of the page to define the replication destination volume location.

    1. Select the working environment where the volume will be created.

    2. Select the storage VM on which the volume will reside.

    3. Select the aggregate on which the volume will reside.

    4. For the destination volume, click in the field and select one of the 5 options. You can let the admin enter any name by selecting Free Text, or you can specify that the volume name must have a certain prefix or suffix, that it contains certain characters, or that it follows rules from a regular expression (regex) you enter.

    5. Replication requires that the source and destination working environments are connected through their intercluster LIFs. Enter the intercluster LIF IP address for the destination working environment.

    6. When replicating a volume to a Cloud Volumes ONTAP cluster (not to an on-prem ONTAP cluster), you need to specify the Destination Provider (AWS, Azure, or GCP) and the type of disk that will be used for the new volume.

  3. Replication Details: Enter the details about the type and frequency of the replication operation:

    A screenshot of the page to define the replication settings for the relationship.

    1. Enter the maximum rate (in kilobytes per second) at which data can be transferred. You can enter a fix value, or you can provide a minimum and maximum and let the storage admin select a value in that range.

    2. Select the replication policy that you want to use.

    3. Choose a one-time copy or a recurring replication schedule.

  4. Click Apply to save your changes.

What to do after you have created the template

After you have created a template, you should inform your storage administrators to use the template when creating new volumes.

You can point them to Creating resources using templates for details.

Edit or delete a template

You can modify a template if you need to change any of the parameters. After you save your changes, all future resources created from the template will use the new parameter values.

You can also delete a template if you no longer need it. Deleting a template does not affect any of the resources that were created with the template. However, no Drift compliance checking can be done after the template is deleted.

A screenshot showing how to modify a template or delete a template.