Skip to content

Commit cf8862e

Browse files
authored
Merge pull request #156 from trydirect/feature/runtime-kata
Feature/runtime kata
2 parents 3c8d32a + 9202764 commit cf8862e

36 files changed

Lines changed: 2047 additions & 61 deletions

.sqlx/query-913f48776f9ca232282c78c7e7c27e421067b9bb7b327a42b63736e6a83ea725.json renamed to .sqlx/query-14fa465164d8fa6de1ab59209aff3db60e67415ccc5254af301adba4438971f5.json

Lines changed: 11 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-172dbb0c3947fa99e8522510096cd8dbfd785bb982a0622d3c05afb2ab3e260f.json renamed to .sqlx/query-2c181e4aba4f79192dc57a072431e230d6b11d52ab7f6040f612d9f217642b13.json

Lines changed: 11 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-8b3df91d5aec320fa8ffa47fc4d7fe61abe05cd5f4635d135d92dd605d065f56.json renamed to .sqlx/query-5e0b8298645aaf647eb1eb16dd74d81d663436e3a4fc6900d6f066e261ea8c54.json

Lines changed: 11 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-546d2bb7ff653c0ae1f6dcc5e68b12a670230de592557d27159acd2fc09400c6.json renamed to .sqlx/query-cd86c117d0d53af2bdbb0e3d38c179bfa6025ef0a7f1245d59b8dfca1f421c63.json

Lines changed: 11 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-c59246b73cf3c5a0fd961d2709477ce724f60cdb03492eef912a9fe89aee2ac4.json renamed to .sqlx/query-d0180ded027387b6ed250412927e1252aab3be67b016e9dc10a40ba229225b68.json

Lines changed: 10 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-b92417574329b82cae2347027db12f4794c1fc48b67d64c34c88fd9caf4508f5.json renamed to .sqlx/query-e30c243399e8d63aabb6b1002b499280f8140801c861122c5cbe59faa9797016.json

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-2549c42f23a506832e2a6bc857f1148e6f070b593c9d65c4c819d87e87a76ee0.json renamed to .sqlx/query-e648979c7b4c4ced099543c181db8c71c1f4fd980368cbf872cb8954c1c7be9e.json

Lines changed: 12 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Added — Kata Containers Runtime Support
8+
9+
- `runtime` field on `deploy_app` and `deploy_with_configs` agent commands — values: `runc` (default), `kata`
10+
- Server-side validation rejects unknown runtime values with HTTP 422
11+
- Kata capability gating: agent `/capabilities` response checked before scheduling Kata deployments; agents without `kata` feature receive 422 rejection
12+
- `--runtime kata|runc` flag on `stacker deploy` and `stacker agent deploy-app` CLI commands
13+
- Database migration `20260406170000`: `runtime` column added to `deployment` table, persisted across redeploys
14+
- Vault integration: per-deployment runtime preference (`store_runtime_preference` / `fetch_runtime_preference`) and org-level runtime policy (`fetch_org_runtime_policy`)
15+
- Compose template support: `runtime:` field conditionally emitted in generated `docker-compose.yml` when runtime is not `runc` (both Tera and CLI generators)
16+
- Enhanced tracing: `runtime` field added to `Agent enqueue command` span for structured log filtering
17+
- Documentation: `docs/kata/` — setup guide, network constraints, monitoring/observability reference
18+
- Provisioning: Ansible role and Terraform module for Hetzner dedicated-CPU (CCX) servers with KVM/Kata pre-configured (integrated into TFA)
19+
720
### Fixed — Casbin ACL for marketplace compose access
821
- Added Casbin policy granting `group_admin` role GET access to `/admin/project/:id/compose`.
922
- This allows the User Service OAuth client (which authenticates as `root``group_admin`) to fetch compose definitions for marketplace templates.

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ The end-user tool. No server required for local deploys.
134134
| Command | Description |
135135
|---------|-------------|
136136
| `stacker init` | Detect project type, generate `stacker.yml` + `.stacker/` artifacts |
137-
| `stacker deploy` | Build & deploy the stack (local, cloud, or server) |
137+
| `stacker deploy` | Build & deploy the stack (local, cloud, or server). `--runtime kata\|runc` selects container runtime |
138138
| `stacker status` | Show running containers and health |
139139
| `stacker logs` | View container logs (`--follow`, `--service`, `--tail`) |
140140
| `stacker list deployments` | List deployments on the Stacker server |
@@ -155,7 +155,7 @@ The end-user tool. No server required for local deploys.
155155
| `stacker agent status` | Display agent snapshot — containers, versions, uptime |
156156
| `stacker agent logs <app>` | Retrieve container logs from the remote agent |
157157
| `stacker agent restart <app>` | Restart a container via the agent |
158-
| `stacker agent deploy-app` | Deploy or update an app container on the target server |
158+
| `stacker agent deploy-app` | Deploy or update an app container on the target server. `--runtime kata\|runc` selects container runtime |
159159
| `stacker agent remove-app` | Remove an app container (with optional volume/image cleanup) |
160160
| `stacker agent configure-proxy` | Configure Nginx Proxy Manager via the agent |
161161
| `stacker agent history` | Show recent command execution history |
@@ -338,11 +338,27 @@ cargo test deployment_validator # Deployment validation
338338
339339
---
340340
341+
## Kata Containers (Hardware Isolation)
342+
343+
Stacker supports [Kata Containers](https://katacontainers.io/) as an alternative runtime, providing VM-level isolation for each container using hardware virtualization (KVM).
344+
345+
**KVM requirement** — Kata needs nested or bare-metal KVM. Hetzner dedicated-CPU servers (CCX line) expose `/dev/kvm` out of the box, making them an ideal deployment target.
346+
347+
```bash
348+
stacker deploy --runtime kata # deploy the current stack with Kata isolation
349+
stacker agent deploy-app --runtime kata # deploy a single app container with Kata
350+
```
351+
352+
See [docs/kata/](docs/kata/README.md) for the full setup guide, network constraints, and monitoring reference. Automated provisioning (Ansible + Terraform for Hetzner CCX) is available via the TFA infrastructure toolkit.
353+
354+
---
355+
341356
## Documentation
342357
343358
- [stacker.yml reference](docs/STACKER_YML_REFERENCE.md) — full configuration schema
344359
- [CLI implementation plan](docs/STACKER_CLI_PLAN.md) — architecture and design decisions
345360
- [Changelog](CHANGELOG.md) — release history
361+
- [Kata Containers guide](docs/kata/README.md) — hardware-isolated containers with KVM
346362
347363
---
348364

0 commit comments

Comments
 (0)