Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 26 Current »

You can use the Amazon ECS Task Definition task to create or delete an Amazon Elastic Container Service (ECS) task definition (see Deploying to Amazon ECS for an overview of the ECS component lifecycle and deployment workflow).


Configuration

Naming Overlap

There is an unfortunate entity naming overlap between Atlassian Bamboo Tasks and Amazon ECS Tasks - rather than adding to the confusion by introducing yet another name, this documentation will refer to an Amazon ECS Task task as needed.

To configure an Amazon ECS Task Definition task:

Navigate to the Tasks configuration tab for the job (this will be the default job if creating a new plan).

Click the name of an existing Amazon ECS Task Definition task, or click Add Task and then Amazon ECS Task Definition to create a new task.

Complete the following settings:

Common to all tasks

 Click here to expand...

Common (Bamboo)


Task Description (Optional) Identify the purpose of the task.
Disable this task

Check, or clear, to selectively run this task.

...Configure task/action specific parameters, see below ...
Bamboo Variables
NamespaceProvide the namespace for generated variables – defaults to custom.aws for backward compatibility.
Scope

Select the scope for generated variables – can be either Local (Variables will only be available in this job), or Result (Variables will be available in subsequent plan stages and deployment releases).

Common (AWS)


Action

Each task supports one or more actions depending on the target AWS resource. Select the desired action and configure the action specific parameters below.

RegionSelect the desired AWS Region. Alternatively, select [Use region variable ...] to supply the region dynamically via Bamboo variables (needs to be a region code such as ap-southeast-2) - refer to How to parametrize the AWS region via a Bamboo variable for details.
...Configure task/action specific parameters, see below ...
AWS Security Credentials
SourceSelect the source for the required AWS Security Credentials – can be either Inline, an IAM Role for EC2 or a shared Identity Federation for AWS Connector.
Connector(Conditional) Select the shared Identity Federation for AWS Connector. Alternatively, select [Use connector variable ...] to supply the connector dynamically via Bamboo variables (needs to be a connector id such as f24e81bc-7aff-42db-86a2-7cf82e24d871) - refer to How to parametrize the AWS connector via a Bamboo variable for details.

Actions supported by this task:


Register Task Definition


Family Specify the task definition family, which allows to track multiple versions of a task definition.
  • (info) You can think of the family as a name for your task definition.
Container Definitions

Specify a list of container definitions in JSON format – refer to Amazon ECS Task Definitions for an overview, and section Container Definitions within Task Definition Parameters for details.

Volumes(Optional) Specify a list of volume definitions in JSON format – refer to Amazon ECS Task Definitions for an overview, and Using Data Volumes in Tasks for details.
Task Role ARN
(Optional) Specify the Amazon Resource Name (ARN) of the IAM role that containers in this task will assume.
Requires Compatibilities(Optional) Specify the launch type required by the task. If no value is specified, it defaults to EC2.
Network ModeSpecify the Docker networking mode to use for the containers in the task.
Execution Role ARN
(Optional) Specify the Amazon Resource Name (ARN) of the IAM role that the Amazon ECS container agent and the Docker daemon can assume.
CPU
Specify the number of cpu units used by the task.
Memory
Specify amount (in MiB) of memory used by the task.
TagsSpecify the tags to apply (JSON – inline or via URL).

EC2 Options


Placement Constraints(Optional) Specify placement constraint objects in JSON format – refer to Amazon ECS Task Placement Constraints for details.

Deregister Task Definition


Task DefinitionSpecify the family and revision (family:revision) or Amazon Resource Name (ARN) of the task definition.

Variables

All tasks support Bamboo Variable Substitution/Definition - this task's actions generate variables as follows:

A task's generated variables might get amended with respective AWS API additions over time - a live build log will always provide the most current variable shape accordingly

Register Task Definition

Creating common variables for 1 resources affected by task:
... bamboo.custom.aws.ecs.taskdefinition.resources: TAWS-IT270
Creating resource variables for task definition 'TAWS-IT270':
... bamboo.custom.aws.ecs.taskdefinition.resources.TAWS-IT270.TaskDefinitionARN: arn:aws:ecs:us-east-1:309600995652:task-definition/TAWS-IT270:78
... bamboo.custom.aws.ecs.taskdefinition.resources.TAWS-IT270.Family: TAWS-IT270
... bamboo.custom.aws.ecs.taskdefinition.resources.TAWS-IT270.Revision: 78
... bamboo.custom.aws.ecs.taskdefinition.resources.TAWS-IT270.Status: ACTIVE
Creating common variables for first resource affected by task:
Creating resource variables for task definition 'TAWS-IT270':
... bamboo.custom.aws.ecs.taskdefinition.first.TaskDefinitionARN: arn:aws:ecs:us-east-1:309600995652:task-definition/TAWS-IT270:78
... bamboo.custom.aws.ecs.taskdefinition.first.Family: TAWS-IT270
... bamboo.custom.aws.ecs.taskdefinition.first.Revision: 78

... bamboo.custom.aws.ecs.taskdefinition.first.Status: ACTIVE

Deregister Task Definition

N/A

How-to Articles

Frequently Asked Questions (FAQ)

Atlassian account required

Due to a regression within Questions for Confluence Cloud, you need to log in with your Atlassian ID (or sign up for a new account) to access these automatically curated FAQs (refer to UAA-312 for the background).

  • No labels