Imported from David-Li0406/meta-skill-evloving (
skill-flow/data/skills-refined-skillclaw-36k/skillsmp/control-plane-guide/SKILL.md). Install upstream withnpx skills add David-Li0406/meta-skill-evloving --skill control-plane-guide. Copyright stays with the author.
Fort Control Plane Guide
The fort control plane enables secure inter-host communication. Hosts expose capabilities (endpoints) that other hosts call via signed HTTP requests.
Quick Reference
Client (calling a capability):
fort <host> <capability> [request-json] # request-json defaults to '{}'
Examples:
fort drhorrible status # Simple status check
fort joker journal '{"unit": "nginx"}' # Pass JSON for params
Provider (exposing a capability):
fort.host.capabilities.my-capability = {
handler = ./handlers/my-capability; # Script handling requests
needsGC = false; # Enable garbage collection
ttl = 0; # GC time-to-live (seconds)
description = "What this does";
};
Consumer (depending on a capability):
fort.host.needs.my-capability.my-id = {
providers = ["hostname"]; # Host(s) providing this
request = { key = "value"; }; # Request payload
store = "/var/lib/myapp/response"; # Where to store response
restart = ["myapp.service"]; # Services to restart on change
};
Key Files
| Path | Purpose |
|---|---|
common/fort/control-plane.nix |
Nix module: options and config generation |
pkgs/fort/ |
Client CLI (Bash) |
pkgs/fort-provider/ |
Server (Go FastCGI) |
/etc/fort/ |
Runtime config on hosts |
/var/lib/fort/ |
GC handles and state |
Standard Capabilities
All hosts expose these:
| Capability | Returns |
|---|---|
status |
Hostname, uptime, failed units, deploy info |
manifest |
Apps, aspects, roles, exposed services |
needs |
Declared needs (for GC enumeration) |
Authentication & RBAC
- Requests signed with SSH keys (
ssh-keygen -Y sign) - RBAC computed at eval time from cluster topology
- Only hosts declaring
fort.host.needsfor a capability can call it - Config:
/etc/fort/hosts.json,/etc/fort/rbac.json
Detailed Documentation
- capabilities.md - Adding capabilities to hosts
- handlers.md - Writing handler scripts
- gc-protocol.md - Garbage collection system
- troubleshooting.md - Debugging issues