Description:
Athena currently compiles any .ath file into a docker-compose.yml.
To support future targets (Kubernetes), the rendering system must be refactored into a multi-backend architecture with conventions for project structure.
Conventions:
Athena should support both implicit and explicit target selection when building .ath files.
Default behavior (no --target flag)
If no --target is provided, Athena generates a standard Docker Compose file:
athena build infra/docker.ath
→ Produces a docker-compose.yml optimized for local development (Compose-only, without Swarm deploy: blocks).
Explicit target selection
Users can explicitly specify the desired backend:
# Docker Swarm
athena build infra/docker.ath --target swarm
# → Generates a Swarm-ready stack file with full `deploy:` section.
# Kubernetes
athena build infra/kube.ath --target kubernetes
# → Generates Kubernetes manifests (Deployments, Services, ConfigMaps, etc.)
Summary
athena build infra/docker.ath
and get a simple Compose setup
- Advanced / production users can run:
athena build infra/docker.ath --target swarm
for Swarm, or:
athena build infra/kube.ath --target kubernetes
for Kubernetes.
Implementation Requirements:
-
Parser: No change, DSL stays target-agnostic.
-
Core AST: Ensure it remains infrastructure-independent.
-
CLI changes: Add --target flag.
Tests:
-
Validation for each backend renderer.
-
Ensure consistent core AST across targets.
-
Check fallback behavior when --target is omitted.
Description:
Athena currently compiles any .ath file into a docker-compose.yml.
To support future targets (Kubernetes), the rendering system must be refactored into a multi-backend architecture with conventions for project structure.
Conventions:
Athena should support both implicit and explicit target selection when building
.athfiles.Default behavior (no
--targetflag)If no
--targetis provided, Athena generates a standard Docker Compose file:→ Produces a
docker-compose.ymloptimized for local development (Compose-only, without Swarmdeploy:blocks).Explicit target selection
Users can explicitly specify the desired backend:
Summary
and get a simple Compose setup
for Swarm, or:
for Kubernetes.
Implementation Requirements:
Parser: No change, DSL stays target-agnostic.
Core AST: Ensure it remains infrastructure-independent.
CLI changes: Add --target flag.
Tests:
Validation for each backend renderer.
Ensure consistent core AST across targets.
Check fallback behavior when --target is omitted.