AWS Elastic Container Service (ECS / EC2)
  • 1 Minute to read
  • Dark
    Light
  • PDF

AWS Elastic Container Service (ECS / EC2)

  • Dark
    Light
  • PDF

Article summary

This document details how to install Retrace in an AWS ECS EC2 Cluster.

Requirements: AWS ECS running with EC2 using a x86/ARM AMI
(AWS Fargate Support is at: AWS Elastic Container Service (ECS / Fargate).

Create Task Definition

Adjust the following configuration and publish to AWS:
stackify-retrace-task.json :

{
  "containerDefinitions": [
    {
      "name": "stackify-retrace",
      "image": "stackify/retrace:latest",
      "cpu": 10,
      "memory": 512,
      "essential": true,
      "mountPoints": [
        {
          "containerPath": "/hostfs",
          "sourceVolume": "hostfs",
          "readOnly": true
        },
        {
          "containerPath": "/var/stackify",
          "sourceVolume": "stackify",
          "readOnly": false
        }
      ],
      "environment": [
        {
          "name": "STACKIFY_KEY",
          "value": "[YOUR_ACTIVATION_KEY]"
        },
        {
          "name": "STACKIFY_ENV",
          "value": "[YOUR_ENVIRONMENT_NAME]"
        }
      ]
    }
  ],
  "volumes": [
    {
      "host": {
        "sourcePath": "/"
      },
      "name": "hostfs"
    },
    {
      "host": {
        "sourcePath": "/var/stackify"
      },
      "name": "stackify"
    }
  ],
  "family": "stackify-retrace-task"
}

Note: Replace [YOUR_ACTIVATION_KEY] and [YOUR_ENVIRONMENT_NAME].
Use Image stackify/retrace-arm64 if running on an ARM processor.

Publish with AWS CLI:

aws ecs register-task-definition --cli-input-json file://[PATH_TO_CONFIG]/stackify-retrace-task.json

Run Daemon Service

The Stackify Retrace container will be setup to run once on each EC2 instance.

  1. Log in to your AWS Web Console
  2. Goto Services > Amazon ECS > Clusters and select the desired cluster.
  3. Setup Service
    1. Click Create on the Services tab
    2. Select EC2 as Launch Type
    3. Select stackify-retrace-task as Task Definition
    4. Set Service name to stackify-retrace
    5. Select DAEMON as Service type
    6. Click Next Step
    7. Select None as Load balancer type
    8. Click Next Step
    9. Confirm Auto Scaling is not enabled for Daemon service
    10. Click Next Step
    11. Click Create Service

Application Setup

The following guides detail how to configure your application containers for APM.


Was this article helpful?