Skip to main content
FlexPod

DR workflow

Contributors

The sequence of steps are as follows:

  1. Define the workflow.

    • Create a short, user-friendly name for the workflow, such as Disaster Recovery Workflow.

  2. Define the workflow input. The inputs we take for this workflow include the following:

    • Volume options (volume name, mount path)

    • Volume capacity

    • Data center associated with the new datastore

    • Cluster on which the datastore is hosted

    • Name for the new datastore to create in vCenter

    • Type and version of the new datastore

    • Name of the Terraform organization

    • Terraform workspace

    • Description of the Terraform workspace

    • Variables (sensitive and nonsensitive) required to execute Terraform configuration

    • Reason for starting the plan

  3. Add the workflow tasks.

    The tasks related to operations in FlexPod include the following:

    • Create volume in FlexPod.

    • Add storage export policy to the created volume.

    • Map the newly created volume to a datastore in VMware vCenter.

      The tasks related to creating Cloud Volumes ONTAP cluster:

    • Add Terraform workspace

    • Add Terraform variables

    • Add Terraform sensitive variables

    • Start new Terraform plan

    • Confirm Terraform run

  4. Validate the workflow.

Procedure 1: Create the workflow

  1. Click Orchestration from the left navigation pane and click Create Workflow.

  2. In the General tab:

    1. Provide the display name (Disaster Recovery Workflow).

    2. Select the organization, set tags, and provide a description.

  3. Click Save.

    Screenshot showing the variable input screen.

Procedure 2. Create a new volume in FlexPod

  1. Go to the Designer tab and click Tasks from the Tools section.

  2. Drag and drop the Storage > New Storage Volume task from the Tools section into the Design area.

  3. Click New Storage Volume.

    Screenshot showing the New Storage Volume.

  4. In the Task Properties area, click the General tab. Optionally, you can change the name and description for this task. In this example, the name of the task is Create Volume in FlexPod.

    Screenshot showing a new connection.

  5. In the Task Properties area, click Inputs.

  6. Click Map in the Storage Device field.

    Screenshot showing the mapping step.

  7. Choose Static Value and click Select Storage Device.

  8. Click the storage target added and click Select.

    Screenshot showing how to select a storage target.

  9. Click Map.

    Screenshot showing Map Task Input.

  10. Click Map in the Storage Vendor Virtual Machine field.

    Screenshot showing the Storage Vendor Virtual Machine field.

  11. Choose Static Value and click Select Storage Virtual Machine.

    Screenshot showing how to select a Storage Virtual Machine.

  12. Select the storage virtual machine where the volume needs to be created and click Select.

    Screenshot showing the storage virtual machine on which the volume needs to be created.

  13. Click Map.

    Screenshot showing the mapping step.

  14. Click Map in the Storage Vendor Aggregate field.

    Screenshot showing the Storage Vendor Aggregate field.

  15. Choose Static Value and click Select Storage Aggregate. Choose the aggregate and click Select.

    Screenshot showing how to select a storage aggregate.

  16. Click Map.

  17. Click Map in the Storage Vendor Volume Options field.

  18. Choose Direct Mapping and click Workflow Input.

    Screenshot showing the map task input.

  19. In the Add Input wizard, complete the following steps:

    1. Provide a display name and reference name (optional).

    2. Make sure that Storage Vendor Volume Options is selected for the Type.

    3. Click Set Default Value and Override.

    4. Click Required.

    5. Set the Platform Type to NetApp Active IQ Unified Manager.

    6. Provide a default value for the created volume under Volume.

    7. Click NFS. If NFS is set, an NFS volume is created. If this value is set to false, a SAN volume is created.

    8. Provide a mount path and click Add.

      Screenshot showing the Add Workflow input screen.

  20. Click Map.

  21. Click Map in the Volume Capacity field.

  22. Choose Direct Mapping and click Workflow Input.

  23. Click Input Name and Create Workflow Input.

    Screenshot showing how to create a name in teh Map Task Input screen.

  24. In the Add Input wizard:

    1. Provide a display name and a reference name (optional).

    2. Click Required.

    3. For Type, select Storage Capacity.

    4. Click Set Default Value and Override.

    5. Provide a default value for the volume size and unit.

    6. Click Add.

      Screenshot show data input for the Add Input wizard.

  25. Click Map.

  26. With Connector, create a connection between the Start and Create Volume in FlexPod tasks, and click Save.

    Error: Screenshot show how to create a connection between the Start and Create Volume in FlexPod tasks.

    Note Ignore the error for now. This error displays because there is no connectivity between the tasks Create Volume in FlexPod and Success which is required to specify the successful transition.

