Creating a New ActionScript

Before creating an ActionScript, you must have created at least one cluster that is capable of running this particular ActionScript, as described in Creating a New Cluster, Creating a New Training Cluster, Creating a New Notebook Cluster, and Creating a New Deployment Cluster. To create a new ActionScript:

  1. In the ActionScript(s) tab of the Cluster Details screen (see ActionScript(s) Tab), click the Run New ActionScript button.

    The Run ActionScript(s) popup appears.

  2. Enter a name for the ActionScript in the Name field.
  3. Use the Script source pull-down menu to select either Upload script file or Type action commands, as appropriate.
    • If you selected Type action commands, then proceed to Step 4.
    • If you selected Upload script file, then skip to Step 5.
  4. Type or paste one or more bash command(s) into the Command field, and then skip to Step 7.
  5. Either enter the full path to a script file in the Script field or click the Browse button to open a standard Open dialog that allows you to browse to and select the desired ActionScript.
  6. If needed, add any argument(s) in the Arguments field.
  7. If needed, either type the name of a dependent script/file that will be called by the script you uploaded or entered in Steps 3 and 4 in the Dependent scripts/files field. You may also click the Browse button to open a standard OS Open window, and then select one or more script(s) and/or file(s). A preview of each selected item appears below this field; clicking the Magnify icon (magnifying class) expands the selected item for more detailed viewing. See Viewing Dependent Scripts/Files.
  8. By default, an ActionScript will run on all of the virtual nodes in a cluster. However, you can specify one or more role(s) on which this ActionScript will run by clicking the Node Roles pull-down menu to expand the list of virtual node roles in the cluster. You can then:
    • Select one or more unselected role(s) by clicking the desired unselected role(s).
    • Clear one or more selected role(s) by clicking the desired selected role(s).
    • Select all of the roles by clicking Select All.
    • Deselect all of the roles by selection Deselect All.
  9. If desired and available, check the Run as a root check box to execute the command(s) as a root user. Leaving this check box cleared will run the command(s) using your credentials. If you are running the ActionScript as a non-root user, then an account with your username must exist on the virtual node(s) being used to run this ActionScript. This may be either a local or LDAP/AD user account.
  10. Click Submit to run the ActionScript.
    • If the command(s) are accepted, then the notation Action started successfully appears, and you may click the Close button and observe the progress in the ActionScript List table.
    • If the command(s) are rejected, then an error notation will appear, and you will need to click Close and then restart the process.

While an ActionScript is running, you may click the Kill icon (X) to immediately stop execution. The Action Status column will update as the action executes. See ActionScript Statuses.

Note: In your ActionScript, you can perform unique functions depending on its role in the virtual node. Role information can be obtained with command bd_vcli --get node.role.id.