Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ jobs:
- name: Test installer transactions and release channels
run: dash deploy/test-install-upgrade.sh

- name: Test installer with BusyBox ash and awk
run: docker run --rm -v "$PWD:/work:ro" -w /work busybox:1.37 sh deploy/test-install-upgrade.sh

- name: Test changelog extraction
run: dash scripts/test-extract-changelog.sh

Expand Down
6 changes: 3 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/depl

### 2. 接入 Agent

以管理员登录 → **设置** → 生成一个一次性 **enrollment code**(单次使用,约 10 分钟后过期)。然后在每个节点上:
以管理员登录,进入 **服务器(Servers)→ 添加服务器(Add Server)**,复制生成的安装命令。其中的 Server 绑定注册凭据仅可使用一次,约 10 分钟后过期。然后在每个节点上运行:

```bash
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- agent --method binary \
Expand Down Expand Up @@ -85,7 +85,7 @@ password = "" # 留空自动生成
```toml
# /etc/serverbee/agent.toml
server_url = "http://your-server:9527"
enrollment_code = "" # 来自设置页的一次性 code,仅用于首次注册
enrollment_code = "" # 来自 Servers → Add Server 的一次性 code仅用于首次注册

[collector]
interval = 3 # 上报间隔(秒)
Expand Down Expand Up @@ -130,7 +130,7 @@ make test # 前端测试
make cargo-clippy # Rust 代码检查
```

> `make dev-full` 启动带 HMR 的 Vite(`http://localhost:5173`),并代理 `/api/*` 到 `:9527` 的 Rust 服务端。在 **设置** 页生成一次性 enrollment code 即可接入开发用 Agent。
> `make dev-full` 启动带 HMR 的 Vite`http://localhost:5173`),并代理 `/api/*` 到 `:9527` 的 Rust 服务端。在 **Servers → Add Server** 生成一次性 enrollment code即可接入开发用 Agent。

**技术栈:** Rust(Axum 0.8 · sea-orm · SQLite WAL)· React 19(Vite 7 · TanStack Router/Query · Bklit · shadcn/ui · Tailwind CSS v4)· Rust Agent(sysinfo · tokio-tungstenite)。

Expand Down
2 changes: 2 additions & 0 deletions crates/agent/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ async fn main() -> anyhow::Result<()> {
);
}
Err(register::RegisterError::PermanentAuth(msg)) => {
// Stable installer acceptance contract. Keep this prefix in sync
// with deploy/install.sh::wait_for_agent_install.
eprintln!(
"Permanent registration failure: {msg}\n\
The enrollment code is invalid, expired, or already used. \
Expand Down
2 changes: 2 additions & 0 deletions crates/agent/src/reporter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ impl Reporter {
// intentionally ignored: capabilities are agent-owned
// and already loaded into `capabilities` above. The
// agent enforces purely on its local policy.
// Stable installer acceptance contract. Keep this prefix in sync
// with deploy/install.sh::wait_for_agent_install.
tracing::info!(
"Welcome from server {server_id}, interval={report_interval}s"
);
Expand Down
Loading
Loading