Skip to content

Fargate capacities launch #29

Closed

Description

@sodre

Parent

#18

What to build

ci-fargate and ci-fargate-spot work end to end for any size and architecture. A job carrying either label gets one fresh Fargate task, which runs that job and exits.

  • Label contract: the two capacity labels join it. Picking one is the job's promise not to use Docker (ADR-0001).
  • Stack:
    • one ECS cluster with the FARGATE and FARGATE_SPOT capacity providers;
    • x64 and arm64 task definitions using the ECR image, an execution role that may only pull that repo and write the log group, no task role, and 50 GB of ephemeral storage;
    • logs to /ecs/<stack>-runner, kept 7 days.
  • Launcher:
    • calls RunTask with the capacity provider, task-level cpu/memory for the size, and the JIT config in a container override;
    • public IP on, in the stack's subnets and security group, leaving out any use1-az3 subnet for arm64;
    • tags tasks with the same ci-runner:* tags as instances.
  • Budgets: tasks count against the new FargateSpotVcpuCap (24) and FargateVcpuCap (8).
  • Idle exit: an entrypoint wrapper in the image stops a runner that has had no job for 15 minutes. EC2 keeps its host script.
  • Roles: the launcher's role gains only ecs:RunTask on the two task definitions, iam:PassRole on the execution role, and tagging on create.

Acceptance criteria

  • Webhook tests: both labels are accepted with every size and architecture.
  • Launcher tests:
    • the RunTask call per capacity, size and architecture;
    • the arm64 subnet exclusion;
    • budgets summed across tasks;
    • a failed RunTask removes its registration and fails the message, as the EC2 path does.
  • Tests that need real ECS shapes use aws/aws-emulator.
  • Inside a task, the metadata endpoints give no AWS credentials.
  • The smoke test checks the idle-exit wrapper with a short timeout.
  • Proven live: one job on each Fargate capacity runs. A task whose job went elsewhere exits on its idle timeout.
  • README, docs/stack.md and the runbook cover the Fargate capacities. The traps table covers "Docker used on Fargate" and "Fargate quota at its default".

Activity

  1. added 2 commits that reference this issue on Nov 14, 2026
  2. sodre commented on Nov 14, 2026

    @sodre
    MemberAuthor

    Live (integration c6a2d74, after PR #36 published the fixed wrapper): hand-run task with IDLE_SECONDS=120 logged no job within 120s, stopping and was STOPPED ~145 s after start (exit 143); a canary task whose job went elsewhere stopped at the default 900 s. Earlier: one job each on ci-fargate-spot and ci-fargate (canary run 43551343087), no AWS credentials in a task, iam:PassRole fixed via ZAEPowerUserBoundary on the launcher role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions