Files
swarm-house/infra/terraform/sim-env/README.md
T
eSlider 5f6fd8462c
CI & Release / Verify simulator (push) Skipped
CI & Release / Trivy scan (push) Skipped
CI & Release / Semantic Release (push) Skipped
CI & Release / Verify simulator (pull_request) Failing after 4s
CI & Release / Trivy scan (pull_request) Skipped
CI & Release / Semantic Release (pull_request) Skipped
docs: audit links, glossary T0-T4, readability pass
Extend glossary with storage floors, source of truth, and linkable anchors.
Fix broken links, pose frame drift, rsync/offload wording, and README tone.
Add docs/improvement audit records and live demo links in design journey.
2026-07-10 10:46:59 +01:00

33 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Terraform — simulation environment ([T4](../../../docs/00-glossary.md#t4--dev))
Sim fleet + observability on k3d. Cluster from [`../../ansible/sim-cluster.yml`](../../ansible/sim-cluster.yml). Executable [T4](../../../docs/00-glossary.md#t4--dev) miniature ([06 — Environments](../../../docs/06-environments.md)).
| Resource | Purpose |
| --- | --- |
| StatefulSet `drone` × `drone_count` | Virtual drones; pod names → `DRONE_ID`; shared `/data` lake |
| Deployment `exporter` | Prometheus exporter reading lake with DuckDB |
| Deployment `explorer` + NodePort 30088 | Partition tree + read-only SQL (prototype live mode) |
| Deployment `prometheus` + NodePort 30990 | Scrapes exporter |
| Deployment `grafana` + NodePort 30300 | Dashboard JSON from ConfigMap |
## Usage
```bash
ansible-playbook ../../ansible/sim-cluster.yml # once: cluster + image
terraform init
terraform apply
terraform output # URLs
```
Scale without YAML edits:
```bash
terraform apply -var drone_count=9 -var speedup=4
```
## Notes
- `image_pull_policy = "Never"` — image imported by Ansible (`k3d image import`); no registry pull. Air-gap mirror.
- Pod name → identity (StatefulSet ordinal). `kubectl delete pod` = power cycle: new process, same identity, new flight ID.
- Local state only — cluster disposable.