Skip to main content
Kinetic Community

Amazon ECS Adapter

Overview

The Amazon ECS Adapter is an adapter that is installed into Kinetic Bridgehub that allows data from Amazon ECS to be pulled back using bridging. Amazon ECS is a highly scalable, high performance container management service that supports Docker containers and allows you to easily run applications on a managed cluster of Amazon EC2 instances.

Installation

Note: Check to ensure that this adapter isn't already installed into your bridgehub as part of the base installation before undertaking the installation tasks.

  • Download the kinetic-bridges-adapter-amazonecs.jar file and it's dependencies here
  • Put all of the downloaded files into the WEB-INF/lib folder for you kinetic-bridgehub installation
  • Restart the tomcat that your kinetic-bridgehub installation is located in
  • Included with default kinetic-bridgehub installation starting with v1.2.0

Setup

Configuration Values

Name Description
Access Key Access Key that is generated to allow API requests.
Secret Key Secret Key that is generated to allow API requests.
Region Regional endpoint to make your requests.

Example Configuration

Name Value
Access Key JAAADTUYTMNXBC31ALKSJD334
Secret Key aewrAHJLzvcx432QPIOUWERBruyeqSdf
Region us-east-1

Configuration Details

Getting your Access Key and Secret Key
http://docs.aws.amazon.com/general/l...edentials.html

Structures, Fields, and Queries

The Amazon ECS Adapter uses Amazon's ECS REST API to retrieve data and because of this the query structure for the adapter is loosely defined by this query structure. The ECS API documentation can be found here.

Structures

  • Cluster
  • ContainerInstances
  • Tasks
  • TaskDefinitions

Fields

Retrieving Information across Structures/Adapters

Some structures in the ECS bridge have the ability to retrieve field values from different Bridges and Structures

  • ContainerInstances
    • Can retrieve information about the EC2 Instance that is attached to the Container Instance
      • instance.ipAddress or instance.tagSet will retrieve the ipAddress or tagSet from the corresponding EC2 Instance (works for any field that is included in the EC2 instance object in the form of instance.instanceField)
    • Tasks
      • Can retrieve information about the Container Instance that is attached to the Task
        • containerInstance.ec2InstanceId will return the ec2InstanceId from the corresponding containerInstance (works for any field that is included in the ContainerInstance object in the form of containerInstance.ec2InstanceId)
        • This can also be chained with the EC2 Instance interrogation in the ContainerInstance structure. So to find the IP Address for a Task, the field containerInstance.instance.ipAddress is a valid field
      • Can retrieve information about the Task Definition that is attached to the Task
        • taskDefinition.family will return the attached Task Definition's family (works for any field in TaskDefinition: taskDefinition.taskDefinitionField)

Queries

The following queries work with any Amazon ECS Adapter structure:

  • By Arn (query only usable with the retrieve method)
    • arn=recordArn
  • By Cluster (Container Instance, Tasks, and Task Definitions need to specify a cluster name to be able to retrieve results)
    • cluster=clusterName
  • By other field values (for any structure, you can search by a field value - including any "complex" field that are returned from other structures)
    • Examples:
      • By EC2 Instance Id (structure: Tasks)
        • containerInstance.ec2InstanceId=targetEc2InstanceId
      • By Environment Name/Value (structure: Tasks)
        • environment[envName]=envValue
      • By Task Definition Family (structure: Tasks)
        • taskDefinition.family=value

Pagination and Ordering

Pagination

  • The metadata value pageSize can be passed in a Bridge Request to restrict the page size returned.
  • nextPageToken is passed with the output metadata if all of the records don't fit on one page.
  • The metadata value pageToken can be passed in the Bridge Request to retrieve the next page of results after a nextPageToken has been received.

Ordering

This adapter supports client-side ordering of records. Because of this it is not recommended to use pagination and ordering at the same time.

Changelog

v1.0.0 (2017-11-09)

  • Initial version