Procedure 3: Add storage export policy

  1. Go to the Designer tab and click Tasks from the Tools section.

  2. Drag and drop the Storage > Add Storage Export Policy to Volume task from the Tools section in the Design area.

  3. Click Add Storage Export Policy to Volume. In the Task Properties area, click the General tab. Optionally, you can change the name and description for this task. In this example, the name of the task is Add Storage Export Policy.

  4. Use Connector to make a connection between the tasks Create Volume in FlexPod and Add Storage Export Policy. Click Save.

    Screenshot showing how to make a connection between the tasks Create Volume in FlexPod and Add Storage Export Policy.

  5. In the Task Properties area, click Inputs.

  6. Click Map in the Storage Device field.

    Screenshot showing the mapping step.

  7. Choose Static Value and click Select Storage Device. Select the same storage target added while creating the previous task of creating a new storage volume.

  8. Click Map.

    Screenshot showing mapping step part 2.

  9. Click Map in the Storage Vendor Virtual Machine field.

  10. Choose Static Value and click Select Storage Virtual Machine. Select the same storage virtual machine added while creating the previous task of creating a new storage volume.

    Screenshot showing how to choose a Static Value and click Select Storage Virtual Machine.

  11. Click Map.

  12. Click Map in the Volume field.

  13. Click Task Name and then click Create Volume in FlexPod. Click Output Name and then Volume.

    Note In Cisco Intersight Cloud Orchestrator, you can provide the output of a previous task as the input for a new task. In this example, the Volume details were provided from the Create Volume in FlexPod task as an input for the task Add Storage Export Policy.

    Screenshot showing how to provide the output of a previous task as the input for a new task.

  14. Click Map.

  15. Click Map in the Export Policy field.

  16. Choose Static Value and click Select Export Policy. Select the export policy created.

    Screenshot

  17. Click Map and then Save.

    Note This completes addition of an export policy to the volume. Next, you create a new datastore mapping the created volume.

Procedure 4: Map FlexPod volume to datastore

  1. Go to the Designer tab and click Tasks from the Tools section.

  2. Drag and drop the Virtualization > New Hypervisor Datastore task from the Tools section in the Design area.

  3. Use Connector to make a connection between the Add Storage Export Policy and New Hypervisor Datastore tasks. Click Save.

    Screenshot

  4. Click New Hypervisor Datastore. In the Task Properties area, click the General tab. Optionally, you can change the name and description for this task. In this example, the name of the task is Map volume to Datastore.

    Screenshot

  5. In the Task Properties area, click Inputs.

  6. Click Map in the Hypervisor Manager field.

  7. Choose Static Value and click Select Hypervisor Manager. Click the VMware vCenter target.

    Screenshot

  8. Click Map.

    Screenshot

  9. Click Map in the Data center field. This is the data center associated with the new datastore.

  10. Choose Direct Mapping and click Workflow Input.

  11. Click Input Name and then Create Workflow Input.

    Screenshot

  12. In the Add Input wizard, complete the following steps:

    1. Provide a display name and reference name (optional).

    2. Select Datacenter as the type.

    3. Click Set Default Value and Override.

    4. Click Select Datacenter.

    5. Click the data center associated with the new datastore and then click Select.

      Screenshot

      • Click Add.

  13. Click Map.

  14. Click Map in the Cluster field.

  15. Choose Direct Mapping and click Workflow Input.

    Screenshot

  16. In the Add Input wizard, complete the following steps:

    1. Provide a display name and reference name (optional).

    2. Click Required.

    3. Select Cluster as the type.

    4. Click Set Default Value and Override.

    5. Click Select Cluster.

    6. Click the cluster associated with the new datastore.

    7. Click Select.

      Screenshot

    8. Click Add.

  17. Click Map.

  18. Click Map in the Host field.

    Screenshot

  19. Choose Static Value and click the host on which the datastore will be hosted. If a cluster is specified, then the host is ignored.

    Screenshot

  20. Click Select and Map.

  21. Click Map in the Datastore field.

  22. Choose Direct Mapping and click Workflow Input.

  23. Click Input Name and Create Workflow Input.

    Screenshot

  24. In the Add Input wizard:

    1. Provide a display name and reference name (optional).

    2. Click Required.

    3. Click Set Default Value and Override.

    4. Provide a default value for the datastore and click Add.

      Screenshot

  25. Click Map.

  26. Click Map in the input field Type of Datastore.

  27. Choose Direct Mapping and click Workflow Input.

  28. Click Input Name and Create Workflow Input.

    Screenshot

  29. In the Add Input wizard, complete the following steps:

    1. Provide a display name and reference name (optional) and click Required.

    2. Make sure to select the type Types of Datastore and click Set Default Value and Override.

      Screenshot

    3. Provide the Remote Path. This is the remote path of the NFS mount point.

    4. Provide the host names or IP addresses of remote NFS server in NFS Server Address.

    5. Click the Access Mode. The Access mode is for the NFS server. Click read-only if volumes are exported as read-only. Click Add.

      Screenshot

  30. Click Map.

  31. Click Save.

    Screenshot

