For the complete documentation index, see llms.txt. This page is also available as Markdown.

ECS

The topic covers installing and configuring Traceable agent using a custom docker-compose.yml file. You also need to configure a few parameters in the ecs-params.yml file.


Before you begin

Read the following prerequisites before starting with installation:

  • ECS CLI - For an ECS environment, the installation requires the use of ecs-cli. Make sure that ecs-cli is installed. For more information on ecs-cli, see Installing the Amazon ECS CLI.

  • VPC, subnets, and security groups — Make a note of VPC, subnets, and security groups that will be used as part of the instrumentation process.

  • DNS hostnames and resolutions — Make sure to turn on DNS hostnames and resolutions for the VPC that is used by the ECS cluster.

  • Traceable Token - You need a valid Traceable token to complete the installation. Navigate to Settings () → AccountAgent Token.


Set up your ECS environment

Setting up your ECS environment consists of the following:

  • Creating a cluster

  • Fetch VPC, subnet, and security groups

Create Cluster

Create a cluster using the ecs-cli. Follow the steps outlined in the AWS Docs. Step 3.1 from the AWS Docs will output the VPC and subnets. Save these because they will need to be reused in this tutorial.

Fetch VPC, SUBNET, and Security Groups

VPC and Subnet information is returned when you initially created the cluster with step 3.1 in the AWS Docs. The command returns something similar to:

Fetch the SECURITY_GROUPS

Enter the following command to fetch the security group:


Create cluster config and ECS CLI profile

Enter the following commands to create cluster-config and ecs-profile:

  1. Configure an ECS cluster with a launch type, for example, ECS or FARGATE. Enter the following command:

For example, if your compute engine for ECS is FARGATE, then the value for default-launch-type would be FARGATE.

  1. Configure an ECS CLI profile with your AWS access and secret key. Enter the following command:


Install Traceable platform agent and side-car

Installing Traceable platform agent consists of the following:

  • Configuring the ecs-params.yml file

  • Configuring the docker-compose.yml file

Configure ecs-params.yml file

Based on your ECS environment, configure the ecs-params.yml file. Following is a sample ecs-params.yml file for installing the Traceable platform agent.

Include public subnets in the $SUBNETS section of the ecs-params.yml file.

Configure docker-compose.yml file

The docker-compose.yml file installs the traceable-agent service. The docker-compose file always fetches the latest version of the traceable-agent from Traceable’s docker hub repository. Following is a sample docker-compose.yml file:

The following table explains the various parameters of the docker-compose.yml file:

Parameter
Description

Ports

Configure the following port numbers for traceable-agent:

  • 5441

  • 5442

  • 4317

  • 9411

  • 8181

The ports for traceable-agent are for:

  • traceable-agent GRPC

  • traceable-agent REST

  • OpenTelemetry (OTLP)

  • Zipkin HTTP

  • Open Policy Agent (OPA)

TA_REFRESH_TOKEN

Use the token generated in the Prerequisite section.

TA_ENVIRONMENT

Used to segregate environments in the Traceable dashboard, for example, development, QA, and so on.

Run the following command after ecs-params.yml and docker-compose.yml files are configured:

For more information about the various parameters of the command, see ecs-cli compose.


Shut down the service

If you want to shut down the service, enter the following command:


Terraform

If you are managing your cluster with Terraform, here is an example task definition resource:

Last updated

Was this helpful?