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
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.
33 lines
1.3 KiB
Markdown
33 lines
1.3 KiB
Markdown
# 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.
|