Skip to main content

Add a Physical Data Center connector

You can connect Harness to the physical data centers (PDCs) where you will deploy your services.

PDCs are typically used in traditional deployments, including Secure Shell (SSH) and WinRM.

Add a Physical Data Center connector

Here's an example of a PDC connector YAML:

connector:
name: PDC-Connector
identifier: PDCConnector
description: ""
orgIdentifier: default
projectIdentifier: CD_Docs
type: Pdc
spec:
hosts:
- hostname: ec2-54-111-26-183.us-west-2.compute.amazonaws.com
- hostname: ec2-54-222-142-249.us-west-2.compute.amazonaws.com

Manually enter hosts

To manually enter hosts in the connector, add each host's domain name or IP address on a new line.

JSON hosts file

Here's an example of a JSON hosts file:

[
{
"hostname": "ec2-54-87-11-191.compute-1.amazonaws.com:5986",
"hostAttributes": {
"type": "node",
"region": "east",
"name": "node1",
"ip": "54.87.11.191"
}
},
{
"hostname": "ec2-3-83-219-167.compute-1.amazonaws.com:5986",
"hostAttributes": {
"type": "db",
"region": "east",
"name": "node2",
"ip": "3.83.219.167"
}
}
]

JSON host file details:

  • The hostname and hostAttributes properties are mandatory.
  • The hostAttributes property 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 host(s) for deployment.
    • Specify the host attributes as a comma-separated list of attribute:value (for example, region:west,type:node).
    filter by attributes