Delegate Task Category Mapping
The Task Category Map feature replaces the Command setting in Delegate Scopes, which is deprecated and will be removed soon.Harness deployments are broken down into separate tasks performed by Harness Delegates.
Tasks are organized by category. For example, all the connections and images pulled using Docker Hub are part of the Docker Hub Task Category.
By default, Harness performs tasks using any available Delegates. If you want Harness to prioritize a specific Delegate for a task category, you can map the task category to a Selector, and apply that Selector to a Delegate.
The mapped Selector can also be used in certain Harness entities to prioritize Delegates, such as Cloud Providers and the Shell Script Workflow step.
This topic describes how to map task categories to Selectors, and then apply the Selector to one or more Delegates.
Before You Begin
The Delegate is a key component of your Harness setup. Please review the following topics to ensure you have a solid understanding of the Delegate:
- Harness Key Concepts
- Harness Delegate Overview
- Select Delegates with Selectors
- Run Scripts on Delegates using Profiles
Supported Platforms and Technologies
See Supported Platforms and Technologies.
Visual Summary
Here is example of adding a new Selector to a Delegate, and then mapping the Selector to a Task Category:
Here is an example of adding a Selector to a Task Category Mapping, and then applying the Selector to a Delegate:
Step 1: Set Permissions
To map Selectors to Task Categories a user must belong to a User Group with the Account Permission Manage Delegates enabled.
See Managing Users and Groups (RBAC).
Step 2: Map a Selector to a Task Category
- To map a Selector to a Task Category, in Setup, click Harness Delegates.
- Click Task Category Map.
- Click Map Task Category.
- In Task Category, select the category you want to map. See Review: Task Categories.
- Select or create selectors to map to this Task Category.
- You can simply enter the name of a new Selector and click Create.
- If you have an existing Selector, one that is perhaps already used by a Delegate or Delegate Profile, you can start entering its name and it will appear. Next, click its name to select it.note
You must select or create at least one Selector.
- Click Submit. The Task Category is now mapped to the Selector.
If this Selector is not being used by a Delegate or Profile, you can now add it to one or both.
Review: Applying Selectors to Delegates and Profiles
Once you have mapped a Selector to a Task Category, you can apply the Selector to a Delegate using the following options:
- Add the Selector to the Delegate's Custom Selectors setting.
- Add the Selector to a Delegate Profile, and then add the Profile to any Delegates. All the Delegates using that Profile are thereby mapped to the Task Category.
For steps on adding Custom Selectors, see Select Delegates with Selectors.
For steps on adding Profile Selectors, see the Selector option in Run Scripts on Delegates using Profiles.
Which option to use?
If your task requires a Delegate Profile, it is best to map the Task Category to a Selector and apply that Selector to the Profile. All Delegates assigned that Profile will then perform the mapped tasks.
If your task can only be performed by specific Delegates because of their location or credentials, it is best to map it to specific Delegate using a Delegate's Custom Selectors setting.
Review: Task Categories
The following table describes the different task categories.
Task Category | Description |
Amazon Machine Image (AMI) | Perform tasks related to AMI Deployments. |
Amazon Elastic Container Registry (ECR) | Connect and pull images from ECR. |
Amazon S3 | Connect and pull artifacts and files from Amazon S3. |
AppDynamics | Perform AppDynamics verification tasks. |
AWS | Connect using any Harness AWS Cloud Provider. |
APM | Delegate can perform any APM task |
Artifactory | Connect to JFrog Artifactory using the Artifactory Artifact Server credentials. |
Azure Container Registry | Connect and pull Azure Container Registry images and artifacts. |
Bamboo | Perform Bamboo related tasks using the Bamboo Artifact Server credentials. |
Build Source | Perform tasks for any Build Workflow. |
CloudFormation | Perform CloudFormation tasks such as CloudFormation Create Stack and CloudFormation Delete Stack Workflow steps. See CloudFormation Provisioning with Harness. |
CloudWatch | Perform configuration and verification using AWS CloudWatch. |
Collaboration Provider | Connect and configure Harness Collaboration Providers. |
Command | Delegate will be used first for Service commands. |
Connectivity Validation | Tests connectivity with resources, such as Harness Cloud Providers. |
Container | Performs the following container-related tasks:
|
Custom Artifact Source | Collect artifacts using Custom Artifact Sources. |
Custom Log Collection and Bugsnag | Perform configuration and verification using Custom Logs and Bugsnag Verification Overview. |
Dynatrace | Perform configuration and verification using Dynatrace. |
Docker Hub | Connect to Docker Hub and pull down metadata associated with the artifact. |
ELK | Perform configuration and verification using ELK. |
Git | Perform configuration and tasks Git Source Repo Providers. |
Google Cloud Build | Perform Google Cloud Build related tasks. |
Google Cloud Storage | Connect and pull artifacts from Google Cloud Storage. |
Google Container Registry | Connect and pull artifacts from GCR. |
Helm | Delegate can perform Native Helm deployment tasks. |
Helm Repo Config Validation | Validate the Helm Repo connection. |
Helm Values Fetch | Fetch values.yaml for Native and Kubernetes Helm deployments. |
HTTP Verification | Perform the HTTP step in a Workflow. |
Host Validation | Validating target hosts availability. For example, see Select Nodes Workflow Step. |
Jenkins | Connect and perform tasks for Jenkins. |
Jira | Connect and perform tasks for Jira. |
Key Management Service | Connect and perform tasks for Harness Secrets Managers. |
Kubernetes | Performs Kubernetes rollouts for Kubernetes deployments. |
LDAP | Connect to LDAP server and perform LDAP tasks. |
Logz | Connect and perform Logz tasks. |
Nexus | Connect to Nexus and pull down metadata associated with the artifact. |
New Relic | Connect and perform New Relic tasks. |
Prometheus | Connect and perform Prometheus tasks. |
PCF | Connect and perform Pivotal (PCF) deployments. |
Service Guard | Perform 24/7 Service Guard tasks. |
ServiceNow | Connect and perform ServiceNow tasks. |
SFTP | Delegate can perform SFTP (email server) tasks such as sending emails. |
Splunk | Connect and perform Splunk tasks. |
Shell Script | Perform Shell Script step in a Workflow. |
Shell Script Provision | Delegate can perform Shell Script Provisioner tasks. |
Slack Notifications | Delegate can perform tasks related to sending Slack notifications. |
SMB | Delegate can perform tasks related to SMB Artifact Servers. |
SpotInst | Delegate can perform SpotInst Deployments and connect to the SpotInst Cloud Provider. |
Sumo Logic | Delegate can perform tasks related to Sumo Logic calls and Sumo Logic Verification Provider. |
Terraform | Delegate can perform Terraform tasks. |
Trigger | Delegate can perform tasks related to Harness Triggers. |
Continuous Integration | Delegate can perform tasks related to CI: Jenkins, Bamboo. |
Artifact Collection In Pipeline | Delegate can perform the artifact collection step in a Pipeline. |