Install a Docker delegate
The Harness Delegate is a worker process you run in your deployment target environment, such as your local network, VPC, or cluster. The Delegate connects all of your artifact, infrastructure, collaboration, verification and other providers with the Harness Manager.
Most importantly, the Delegate performs all deployment operations.
There are several types of Delegates. This topic describes how to install the Docker Delegate.
Before you begin
Review: System Requirements
The Docker Delegate has the following system requirements:
- Default 0.5 CPU.
- Default 768MB RAM: there is a cap of 768MB per Delegate, but when the Delegate is updating there might be two Delegates running. Hence, the minimum is 1.5GB. Ensure that you provide the minimum memory for the Delegate and enough memory for the host/node system.
Step 1: Download the Docker Delegate
The Delegate can be installed at the Harness account, Organization, or Project level.
You can install a Delegate as part of setting up a Connector or independent of another process.
Once you have selected New Delegate on a Delegates page or as part of setting up a Connector, the Delegates selection page appears.
Click Docker and then click Continue.
Step 2: Name and Tag the Delegate
Enter a name for the Delegate. This is the name you will see when the Delegate is listed in Harness.
Do not run Delegates with the same name in different clusters. See Troubleshooting.Add Tags to the Delegate. By default, Harness adds a Tag using the name you enter, but you can more. Simply type them in and press Enter.
These Tags are useful for selecting the Delegate when creating a Connector.
Click Continue.
Step 3: Run the Docker Delegate Script
If you system already has a Delegate image, then Harness doesn't pull the latest image when you run docker-compose
. Simply run docker pull harness/delegate
to pull the latest.Now you can see the YAML file for the Delegate:
Click Download YAML file and copy the Docker compose file to a machine where you have Docker installed.
Run the following command to install the Delegate in Docker:
docker-compose -f docker-compose.yaml up -d
The Delegate installs. Type docker ps to see the container:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6b242707a57a harness/delegate:latest "/bin/sh -c './entry…" 3 days ago Up 32 seconds local-docker_harness-ng-del
Verification
For an overview of verification, see Delegate Registration and Verification.
In the Delegate wizard, click Verify and Harness will verify that it is receiving heartbeats from the Delegate.
Your Delegate is installed.
You can see the registered Delegate in the Delegate list.
 or FirstGen(false ). | - name: NEXT_GEN value: "true" |
DELEGATE_DESCRIPTION | The description added to the Delegate in the Harness Manager or YAML before registering.It appears in the Delegate details page in the Harness Manager. | - name: DELEGATE_DESCRIPTION value: "" |
DELEGATE_TYPE | The type of Delegate. | - name: DELEGATE_TYPE value: "DOCKER" |
DELEGATE_TAGS | The Tags added to the Delegate in the Harness Manager or YAML before registering.Tags are generated by Harness using the Delegate name but you can also add your own Tags.Tags appear in the Delegate details page in the Harness Manager.See Tags Reference and Select Delegates with Tags. | - name: DELEGATE_TAGS value: "" |
DELEGATE_TASK_LIMIT | The maximum number of tasks the Delegate can perform at once.All of the operations performed by the Delegate are categorized as different types of tasks. | - name: DELEGATE_TASK_LIMIT value: "50" |
DELEGATE_ORG_IDENTIFIER | The Harness Organization Identifier where the Delegate will register.Delegates at the account-level do not have a value for this variable. | - name: DELEGATE_ORG_IDENTIFIER value: "engg" |
DELEGATE_PROJECT_IDENTIFIER | The Harness Project Identifier where the Delegate will register.Delegates at the account or Org-level do not have a value for this variable. | -name: DELEGATE_PROJECT_IDENTIFIER value: "myproject" |
PROXY_MANAGER | Indicates whether to use the Harness Manager or a proxy. If you use true (the default) you are indicating that you proxy outbound traffic to Harness. | - PROXY_MANAGER=true |
INIT_SCRIPT | You can run scripts on the Delegate using INIT_SCRIPT .For example, if you wanted to install software on the Delegate pod, you can enter the script in INIT_SCRIPT and then apply the Delegate YAML.A multiline script must follow the YAML spec for literal scalar style.See Run Scripts on Delegates. | - INIT_SCRIPT= echo hello world! |
USE_CDN | Makes the Delegate use a CDN for new versions. | - name: USE_CDN value: "true" |
CDN_URL | The CDN URL for Delegate versions. | - name: CDN_URL value: https://app.harness.io |
VERSION_CHECK_DISABLED | By default, the Delegate always checks for new versions (via the Watcher). | - name: VERSION_CHECK_DISABLED value: "false" |