2 - ECS Connectors and Providers Setup
This topic describes how to set up Harness to connect to your artifact repository and to the target AWS ECS cluster.
- Artifact Repository - To connect Harness to your artifact repository, you set up an Artifact Server in Harness.
- AWS ECS Cluster - To connect Harness to your ECS environment, you need to set up an AWS Cloud Provider in Harness. The AWS Cloud Provider you set up below uses Delegate Selectors as described in Harness ECS Delegate.
If your artifacts are in AWS along with your target ECS cluster, you can simply add a Harness AWS Cloud Provider and use it for all ECS deployment connections.
Add an Artifact Server
Harness integrates with many different types of repositories and artifact providers. We call these Artifact Servers, and they help you pull your artifacts into your Harness Applications.
Add an Artifact Server for your artifact repository to your Harness account as described in Add Artifact Servers.
Later, when you set up a Harness Service, you will use the Artifact Server to select the artifact you want to deploy:
If you are using Amazon Elastic Container Registry (ECR) for your artifacts, you can simply add an AWS Cloud Provider to manage your artifact and AWS deployment environment connections. Setting up an AWS Cloud Provider is described below.### Add an AWS Cloud Provider
Harness Cloud Providers represent the infrastructure of your applications, such as your ECS cluster. In this section, we will cover how to add an AWS Cloud Provider that uses the IAM role of the Harness ECS Delegate by using the Delegate Selectors.
Adding a Delegate Selector to your Delegate was discussed earlier in Harness ECS Delegate.
- In Harness, click Setup.
- Click Cloud Providers. The Cloud Providers page appears.
- Click Add Cloud Provider. The Cloud Provider dialog appears.
- In Type, select Amazon Web Services.
- In Display Name, enter a name for the Cloud Provider, such as aws-ecs.
- Select the Assume IAM Role on Delegate option.
- In Delegate Selector, enter the Selector you gave the ECS Delegate listed in the Harness Installations page.
- Click SUBMIT. The Cloud Provider is added.
For more information about setting up an AWS Cloud Provider, see Add Cloud Providers.
Next Step
Now that you have an Artifact Server and AWS Cloud Provider, you can create your Harness Application and define your ECS service in its Harness Service: