vault backup: 2026-04-22 22:43:37

This commit is contained in:
2026-04-22 22:43:37 +08:00
parent 98f29c8160
commit 225217d385
6 changed files with 187 additions and 6 deletions

View File

@@ -494,4 +494,160 @@ UsageType=EditorAndClient
1. **Nginx 未配置**: 当前 nginx 容器使用默认配置,未做反向代理。如需 HTTPS 需重新配置。
2. **MapViewOfFile 分页错误**: 本机编译时偶发 9-38 次 paging error可能需增大 page file。
3. **Agent HIH-D-X13864 (远程) 经常 Offline**: 该 Agent 状态不稳定,可能需要检查 HordeAgent 服务自动重启。
4. **OIDC 已移除**: 当前 Anonymous 模式无访问控制,内网使用可接受,外网暴露需重新配置认证。
4. **OIDC 已移除**: 当前 Anonymous 模式无访问控制,内网使用可接受,外网暴露需重新配置认证。
---
# AI Agent 部署 Horde Agent 提示词
> 以下提示词供其他 AI Agent如 Claude Code在新机器上部署 Horde Agent 使用。
> 分为 **Worker 模式**(参与 UBA 分布式编译,需安装 MSVC和 **非 Worker 模式**(仅注册 Agent不参与编译
## 通用前置条件
- 目标机器Windows 10/11有管理员权限可通过 SSH 连接
- Horde Server 地址:`http://10.219.36.57:5001`gRPC: `:5002`
- 参考已部署 Agent本机 `C:\Program Files\Epic Games\Horde\Agent\` 可作为文件源
## 提示词 A: Worker 模式(参与 UBA 分布式编译)
```
你需要在一台 Windows 机器上部署 Unreal Horde Agent 并配置为 UBA 远程编译 Worker。
## 目标机器信息
- IP: {目标IP}
- SSH 用户名: {用户名}
- SSH 密码: {密码}
- 用途: UBA 远程分布式编译 Worker
## Horde 基础信息
- Horde Server: http://10.219.36.57:5001
- gRPC 端口: 5002
- 认证方式: Anonymous无需 token
## 部署步骤
### 1. 安装 .NET 8 Runtime
```
winget install Microsoft.DotNet.AspNetCore.8 --accept-package-agreements --accept-source-agreements
```
安装后需要重新打开 SSH 会话使 PATH 生效。
### 2. 创建 Agent 目录并传输文件
将源机器 `C:\Program Files\Epic Games\Horde\Agent\` 整个目录复制到目标机器相同路径。
关键文件HordeAgent.exe, HordeAgent.dll, 所有 *.dll, Defaults/ 目录, appsettings.json。
可使用 paramiko SFTP 或 SCP 传输。
### 3. 配置 Server URL注册表方式
Agent 的 Server URL 必须通过注册表配置,不是 appsettings.json
```
reg add "HKLM\SOFTWARE\Epic Games\Horde" /v server /t REG_SZ /d "http://10.219.36.57:5001" /f
```
### 4. 安装 MSVC Build ToolsUBA 编译必需)
```
winget install Microsoft.VisualStudio.2022.BuildTools --override "--quiet --wait --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended" --accept-package-agreements --accept-source-agreements
```
安装时间较长10-30分钟安装完成后验证 cl.exe 和 link.exe 存在:
```
dir "C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\*\bin\Hostx64\x64\cl.exe" /s /b
```
### 5. 安装为 Windows 服务并启动
```
sc.exe create "HordeAgent" binPath="\"C:\Program Files\Epic Games\Horde\Agent\HordeAgent.exe\"" start=auto
sc.exe start "HordeAgent"
```
### 6. 批准 Enrollment
Agent 首次启动会向 Server 注册。通过 API 查看待批准的注册:
```
curl http://10.219.36.57:5001/api/v1/agents
```
找到新 Agent 的 ID通常是机器 hostname通过 Dashboard http://10.219.36.57:5001 批准。
### 7. 配置防火墙UBA 双向通信必需)
远程 Worker 需要开放以下入站端口:
```
netsh advfirewall firewall add rule name="Horde Compute" dir=in action=allow protocol=tcp localport=7000
netsh advfirewall firewall add rule name="UBA Agent Listen" dir=in action=allow protocol=tcp localport=7001
netsh advfirewall firewall add rule name="UBA Agent Proxy" dir=in action=allow protocol=tcp localport=7002
netsh advfirewall firewall add rule name="UBA Port Range" dir=in action=allow protocol=tcp localport=7000-7100
netsh advfirewall firewall add rule name="UBA SessionServer" dir=in action=allow protocol=tcp localport=1345-1400
```
### 8. 验证
- 确认 Agent 在 Dashboard 显示为 Online
- 确认 Agent 加入 win-ue5 Pool
- 检查端口 7000 监听: `netstat -an | findstr 7000`
- 在发起方机器编译时观察 UBA 日志是否分发任务到此 Worker
## 注意事项
- 发起方(编译发起机器)也需要开放入站端口 1345-1400UBA SessionServer否则远程 UbaClient 无法连回
- MSVC 版本需要与发起方引擎版本兼容UE 5.5 使用 MSVC 14.x
- Agent 的 Server URL 只能通过注册表配置,写 appsettings.json 无效
```
## 提示词 B: 非 Worker 模式(仅注册 Agent不参与编译
```
你需要在一台 Windows 机器上部署 Unreal Horde Agent。该 Agent 仅需注册到 Horde Server不参与 UBA 编译。
## 目标机器信息
- IP: {目标IP}
- SSH 用户名: {用户名}
- SSH 密码: {密码}
- 用途: Horde Agent 注册CI 任务 / 工具分发 / 监控)
## Horde 基础信息
- Horde Server: http://10.219.36.57:5001
- gRPC 端口: 5002
- 认证方式: Anonymous
## 部署步骤
### 1. 安装 .NET 8 Runtime
```
winget install Microsoft.DotNet.AspNetCore.8 --accept-package-agreements --accept-source-agreements
```
### 2. 创建 Agent 目录并传输文件
将源机器 `C:\Program Files\Epic Games\Horde\Agent\` 整个目录复制到目标机器相同路径。
可使用 paramiko SFTP 或 SCP 传输。
### 3. 配置 Server URL注册表方式
```
reg add "HKLM\SOFTWARE\Epic Games\Horde" /v server /t REG_SZ /d "http://10.219.36.57:5001" /f
```
### 4. 安装为 Windows 服务并启动
```
sc.exe create "HordeAgent" binPath="\"C:\Program Files\Epic Games\Horde\Agent\HordeAgent.exe\"" start=auto
sc.exe start "HordeAgent"
```
### 5. 批准 Enrollment
通过 Dashboard http://10.219.36.57:5001 批准新 Agent 注册。
### 6. 验证
- 确认 Agent 在 Dashboard 显示为 Online
- 确认 Agent 加入正确的 Pool
## 注意事项
- 不需要安装 MSVC Build Tools
- 不需要配置 UBA 防火墙端口
- Agent 的 Server URL 只能通过注册表配置,写 appsettings.json 无效
```
## 快速参考:部署检查清单
| 步骤 | Worker | 非 Worker | 说明 |
|------|--------|----------|------|
| .NET 8 Runtime | 必需 | 必需 | `winget install Microsoft.DotNet.AspNetCore.8` |
| Agent 文件传输 | 必需 | 必需 | 从已有 Agent 机器复制整个目录 |
| 注册表配置 Server URL | 必需 | 必需 | `HKLM\SOFTWARE\Epic Games\Horde``server` |
| 安装 Windows 服务 | 必需 | 必需 | `sc.exe create` + `sc.exe start` |
| 批准 Enrollment | 必需 | 必需 | Dashboard 或 API |
| MSVC Build Tools | **必需** | 不需要 | UBA 编译依赖 |
| 防火墙端口 7000-7002 | **必需** | 不需要 | UBA 通信端口 |
| 防火墙端口 1345-1400 | **必需** | 不需要 | UBA SessionServer |