This completes the task of creating the datastore. All the tasks performed in the on- premises FlexPod Datacenter are completed.

Screenshot

Procedure 5: Add a new Terraform workspace

  1. Go to the Designer tab and click Tasks from the Tools section.

  2. Drag and drop the Terraform Cloud > Add Terraform Workspace task from the Tools section in the Design area.

  3. Use Connector to connect the Map volume to Datastore and Add Terraform Workspace tasks and click Save.

  4. Click Add Terraform Workspace. In the Task Properties area, click the General tab. Optionally, you can change the Name and Description for this task.

    Screenshot

  5. In the Task Properties area, click Inputs.

  6. Click Map in the input field Terraform Cloud Target.

  7. Choose Static Value and click Select Terraform Cloud Target. Select the Terraform Cloud for Business account that was added as explained in Configure Cisco Intersight Service for HashiCorp Terraform.”.

    Screenshot

  8. Click Map.

  9. Click Map in the input field Terraform Organization Name.

  10. Choose Static Value and then click Select Terraform Organization. Select the name of the Terraform Organization that you are part of in your Terraform Cloud for Business account.

    Screenshot

  11. Click Map.

  12. Click Map in the Terraform Workspace Name field. This is the new workspace in the Terraform Cloud for Business account.

  13. Choose Direct Mapping and click Workflow Input.

  14. Click Input Name and Create Workflow Input.

    Screenshot

  15. In the Add Input wizard, complete the following steps:

    1. Provide a display name and reference name (optional).

    2. Click Required.

    3. Make sure to select String for Type.

    4. Click Set Default Value and Override.

    5. Provide a default name for workspace.

    6. Click Add.

      Screenshot

  16. Click Map.

  17. Click Map in the Workspace Description field.

  18. Choose Direct Mapping and click Workflow Input.

  19. Click Input Name and Create Workflow Input.

    Screenshot

  20. In the Add Input wizard, complete the following steps:

    1. Provide a display name and reference name (optional).

    2. Make sure to select String for Type.

    3. Click Set Default Value and Override.

    4. Provide a workspace description and click Add.

      Screenshot

  21. Click Map.

  22. Click Map in the Execution Mode field.

  23. Choose Static Value, click Execution Mode, and then click remote.

    Screenshot

  24. Click Map.

  25. Click Map in the Apply Method field.

  26. Choose Static Value and click Apply Method. Click Manual Apply.

    Screenshot

  27. Click Map.

  28. Click Map in the User Interface field.

  29. Choose Static Value and click User Interface. Click Console UI.

    Screenshot

  30. Click Map.

  31. Click Map in the input field and select your workflow.

  32. Select Static Value, and click Choose Your Workflow. Click Version Control Workflow.

    Screenshot

  33. Provide the following GitHub repository details:

    1. In Repository Name, enter the name of the repository detailed in the section “Set up environment prerequisites”.

    2. Provide the OAuth Token ID as detailed in the section “Set up environment prerequisites”.

    3. Select the Automatic Run Triggering option.

      Screenshot

  34. Click Map.

  35. Click Save.

This completes the task of creating a workspace in a Terraform Cloud for Business account.

