Skip to content

Multi-Backend Infrastructure Support #14

@Jeck0v

Description

@Jeck0v

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

  • Developers can just run:
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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions