Building 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 Cloud Volumes ONTAP or Azure NetApp Files volume using a template, make sure they have access to a Cloud Volumes ONTAP or Azure NetApp Files Working Environment where the volume will be deployed.

  • If you plan to add a Cloud service "action" to your template, such as Cloud Backup, ensure that your environment has an active and licensed Cloud Backup service.

Number 2 Launch the Application Templates service

Select the AppTemplate service 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 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 on Cloud Volumes ONTAP volumes, ensure that your environment has an active and licensed Cloud Backup service.

  • If you plan to enable Cloud Compliance on Cloud Volumes ONTAP or Azure NetApp Files volumes, ensure that your environment has an active and licensed Cloud Compliance service.

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.

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".

Passing 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 two types of information that the AppTemplate service can use from previous actions:

  • 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.

For example, to enable Compliance on a volume, the Cloud Compliance 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 Compliance 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.

Creating 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 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. 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.

  4. 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.

  5. 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.

  6. 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).

  7. Protocol: 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.

  8. Tiering Policy: 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.

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

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

  10. 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.

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

  12. 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.

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

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

  15. Click Template settings if you want to provide a more detailed description so that this template can be distinguished from other similar templates, and then click Apply.

  16. Click Save Template.

Result

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

Creating 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 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. 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.

  4. 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>".

  5. 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.

  6. 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.

  7. Click Next after you have defined the parameters needed for this action.

  8. Click Next as there are no additional Actions available at this time for ANF volumes.

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

  10. Click Template settings if you want to provide a more detailed description so that this template can be distinguished from other similar templates, and then click Apply.

  11. In the future the Configure Drift page will allow you to choose whether the Drift feature should be applied to the template. This will allow Cloud Manager to monitor the hard-coded values you entered for parameters when creating this template.

  12. Click Create Template.

Result

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

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.

Your users should select Add Volume From Template when adding a volume to a Working Environment in the future. The selection is available from the Working Environment page, and from the Volume Details page. See how to provision Cloud Volumes ONTAP volumes or how to provision Azure NetApp Files volumes using templates.

Two screenshots showing how users can create new volumes from a template.

Editing and deleting 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.

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