No items found.
No items found.

Release Offers Support for ECS

Erik Landerholm
November 30, 2022
 • 
4
 Min
No items found.
A group of colorful containers

Complex applications on AWS frequently combine not only the core code but also connections to resources and dependencies (such as ECS Tasks and Lambdas). We’re excited to announce support for ECS tasks! Development, testing, and production of complex apps can now be managed through our newest Release update. This latest update includes support for the use of IaC (Infrastructure as Code, for example, Terraform and Pulumi)  to create resources in ECS, which you can manage in Release right alongside your EKS resources. In this post, we'll show you some simple set-up steps to add ECS resources to Release, access them through the terminal, and view their logs.

Release is a Kubernetes-first platform, but we have many customers that have described their environments in detail with an IaC and would like their environments to match their production environments as closely as possible. With our support for ECS you can now view and manage your ECS and EKS resources through Release’s single administration interface. Release automatically tags and configures your ECS resources if you use our Infrastructure Runner, but we also allow you to tag and configure any ECS resources and manage them in Release, regardless of how they were deployed.

AWS ECS Task Support

The first supported cloud resources are AWS ECS Tasks, but more resource types will be supported soon. Let us know what cloud resources you’d like to see supported!

Cloud Resources

After tagging a resource, it will show up on the Environment page in the Cloud Resources section, below your Instances.


Cloud Resources like this ECS Task are listed on the environment page in a section below Instances. ECS Tasks support Terminal and Logs, which you launch by clicking the corresponding button.

Interacting with Cloud Resources

Currently, once you've tagged them, ECS Tasks support a couple of actions: Terminal and Logs (note the Terminal and Logs buttons in the previous screenshot).

You can launch a web terminal into the task containers by clicking the Terminal button:

And you can view container logs by clicking the Logs button:

How to add Cloud Resources

To add a cloud resource to your Release environments, you'll need to add a couple of tags/labels to that resource in AWS or GCP.

Two tags with values are required:

Tag Key Tag Value Location in UI Env variable
releasehub.com/app
name
Tag Key Top of the environment page. In the screenshot below, the app name is
example-voting-app
RELEASE_APP_NAME
(see default Release environment variables)
releasehub.com/env-id
(the environment handle) In the screenshot below, the environment handle is
ted3bff
RELEASE_ENV_ID
(see default Release environment variables)

AWS Documentation can be found here.

How to Configure the Logs

In order to send your ECS task logs to the Release log viewer, you must configure your ECS tasks to use the awslogs log driver:

You can specify the log driver in the task definition. Inside each entry in containerDefinitions, update (or add) the logConfiguration key to specify the logDriver and options. Options must specify awslogs-group, and awslogs-stream-prefix. The logDriver must be awslogs, but you may choose your own group and stream-prefix.

That section of your task definition should look something like this when you’re done:


‍
{
   "containerDefinitions": [
       {
           "logConfiguration": {
               "logDriver": "awslogs",
               "options": {
                   "awslogs-group": "firelens-container",
                   "awslogs-region": "us-west-2",
                   "awslogs-create-group": "true",
                   "awslogs-stream-prefix": "firelens"
               }
           }
       }
   ]
}

For more details, check out the AWS documentation on using the awslogs log driver.

How to Configure the Terminal

The following requirements must be met before being able to terminal into any ECS task:

  1. ECS Exec needs to be enabled for the task. (more info)
  2. ECS Exec IAM permissions need to be added for the task. (more info)

For more details, check out the AWS documentation on enabling ECS Exec and the best practices around it.

After configuring the ECS task, use the Cloud Resources refresh button and you should be able to choose the container to terminal into. Note that Release will gray out the terminal button for containers that are not running or tasks that do not have ECS Exec enabled.

Try it Yourself

At Release we always try to support the infrastructure our customers have in place while allowing them to take advantage of any new offerings from AWS. If you would like to manage your containers, regardless of which container management service you use, read through our documentation and/or schedule a demo!

Try Release for Free

About Release

Release is the simplest way to spin up even the most complicated environments. We specialize in taking your complicated application and data and making reproducible environments on-demand.

Speed up time to production with Release

Get isolated, full-stack environments to test, stage, debug, and experiment with their code freely.

Get Started for Free
Release applications product
Release applications product
Release applications product

Release Your Ideas

Start today, or contact us with any questions.