1 - Harness ECS Delegate
The Harness ECS Delegate is software you install in your environment that connects to the Harness Manager and performs Continuous Delivery tasks.
The ECS cluster for the ECS Delegate is run in the same VPC as the ECS cluster(s) where you will deploy your ECS services. You can run the ECS Delegate in the same subnet as a cluster, which is often the easiest way to manage the Delegate.
For steps on installing and running the Harness ECS Delegate, see the following:
- Installation Example: Amazon Web Services and ECS - Follow the steps here to install the ECS Delegate in a ECS cluster and apply a Delegate Tag. Ensure that you add a Delegate Tag to the ECS Delegate you install, as you will use that Delegate Tag when you set up the AWS Cloud Provider in ECS Connectors and Providers Setup.
- ECS (Existing Cluster) - This covers the IAM policies needed for the IAM role assigned to the ECS cluster where the ECS Delegate will be installed.
You can also use a Delegate on an EC2 instance that assumes the same role as your ECS cluster. In this case, update the trust relationship of the IAM role so that the EC2 instances can assume the role. You can set this up in the Trust relationships tab of the IAM role:
Add a Delegate Tag
When Harness makes a connection to your ECS cluster via its Delegates, it will select the best Delegate according to its history and other factors. To ensure a specific Delegate is used by a Harness entity, you can scope the Delegate as explained in Delegate Scope, or you can add tags to Delegates and then reference the tags in commands and configurations.
For this guide, we will use a Delegate Tag. Later, when you add an AWS Cloud Provider to your Harness account, you will use the Delegate Tag you added to ensure the Cloud Provider uses that Delegate.
Here is an example of an AWS Cloud Provider using the Delegate Tag of a Harness Delegate:
For steps on using Delegate Tags with your ECS Delegate, see the steps in Set up ECS Delegate in AWS.