ecs

Grey Matter Fabric supports service discovery from AWS ECS deploymentsarrow-up-right. See the Grey Matter Control AWS ECS discovery setup documentation for how to configure this with Grey Matter Control.

AWS ECS Deployment

See the AWS ECS documentationarrow-up-right for information on why and how to use ECS. Grey Matter Control can discover tasks from ECS deployments using launch type EC2.

Note: Grey Matter is not compatible with ECS Fargate.

ECS deployments configure services through ECS task definitionsarrow-up-right. The Grey Matter control plane will discover running tasks with a specific dockerLabel and determine the instance information based on the task Network Mode

ECS Services and Tasks

ECS Services are configured by ECS task definitionsarrow-up-right.

The Grey Matter Control plane will poll the specified clusters for running ECS containers with a specific dockerLabelarrow-up-right. These containers are defined as a part of the ECS task definition. See the Grey Matter Control setup ECS task specifications for the format of this dockerLabel.

An example ECS Task set up for discovery by Grey Matter Control (using its default configuration) is here.

ECS Task Network Modes

The Control server determines the instances of each ECS task container based on its Network Modearrow-up-right. The network mode of any task container to be discovered by Grey Matter Control must be one of bridge (default), host, or awsvpc.

For tasks with Network Mode bridge, instance hosts are determined using the EC2 Instance IP of the EC2 on which the task is running, and ports are determined by the hostPort of the ECS task Network Bindingsarrow-up-right.

For tasks with Network Mode host, instance hosts are determined using the EC2 Instance IP of the EC2 on which the task is running, and ports are determined by the port specified for the container in the docker label.

For tasks with Network Mode awsvpcarrow-up-right, instance hosts are determined using the Network Interfacesarrow-up-right private IPv4 addresses, and ports are determined by the container port specified in the container definition port mappingsarrow-up-right.

Example Task

The ECS Task definition below is properly setup to be discovered by the gm-control server.

The ECS service definition below is set up to run with the above task definition to be discovered by gm-control.

Last updated

Was this helpful?