Run a task on a node group

Similar to running a task on a list of nodes that you create in the console, you can run a task on a node group.

Before you begin:

Install the tasks you want to use.

Make sure you have access to the nodes you want to target.

Make sure you have permissions necessary to run tasks.

If you don't have permission to view a node group, or the node group doesn't have any matching nodes, that node group isn't listed as an option. In addition, node groups don't appear if they have no rules specified.

  1. In the console, in the Orchestration section, click Tasks.
  2. Click Run a task in the upper right corner of the Tasks page.
  3. In the Code environment field, select the environment where you installed the module containing the task you want to run. The default is production.
  4. In the Task field, select a task to run. For example, service.
    If the tasks you expect are not available, you either have no tasks installed, or you don't have the correct permissions to run them.
  5. Optional: In the Concurrency limit field, specify the number of nodes on which the task can be executed simultaneously.
  6. Optional: In the Task description field, provide a description. The text you enter here appears on the task list and task details pages.
  7. Optional: If you want to limit how long the task can run before being automatically cancelled, under Timeout, select Yes and specify a time interval (such as 5 minutes).
  8. Under Task parameters, add optional parameters and enter values for the optional and required parameters on the list.
    You must click Add to task for each optional parameter-value pair you add to the task.

    To view information about required and optional parameters for the task, select View task metadata below the Concurrency limit field.

    Express values as strings, arrays, objects, integers, or Booleans. You must express empty strings by entering a pair of double quotation marks with no space between (""). Structured values, like arrays, must be valid JSON.

    Tasks that have default values use the default values when running unless you specify other values.

    The parameters you supply the first time you run a task are used for subsequent task runs when you use Run again on the Task details page.
  9. Click Next: Select nodes.
  10. Under Node selection method, from the dropdown select Node group.
  11. From the Choose a node group dropdown, type or select a node group, and click Select.
  12. Optional: To convert the list of nodes captured by the selected node group into a static list of nodes, click Convert query to static node list.
    If you select this option, the job target becomes a node list. You can add or remove nodes from the node list before running the job, but you cannot edit the query.
  13. When you have selected the node group containing the nodes you want to target or have created a static list of targeted nodes, click Next: Review and schedule.
  14. Schedule the task or, to run the task immediately, click Run task.

    You can view the task job status and a list of previous and scheduled tasks on the Tasks page.

    To rerun a task, click on the relevant ID and click Run again, choosing whether to rerun it on all nodes or only the nodes that failed during the initial run.