搜索

PythonReactSEOPDF
GitHub Skill

control-plane-guide

Guide for the fort control plane - secure inter-host communication system. Use when adding capabilities to hosts, writing handlers, understanding the GC protocol, or debugging control plane issues. Triggers on questions about fort.host.capabilities, fort.host.needs, the fort CLI, handler scripts, or inter-host calls.

gisikw☆ 0 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

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.needs for a capability can call it
  • Config: /etc/fort/hosts.json, /etc/fort/rbac.json

Detailed Documentation

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!