5 - Environments for Traditional Deployments
Environments represent one or more of the deployment infrastructures where you want to deploy your application package files. This section covers adding an Environment that defines the Service Infrastructure for a file-based Service:
Environments represent one or more of the deployment infrastructures where you want to deploy your application package files. Within an Environment, you add a Service Infrastructure 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.
When you add a Service Infrastructure, you will specify the Service to deploy, the Cloud Provider to use, and the infrastructure details. For the example below, we will create a Service Infrastructure for a WAR Service using an AWS Cloud Provider, and we will specify the AWS infrastructure settings for the target AWS VPC and host.
To add a Service Infrastructure, do the following:
- In your Harness Application Environment, click Add Service Infrastructure. The Service Infrastructure dialog appears.
- In Service, select a file-based Service, such as a WAR Service.
- In Cloud Provider, select the Cloud Provider you set up to connect Harness to your deployment infrastructure.
- Click Next. The Configuration section appears.
The Configuration section 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 Service Infrastructure is added.
Now that you have defined the deployment infrastructure, you can create a Workflow to deploy your Service to it.
When you set up the Service Infrastructure 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 Secrets Management.