Show HN: 每个开发板专用的边车容器,用于串口访问、烧录和启动
1 分•作者: acarminati•大约 3 小时前
Hi HN,
我一直在构建一个名为 Provisioner 的小型基础设施工具:一个用于 SBC(单板计算机)启动和实验室自动化的、基于单板的配置辅助工具。
[https://github.com/alessandrocarminati/provisioner](https://github.com/alessandrocarminati/provisioner)
它的模型很简单:每个板子一个实例。它与硬件相邻,拥有串口控制台,通过 SSH 暴露访问权限,并通过 TFTP/HTTP 提供启动工件(内核、initramfs、rootfs)。它专为网络不可靠、存储半刷写、UART 是唯一可靠信息的阶段而设计。
它的功能包括:
- 串口控制台所有权 + SSH 多路复用
- 监控 shell + 串口隧道
- 可脚本化的启动交互
- 工件配置(TFTP + HTTP)
- 通过串口进行带内文件传输
- gzip/base64 技巧 + XMODEM
- 源于我之前的 send_console-ng 实用程序 [https://github.com/alessandrocarminati/send_file-ng](https://github.com/alessandrocarminati/send_file-ng)
- 可插拔的电源控制
- SNMP PDUs,以及其他廉价的 ESP8266/Tasmota 设备
- 串口日志记录
- 轻量级访问控制
Provisioner 还将一个最小的 init 运行时(goinit)嵌入到内核 initramfs 中,充当其板载配置代理,处理刷写、工件检索,并通过串口报告管理状态。
路由和流处理
在内部,Provisioner 通过一个可插拔的路由器路由串口流量:
- 生产者/消费者作为组件连接
- 人类与机器客户端区别处理
- 单播控制会话
- 广播多路复用到多个观察者
这允许多个用户或服务在不干扰的情况下观察同一个控制台。
过滤器
一个过滤器子系统可以拦截和修改串口流。
最初添加是为了缓解 ANSI 设备状态报告(例如光标位置报告问题)在隧道串口控制台时出现的问题,但它也可用作自动化和标准化的通用流重写机制。
定位
并非旨在取代 LAVA 等大型系统。
这主要针对:
- 家庭实验室
- 启动工作台
- 内核/BSP 工作
- 小型共享实验室
想象一下,您可以在一个下午部署的实验室自动化,而不是舰队编排。
该项目仍在发展中,但已投入日常使用。欢迎反馈和滥用。
查看原文
Hi HN,<p>I’ve been building a small infrastructure tool called Provisioner: a per-board provisioning sidecar for SBC bring-up and lab automation.
<a href="https://github.com/alessandrocarminati/provisioner" rel="nofollow">https://github.com/alessandrocarminati/provisioner</a><p>The model is simple: one instance per board. It sits next to the hardware, owns the serial console, exposes access over SSH, and serves boot artifacts (kernel, initramfs, rootfs) via TFTP/HTTP. It’s designed for the phase where networking is unreliable, storage is half-flashed, and UART is the only thing still telling the truth.<p>What it does<p>- Serial console ownership + SSH multiplexing
- Monitor shell + serial tunnels
- Scriptable boot interaction
- Artifact provisioning (TFTP + HTTP)
- In-band file transfer over serial
- gzip/base64 hacks + XMODEM
- Derived from my earlier send_console-ng utility <a href="https://github.com/alessandrocarminati/send_file-ng" rel="nofollow">https://github.com/alessandrocarminati/send_file-ng</a>
- Pluggable power control
- SNMP PDUs, among others cheap ESP8266/Tasmota devices
- Serial logging
- Lightweight access control<p>Provisioner also embeds a minimal init runtime (goinit) inside the kernel initramfs, acting as its on-board provisioning agent, handling flashing, artifact retrieval, and reporting management state back over serial.<p>Routing & stream handling<p>Internally, Provisioner routes serial traffic through a pluggable router:<p>- Producers/consumers attach as components
- Human vs machine clients handled differently
- Unicast control sessions
- Broadcast multiplexing to multiple observers<p>This allows several users or services to watch the same console without interfering.<p>Filters<p>A filter subsystem can intercept and modify serial streams on the fly.<p>Originally added to mitigate ANSI Device Status Reports (e.g. Cursor Position Report issues) when tunneling serial consoles, but it doubles as a general stream rewriting mechanism for automation and normalization.<p>Positioning<p>Not trying to replace large systems like LAVA.<p>This is aimed at:<p>- Homelabs
- Bring-up benches
- Kernel/BSP work
- Small shared labs<p>Think lab automation you can deploy in an afternoon, not fleet orchestration.<p>Project is still evolving but already in daily use. Feedback and abuse welcome.