Scope Harness Delegates to Environments

Updated 3 months ago by Michael Cretzman

By default, a Delegate will perform all connections you set up and processes you run. To limit, or scope, a Delegate, you can assign it to all or specific Environments.

Delegate Scope is covered in Delegates Overview.

In this topic, we will look at scoping Delegates to Environments.

In this topic:

Before You Begin

Limitations

  • Scope is only available at the Project level. Scope is set in Delegate Configurations. While Delegate Configurations can be created at the Account, Org, and Project level, the Scope settings are only available in Delegate Configurations at the Project level.

Step 1: Add a Delegate Configuration

Scope is defined in a Delegate Configuration. When you add a new Delegate (inline when you add a Connector or independently), you select a Delegate Configuration for the Delegate.

The Delegate Configuration might have a scope assigned, or you can edit the Scope settings in the Delegate Configuration.

It's important to note that when you change the Scope of a Delegate Configuration, it impacts all Delegates that are assigned the Delegate Configuration.

In Harness, at the Project/Org/Account level, click Setup.

Click Delegates, and then click the Delegate Configurations tab.

Click New Delegate Configuration.

Name the Delegate Configuration and click Save and Continue.

In Initialization Scripts, you can add a script as described in Run Scripts on Delegates using Delegate Configurations.

Click Save and Continue.

Step 2: Create the Scope

In Scope, you specify Environments types and specific Environments as the scope.

The Environments you see here are defined in the Infrastructure settings of your Pipelines:

Let's take a moment and review Harness Environments and Infrastructure Definitions. Harness Environments represent your deployment targets logically (QA, Prod, etc). You can add the same Environment to as many stages are you need.

Infrastructure Definitions represent your target infrastructure physically. They are the actual clusters, hosts, etc. By separating Environments and Infrastructure Definitions, you can use the same Environment in multiple stages while changing the target infrastructure settings with each stage.

Select Non Production and/or Production Environments. You must select one Environment type.

Leave the settings empty to Scope the Delegate to all Environments of that type in the Project.

To scope the Delegates to specific Environments, click in the text area and select any of the Environments that appear.

Click Finish.

Step 3: Apply Delegate Configuration

When you add or edit a Delegate, select the Delegate Configuration with the Scope you setup in Delegate Configurations.

Now the Delegate is scoped to the Environments selected in the Delegate Configuration Scope.

See Also


Please Provide Feedback