Procedure 6: Add non-sensitive variables to workspace

  1. Go to the Designer tab and click the Workflows from Tools section.

  2. Drag and drop the Terraform > Add Terraform Variables workflow from the Tools section in the Design area.

  3. Use Connector to connect the Add Terraform Workspace and Add Terraform Variables tasks. Click Save.

  4. Click Add Terraform Variables. In the Workflow Properties area, click the General tab. Optionally, you can change the name and description for this task.

    Screenshot

  5. In the Workflow Properties area, click Inputs.

  6. Click Map in the Terraform Cloud Target field.

  7. Choose Static Value and click Select Terraform Cloud Target. Select the Terraform Cloud for Business account that was added as explained in Configure Cisco Intersight Service for HashiCorp Terraform.”.

    Screenshot

  8. Click Map.

  9. Click Map in the *Terraform Organization Name *field.

  10. Choose Static Value and click Select Terraform Organization. Select the name of the Terraform Organization that you are part of in your Terraform Cloud for Business account.

    Screenshot

  11. Click Map.

  12. Click Map in the Terraform Workspace Name field.

  13. Choose Direct Mapping and click Task Output.

  14. Click Task Name and click Add Terraform Workspace.

    Screenshot

  15. Click Output Name and click Workspace Name.

  16. Click Map.

  17. Click Map in the Add Variables Options field.

  18. Choose Direct Mapping and click Workflow Input.

  19. Click Input Name and Create Workflow Input.

    Screenshot

  20. In the Add Input wizard, complete the following steps:

    1. Provide a display name and reference name (Optional).

    2. Make sure to select String for the Type.

    3. Click Set Default Value and Override.

    4. Click Variable Type and then click Non-Sensitive Variables.

  21. In the Add Terraform Variables section, provide the following information:

    • Key. name_of_on-prem-ontap

    • Value. Provide the name of on-premises ONTAP.

    • Description. Name of the on-premises ONTAP.

  22. Click + to add additional variables.

    Screenshot

  23. Add all the Terraform Variables as shown in the following table. You can also provide a default value.

    Terraform variable name Description

    name_of_on-prem-ontap

    Name of the on-premises ONTAP (FlexPod)

    on-prem-ontap_cluster_ip

    The IP address of the storage cluster management interface

    on-prem-ontap_user_name

    Admin username for the storage cluster

    Zone

    GCP region where the working environment will be created

    subnet_id

    GCP subnet id where the working environment will be created

    vpc_id

    The VPC ID where the working environment will be created

    capacity_package_name

    The type of license to use

    source_volume

    The name of the source volume

    source_storage_vm_name

    The name of the source SVM

    destination_volume

    Name of volume on Cloud Volumes ONTAP

    schedule_of_replication

    The default is 1 hour

    name_of_volume_to_create_on_cvo

    Name of the cloud volume

    workspace_id

    The workspace_id where the working environment will be created

    Project_id

    The project_id where the working environment will be created

    name_of_cvo_cluster

    The name of the Cloud Volumes ONTAP working environment

    gcp_service_account

    gcp_service_account of Cloud Volumes ONTAP working environment

  24. Click Map and then Save.

    Screenshot

This completes the task of adding the required Terraform variables to the workspace. Next, add the required sensitive Terraform variables to the workspace. You can also combine both into a single task.

Procedure 7: Add sensitive variables to a workspace

  1. Go to the Designer tab and click Workflows from the Tools section.

  2. Drag and drop the Terraform > Add Terraform Variables workflow from the Tools section in the Design area.

  3. Use Connector to connect the two Add Terraform Workspace tasks. Click Save.

    Note A warning appears indicating that the two tasks have the same name. Ignore the error for now because you change the task name in the next step.
  4. Click Add Terraform Variables. In the Workflow Properties area, click the General tab. Change the name to Add Terraform Sensitive Variables.

    Screenshot

  5. In the Workflow Properties area, click Inputs.

  6. Click Map in the Terraform Cloud Target field.

  7. Choose Static Value and click Select Terraform Cloud Target. Select the Terraform Cloud for Business account that was added in the section Configure Cisco Intersight Service for HashiCorp Terraform.”

  8. Click Map.

  9. Click Map in the Terraform Organization Name field.

  10. Choose Static Value and click Select Terraform Organization. Select the name of the Terraform Organization that you are part of in your Terraform Cloud for Business account.

  11. Click Map.

  12. Click Map in the Terraform Workspace Name field.

  13. Choose Direct Mapping and click Task Output.

  14. Click Task Name and then click Add Terraform Workspace.

  15. Click Output Name and click the output Workspace Name.

  16. Click Map.

  17. Click Map in the Add Variables Options field.

  18. Choose Direct Mapping and then click Workflow Input.

  19. Click Input Name and Create Workflow Input.

  20. In the Add Input wizard, complete the following steps:

    1. Provide a display name and reference name (optional).

    2. Make sure to select Terraform Add Variables Options for the type.

    3. Click Set Default Value.

    4. Click Variable Type and then click Sensitive Variables.

    5. Click Add.

      Screenshot

  21. In the Add Terraform Variables section, provide the following information:

    • Key. cloudmanager_refresh_token.

    • Value. Input the refresh token for NetApp Cloud Manager API operations.

    • Description. Refresh token.

      Note For more information about obtaining a refresh token for the NetApp Cloud Manager API operations, see the section “Set up environment prerequisites.”

      Screenshot

  22. Add all the Terraform sensitive variables as shown in the table below. You can also provide a default value.

    Terraform sensitive variable name Description

    cloudmanager_refresh_token

    Refresh token. Obtain it from:

    connector_id

    The client ID of the Cloud Manager Connector. Obtain it from

    cvo_admin_password

    The admin password for Cloud Volumes ONTAP

    on-prem-ontap_user_password

    Admin password for the storage cluster

  23. Click Map.This completes the task of adding the required Terraform sensitive variables to workspace. Next, start a new Terraform plan in the configured workspace.

