Esta página se tradujo automáticamente. Leer el original en inglés.

Recipe

worker-ecs

The generic background-worker primitive as one Amazon ECS service on Fargate, running infra.replicas tasks of the Release's image, rendered by vendoring a Terraform module kept beside this Recipe. Reach for it where the target is an AWS account with an ECS cluster and a VPC; reach for helm/worker on a Kubernetes cluster. The cluster, subnets, security groups and execution role come from the operator, under infra.overrides, and each is required; a task role, a public IP and a log group are optional, and nothing is emitted for one left unset. Only a task definition and a service are emitted — no cluster, role, security group, log group or load balancer, each of which the operator already runs — and the container maps no port, so nothing connects to the worker. No container health check is declared, because ECS runs one inside an image this Recipe does not name. Each env entry an edge's inject block, or the component's own, dictates becomes an entry of the container's environment under that name, its value written whole, so a Terraform reference a neighbour publishes is evaluated by the engine; concurrency and queue_depth_hint arrive by default as WORKER_CONCURRENCY and WORKER_QUEUE_DEPTH_HINT, which no edge may dictate while they are the defaults. File, arg and other entries are refused by name: Fargate writes no file, and no command line is rendered. The task runs at the smallest Fargate size meeting both infra.compute.cpu and infra.compute.memory, so the Component's defaults run at 0.25 vCPU and 512 MiB. The terraform-aws-modules ECS module is not sourced: its root runs services only in a cluster it creates itself, so it is not complete for a service in the operator's cluster.

Procedencia

OficialFirmado por una identidad de firma que este catálogo reconoce como editor oficial.
Digest del contenido
sha256:a1ab58c150148dd9f8c41e3802863637118cbfd924704eb91c7808afe32fc3a2
Publicado
2026-11-10T10:29:04Z
Identidad de firma
https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

Firma

  • Oficialapplication/vnd.dev.sigstore.bundle.v0.3+json

    https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

    sha256:23932ee423ecb3975cad435b4b08d52100b8514892324da0d993f24c24c73774

Referencia en esta versión

oci://hub.aggrega.ai/recipe/terraform/worker-ecs:1.0.0
Destino
—
Implementa
core/compute/worker:1.0.0

Proporciona

Plantillas de punteros deterministas que esta receta cablea para los consumidores.

No se declararon plantillas provides.

Workload

No se declaró ninguna plantilla de carga de trabajo.

Variables locales

NombrePlantilla
cpu_millicores{{- $c := toString (optional (optional .infra "compute" dict) "cpu" "") -}} {{- if regexMatch `^[0-9]+m worker-ecs 1.0.0 · Catálogo de Aggrega $c -}}{{ atoi (trimSuffix "m" $c) }} {{- else if regexMatch `^[0-9]+(\.[0-9]{1,3})? worker-ecs 1.0.0 · Catálogo de Aggrega $c -}} {{- $p := splitList "." $c -}}{{- $f := 0 -}} {{- if eq (len $p) 2 }}{{ $f = atoi (substr 0 3 (printf "%s000" (index $p 1))) }}{{ end -}} {{- add (mul (atoi (index $p 0)) 1000) $f -}} {{- end -}}
memory_mib{{- $m := toString (optional (optional .infra "compute" dict) "memory" "") -}} {{- if regexMatch `^[0-9]+Mi worker-ecs 1.0.0 · Catálogo de Aggrega $m -}}{{ atoi (trimSuffix "Mi" $m) }} {{- else if regexMatch `^[0-9]+Gi worker-ecs 1.0.0 · Catálogo de Aggrega $m -}}{{ mul (atoi (trimSuffix "Gi" $m)) 1024 }} {{- end -}}
task_size{{- $found := "" -}} {{- if and .locals.cpu_millicores .locals.memory_mib -}} {{- $mc := atoi .locals.cpu_millicores -}}{{- $mib := atoi .locals.memory_mib -}} {{- range list (list 256 (list 512 1024 2048)) (list 512 (untilStep 1024 4097 1024)) (list 1024 (untilStep 2048 8193 1024)) (list 2048 (untilStep 4096 16385 1024)) (list 4096 (untilStep 8192 30721 1024)) (list 8192 (untilStep 16384 61441 4096)) (list 16384 (untilStep 32768 122881 8192)) (list 32768 (list 61440 122880 249856)) -}} {{- $cpu := index . 0 -}} {{- if and (not $found) (ge (mul $cpu 1000) (mul $mc 1024)) -}} {{- range index . 1 }}{{ if and (not $found) (ge . $mib) }}{{ $found = printf "%d/%d" $cpu . }}{{ end }}{{ end -}} {{- end -}} {{- end -}} {{- end -}} {{- $found -}}
task_cpu{{ if .locals.task_size }}{{ index (splitList "/" .locals.task_size) 0 }}{{ end }}
task_memory{{ if .locals.task_size }}{{ index (splitList "/" .locals.task_size) 1 }}{{ end }}

Mapeo de valores

No se declaró ningún mapeo de valores.

Relaciones

Aristas tipadas hacia y desde otras entidades publicadas. Una referencia sin un destino publicado se muestra como una arista rota en lugar de como un enlace.

Usa

Usado por

Nada en el catálogo depende de esta entidad.

Referencia del concepto Recipe →

El catálogo de Aggrega — un índice abierto de componentes, funcionalidades, recetas y los plugins que los renderizan.

Creado con el sistema de diseño compartido de Aggrega.

Privacidad