Add a Physical Data Center connector
Connect Harness to hosts in your physical data center for traditional deployments.
Use a Harness Physical Data Center (PDC) connector to connect Harness to the hosts in your physical data center. PDC connectors are typically used for traditional deployments, including SSH and WinRM deployments.
What you will learn from this topic
How to create a Physical Data Center connector using the Harness Manager.
How to define a Physical Data Center connector using a YAML example.
Before you begin
Target hosts: The domain name or IP address of each host you want Harness to connect to, reachable from your Harness Delegate.
Harness Delegate: A running Harness Delegate that can reach the target hosts. Go to Delegate installation overview to install one.
Create a Physical Data Center connector
Perform the following steps to create the PDC connector using the Harness Manager. The connector wizard has four steps: Overview, Details, Delegates Setup, and Test Connection.
Overview
In your project, org, or account, select Connectors, and then select New Connector.
Select Physical Data Center.
Enter a Name for the connector. Harness automatically creates an Id (entity identifier) based on the Name.
Optionally, add a Description and Tags.
Select Continue to proceed to Details.

Details
Select Manually enter host names or Upload JSON file to define your list of hosts. For details on both options, go to Specify target hosts.
Select Continue to proceed to Delegates Setup.

Delegates Setup
Select Use any available Delegate, or select Only use Delegates with all of the following tags and enter one or more delegate tags.
Select Save and Continue to proceed to Test Connection.

Test Connection
Harness validates connectivity to the PDC hosts. If verification succeeds, select Finish.

Create a Physical Data Center connector using the API
Create the PDC connector using the Create a Connector API. The request sends the connector definition as YAML in the request body.
The request uses the following query parameter, headers, and body fields.
accountIdentifier(query parameter, required): The identifier of the Harness account where the connector is created. Replace<YOUR_ACCOUNT_ID>with your account identifier.Content-Type(header, required): Set totext/yamlbecause the request body is YAML. Useapplication/jsoninstead if you send the connector definition as JSON.x-api-key(header, required): A Harness API key with permission to create connectors in the target scope. Replace<YOUR_API_KEY>with your API key. For details on creating one, go to Add and manage API keys.connector.name: The connector display name shown in the Harness UI.connector.identifier: A unique identifier for the connector. You cannot change the identifier after creation. For the identifier format, go to the Entity Identifier reference.connector.description: An optional description for the connector.connector.orgIdentifier: The identifier of the organization that owns the connector. Omit this field to create the connector at the account scope.connector.projectIdentifier: The identifier of the project that owns the connector. Omit this field to create the connector at the account or organization scope. A project-scoped connector requiresorgIdentifieras well.connector.type: The connector type. UsePdcfor a Physical Data Center connector.connector.spec.hosts: The list of target hosts for the connector. Each entry setshostnameto the target host's domain name or IP address. To add hosts using a JSON hosts file instead of a static list, go to Specify target hosts.
Specify target hosts
Add target hosts to the connector manually or by uploading a JSON hosts file.
Manually enter host names
To manually enter hosts in the connector, select Manually enter host names, and then add each host's domain name or IP address on a new line in the Hosts field.
JSON hosts file
The following JSON hosts file defines two hosts, each with a set of host attributes.
The hostname and hostAttributes properties are mandatory, and hostAttributes can have as many key-value pairs as you need.
When you select this PDC connector in an infrastructure definition, you can select Filter by host name or Filter by host attributes to select the hosts for deployment. Specify the host attributes as a comma-separated list of attribute:value pairs, for example, region:west,type:node.

YAML examples
The following YAML defines an account-scoped PDC connector with two target hosts, each with a set of host attributes.
The accountIdentifier field scopes the connector to the account level. Omit accountIdentifier and add orgIdentifier and, optionally, projectIdentifier instead to scope the connector to an organization or project. By default, ignoreTestConnection is false, and Harness tests the connection to each host when you save the connector.
Troubleshooting
Next steps
SSH deployments: Deploy artifacts to hosts using SSH.
WinRM deployments: Deploy artifacts to Windows hosts using WinRM.
Last updated
Was this helpful?