Procedure 8: Start a new Terraform plan

  1. Go to the Designer tab and click Tasks from the Tools section.

  2. Drag and drop the Terraform Cloud > Start New Terraform Plan task from the Tools section on the Design area.

  3. Use Connector to connect between the tasks Add Terraform Sensitive Variables and Start New Terraform Plan tasks. Click Save.

  4. Click Start New Terraform Plan. In the Task Properties area, click the General tab. Optionally, you can change the name and description for this task.

    Screenshot

  5. In the Task Properties area, click Inputs.

  6. Click Map in the Terraform Cloud Target field.

  7. Choose Static Value and click Select Terraform Cloud Target. Select the Terraform Cloud for Business account that was added in the section “Configuring Cisco Intersight Service for HashiCorp Terraform.”

  8. Click Map.

  9. Click Map in the Workspace ID field.

  10. Choose Direct Mapping and click Task Output.

  11. Click Task Name and then click Add Terraform Workspace.

    Screenshot

  12. Click Output Name, Workspace ID, and then Map.

  13. Click Map in the Reason for starting plan field.

  14. Choose Direct Mapping and then click Workflow Input.

  15. Click Input Name and then Create Workflow Input.

  16. In the Add Input wizard, complete the following steps:

    1. Provide a display name and reference name (optional).

    2. Make sure to select String for the Type.

    3. Click Set Default Value and Override.

    4. Input a default value for Reason for starting plan and click Add.

      Screenshot

  17. Click Map.

  18. Click Map in the Plan Operation field.

  19. Choose Static Value and click Plan Operation. Click new plan.

    Screenshot

  20. Click Map.

  21. Click Save.

This completes the task of adding a Terraform Plan in Terraform Cloud for Business account. Next, create a sleep task for a few seconds.

Procedure 9: Sleep task for synchronization

Terraform Apply requires RunID, which is generated as a part of the Terraform Plan task. Waiting a few seconds between the Terraform Plan and Terraform Apply actions avoids timing issues.

  1. Go to the Designer tab and click Tasks from the Tools section.

  2. Drag and drop the Core Tasks > Sleep Task from the Tools section in the Design area.

  3. Use Connector to connect the tasks Start New Terraform Plan and Sleep Task. Click Save.

    Screenshot

  4. Click Sleep Task. In the Task Properties area, click the General tab. Optionally, you can change the name and description for this task. In this example, the name of the task is Synchronize.

  5. In the Task Properties area, click Inputs.

  6. Click Map in the Sleep Time in Seconds field.

  7. Choose Static Value and input 15 in for the Sleep Time in Seconds.

    Screenshot

  8. Click Map.

  9. Click Save.

This completes the sleep task. Next, create the last task of this workflow, confirming and applying the Terraform Run.

Procedure 10: Confirm and apply Terraform Run

  1. Go to the Designer tab and click Tasks from the Tools section.

  2. Drag and drop the Terraform Cloud > Confirm and Apply Terraform Run task from the Tools section in the Design area.

  3. Use connector to connect the tasks Synchronize and Confirm and Apply Terraform Run. Click Save.

  4. Click Confirm and Apply Terraform Run. In the Task Properties area, click the General tab. Optionally, you can change the name and description for this task.

    Screenshot

  5. In the Task Properties area, click Inputs.

  6. Click Map in the Terraform Cloud Target field.

  7. Choose Static Value and click Select Terraform Cloud Target. Select the Terraform Cloud for Business account that was added in Configure Cisco Intersight Service for HashiCorp Terraform.”

  8. Click Map.

  9. Click Map in the Run ID field.

  10. Choose Direct Mapping and click Task Output.

  11. Click Task Name and click Start New Terraform Plan.

  12. Click Output Name and then click Run ID.

    Screenshot

  13. Click Map.

  14. Click Save.

  15. Click Auto Align Workflow so that all tasks are aligned. Click Save.

    Screenshot

This completes the Confirm and Apply Terraform Run task. Use Connector to connect between the Confirm and Apply Terraform Run task and the Success and Failed tasks.

Procedure 11: Import a Cisco-built workflow

Cisco Intersight Cloud Orchestrator enables you to export workflows from a Cisco Intersight account to your system and then import them to another account. A JSON file was created by exporting the built workflow that can be imported to your account.

A JSON file for the workflow component is available in the GitHub repository.