Adding IT Policy Extensions

Prerequisites: You must have a Windows PowerShell (.ps1) or Linux Bash Shell (.sh) script file ready. For script requirements, see Supported Formats for IT Policy Extension Scripts. Confidential scripts that you do not want to upload must be available in an Amazon S3 bucket. See Storage Requirements for Confidential IT Policy Extension Scripts.

The first step in implementing an IT policy extension is to add it to Ansys Gateway powered by AWS, making it available to be configured for deployment.

  1. On the main toolbar, click to display the Administration menu.
  2. In the navigation pane, select IT policy extensions.
  3. On the IT policy extensions page, click Add IT policy extension.
  4. In the Add Policy Extension dialog:
    1. For Script type, select either Windows PowerShell (.ps1) or Linux Bash (.sh).
      Note: Make sure that PowerShell scripts use CRLF for line endings, and Bash scripts use LF for line endings.
    2. Specify the script to be run in one of two ways:
      • If the script is confidential and you do not want it to be stored outside of your organization's AWS environment, enable IT policy extension is confidential and then specify the full path of the script file in the Script location (URL) field.

        For details on the storage of confidential scripts, see Storage Requirements for Confidential IT Policy Extension Scripts. To ensure that Ansys Gateway powered by AWS can access the scripts, see Permissions Required to Allow Access to Confidential IT Policy Extension Scripts.

      • If the script is not confidential, click Upload and then select the script to upload to Ansys Gateway powered by AWS. The content of the selected script is loaded into the preview window.

        Note: In the preview window, the script is read-only and cannot be edited.
    3. If the script is a Linux Bash Shell (.sh) script, specify the resource types to which the policy should be applied: Virtual desktops and/or Autoscaling clusters (head node).

      Windows PowerShell (.ps1) scripts apply to Windows virtual desktops only.

    4. In the Name field, specify a name for the IT policy extension which makes it easy to identify.
    5. Under Advanced options, optionally specify the following settings:
      • Timeout limit (seconds). The maximum time the script is allowed to run before it is stopped. If a timeout occurs, another attempt may be made if there are retry attempts remaining.
      • Retry attempts. The maximum number of times to retry running the script should the initial attempt fail.
      • Description. An optional description of the IT policy extension. If a description is specified, an info icon will be displayed next to the policy extension name on the IT policy extensions page. When a user moves their cursor over the icon, the description is displayed.
    6. Review or specify script parameters:
      • If you uploaded a script, any parameters defined in the script are extracted and displayed in the Parameters section. For example:

      • If you are using a confidential script that is stored remotely, Ansys Gateway powered by AWS is unable to extract parameters from the script. You must manually add parameters that you want to use for script execution. To add a parameter, click Add Parameter and then specify the parameter name.

      Note: Input values for named parameters are specified when you create a configuration that uses the IT policy extension.
    7. Click Add.

      The addition is confirmed.

    8. To deploy the IT policy extension when a resource is created, you must create a configuration that uses the IT policy extension. To proceed with creating a configuration, click Go to configurations. For guidance on creating a configuration, see Configuring the Deployment of IT Policy Extensions.