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 23 Current »

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


Configuration

Naming Overlap

There is an 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 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 task, or click Add Task and then Amazon ECS Task 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:


Run Task


Launch TypeSelect the launch type on which to run your task.
Task DefinitionSpecify the family and revision (family:revision) or Amazon Resource Name (ARN) of the task definition to use.
Cluster Name or ARN

(Optional) Specify the cluster name or Amazon Resource Name (ARN).

  • (warning)  If you do not specify a cluster, the default cluster is assumed.
Count(Optional) Specify the number of task instances to run once.
Group(Optional) Specify the name of the task group to associate with the task.
Network Configuration(Optional) Specify an awsvpc network configuration (JSON – inline or via URL) – refer to Task Networking with the awsvpc Network Mode for details.
Started By(Optional) Specify a tag to apply when the task is started.
TagsSpecify the tags to apply (JSON – inline or via URL).
EC2 Options
Placement Strategy(Optional) Specify placement strategy objects (JSON – inline or via URL– refer to Amazon ECS Task Placement Strategies for details.
Placement Constraints(Optional) Specify placement constraint objects in (JSON – inline or via URL– refer to Amazon ECS Task Placement Constraints for details.
Advanced Options
Overrides(Optional) Specify one or more container overrides in JSON format to use.
Fargate Platform Version(Optional) Specify the platform version on which to run your task. If none is specified, Fargate defaults to the latest version.
Desired StatusSelect the desired status the task(s) should reach. Since 2.13.0: see below.
Await Desired Status TimeoutSpecify how long to await the task(s) reaching the desired status (seconds, 0 to skip). Since 2.13.0: select 'Running or Stopped' with a timeout longer than the Bamboo build timeout to replicate the previous behavior.

Start Task


Task Definitionsee Run Task above
Cluster Name or ARNsee Run Task above
Container InstancesSpecify a JSON array of container instance UUIDs or Amazon Resource Name (ARN) entries for the container instances on which to place the task.
Groupsee Run Task above
Network Configurationsee Run Task above
Started Bysee Run Task above
Tagssee Run Task above
Advanced Options
Overrides

see Run Task above

Desired Statussee Run Task above
Await Desired Status Timeoutsee Run Task above

Stop Task


Cluster Name or ARN

see Run Task above

Task UUID or ARNSpecify the task UUIDs or full Amazon Resource Name (ARN) entry of the task.
ReasonSpecify the reason for the task being stopped.

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

Run Task

Creating common variables for 1 tasks:
... bamboo.custom.aws.ecs.task.resources: 20b85717-337a-4b64-839f-630517b0c7c0
Creating resource variables for task '20b85717-337a-4b64-839f-630517b0c7c0':
... bamboo.custom.aws.ecs.task.resources.20b85717-337a-4b64-839f-630517b0c7c0.ClusterArn: arn:aws:ecs:us-east-1:309600995652:cluster/taws-it-270-29
... bamboo.custom.aws.ecs.task.resources.20b85717-337a-4b64-839f-630517b0c7c0.ContainerInstanceArn: arn:aws:ecs:us-east-1:309600995652:container-instance/04e43cc4-2a6c-450e-bcee-35d076e010b4
... bamboo.custom.aws.ecs.task.resources.20b85717-337a-4b64-839f-630517b0c7c0.DesiredStatus: RUNNING
... bamboo.custom.aws.ecs.task.resources.20b85717-337a-4b64-839f-630517b0c7c0.LastStatus: RUNNING
... bamboo.custom.aws.ecs.task.resources.20b85717-337a-4b64-839f-630517b0c7c0.StartedBy: null
... bamboo.custom.aws.ecs.task.resources.20b85717-337a-4b64-839f-630517b0c7c0.StartedAt: 20151204T181331Z
... bamboo.custom.aws.ecs.task.resources.20b85717-337a-4b64-839f-630517b0c7c0.StoppedAt: null
... bamboo.custom.aws.ecs.task.resources.20b85717-337a-4b64-839f-630517b0c7c0.StoppedReason: null
... bamboo.custom.aws.ecs.task.resources.20b85717-337a-4b64-839f-630517b0c7c0.TaskArn: arn:aws:ecs:us-east-1:309600995652:task/20b85717-337a-4b64-839f-630517b0c7c0
... bamboo.custom.aws.ecs.task.resources.20b85717-337a-4b64-839f-630517b0c7c0.TaskDefinitionArn: arn:aws:ecs:us-east-1:309600995652:task-definition/taws-it-270-sleep:100
... bamboo.custom.aws.ecs.task.resources.20b85717-337a-4b64-839f-630517b0c7c0.Version: 3
Creating common variables for first resource affected by task:
Creating resource variables for task '20b85717-337a-4b64-839f-630517b0c7c0':
... bamboo.custom.aws.ecs.task.first.ClusterArn: arn:aws:ecs:us-east-1:309600995652:cluster/taws-it-270-29
... bamboo.custom.aws.ecs.task.first.ContainerInstanceArn: arn:aws:ecs:us-east-1:309600995652:container-instance/04e43cc4-2a6c-450e-bcee-35d076e010b4
... bamboo.custom.aws.ecs.task.first.DesiredStatus: RUNNING
... bamboo.custom.aws.ecs.task.first.LastStatus: RUNNING
... bamboo.custom.aws.ecs.task.first.StartedBy: null
... bamboo.custom.aws.ecs.task.first.StartedAt: 20151204T181331Z
... bamboo.custom.aws.ecs.task.first.StoppedAt: null
... bamboo.custom.aws.ecs.task.first.StoppedReason: null
... bamboo.custom.aws.ecs.task.first.TaskArn: arn:aws:ecs:us-east-1:309600995652:task/20b85717-337a-4b64-839f-630517b0c7c0
... bamboo.custom.aws.ecs.task.first.TaskDefinitionArn: arn:aws:ecs:us-east-1:309600995652:task-definition/taws-it-270-sleep:100

... bamboo.custom.aws.ecs.task.first.Version: 3

Start Task

See Run above.

Stop Task

See Run above.


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