Define Your Traditional (SSH) Target Infrastructure
Harness Infrastructure Definitions specify the target deployment infrastructure for your Harness Services, and the specific infrastructure details for the deployment, like VPC settings.
In this topic, we describe how to add an Infrastructure Definition for your Traditional (SSH) deployment.
In this topic:
- Before You Begin
- Visual Summary
- Step 1: Create an Environment
- Step 2: Define Target Infrastructure
- Option: Scope to Specific Service
- Review: SSH Key for Connection Attributes
- See Also
- Configure As Code
Before You Begin
- Connect to Your Repos and Target SSH Platforms
- Traditional Deployments Overview
- Harness Key Concepts
For example, here is an Infrastructure Definition using an AWS Cloud Provider, and specifies the AWS infrastructure settings for the target AWS VPC and host.
Later, when you create a Workflow, you will select the Service and this Infrastructure Definition.
Step 1: Create an Environment
Environments represent one or more of the deployment infrastructures where you want to deploy your application package files. Within an Environment, you add an Infrastructure Definition for each specific deployment infrastructure, using a Cloud Provider and the specific infrastructure details for the deployment, like VPC settings.
For details on creating an Environment, see Environments.
Step 2: Define Target Infrastructure
As an example, we will create an Infrastructure Definition for an AWS EC2 target infrastructure.
To add an Infrastructure Definition, do the following:
- In your Harness Application Environment, click Add Infrastructure Definition. The Infrastructure Definition dialog appears.
- In Name, enter the name you will use when you select this Infrastructure Definition in Workflows.
- In Cloud Provider Type, select the type of Cloud Provider that this Infrastructure Definition will use for connections. For example, select Amazon Web Services for AWS EC2 infrastructures.
- In Deployment Type, select the deployment type for the Services that will use this Infrastructure Definition. For example, if you are deploying SSH type Services like JAR, WAR, etc, you would select Secure Shell (SSH).
- Click Use Already Provisioned Infrastructure. If you were using a Harness Infrastructure Provisioner, you would select Map Dynamically Provisioned Infrastructure.
- In Cloud Provider, select the Cloud Provider you set up to connect Harness to your deployment infrastructure.
- Fill out the remaining settings. These settings will look different depending on the Cloud Provider you selected. For example, for an AWS Cloud Provider, you will see AWS-specific settings, such as Region and Auto Scaling Group. When you select a region, more settings appear, such as VPC and Tags.
- Provide the settings for your infrastructure. For example, here are the settings for an AWS infrastructure that identify the target host using AWS EC2 Tags.
- When you are finished, click SUBMIT. The Infrastructure Definition is added.
Option: Scope to Specific Service
In Scope to specific Services, you can select the Service(s) that you want to use this Infrastructure Definition.
Review: SSH Key for Connection Attributes
When you set up the Infrastructure Definition in Harness to identify the target host(s) where your file will be deployed, you also add Connection Attributes that use a Harness SSH Key secret. This key is used by the Harness Delegate to SSH into the target host.
For more information, see Add SSH Keys.
Configure As Code
To see how to configure the settings in this topic using YAML, configure the settings in the UI first, and then click the YAML editor button (</>).