私有化部署
XGopilot 支持自托管部署,适用于有私有 GitLab 实例、企业内网或数据安全要求的团队。
使用 GitHub? 直接安装 XGopilot GitHub App —— 无需搭建服务器。
七牛资源栈一键部署(推荐)
对于使用七牛云的团队,通过资源栈一键完成 XGopilot 的完整部署。
部署入口:portal.qiniu.com/las/rfs/stacks/create
部署步骤
第 1 步:选择部署区域
推荐选择中国(常山 1)。
第 2 步:创建资源栈名称
自定义资源栈名称。
第 3 步:配置代码仓同步
| 字段 | 值 |
|---|---|
| 仓库地址 | https://ghfast.top/https://github.com/qiniu/terraform-module |
| 仓库子目录 | codeagent/standard/ |
| 仓库分支 | main |
第 4 步:配置模板变量
必填变量:
| 参数名 | 示例值 | 说明 |
|---|---|---|
model_api_key | sk-xxxxxx | 七牛大模型 API KEY(必填,至少 10 个字符)。获取地址:portal.qiniu.com/ai-inference/api-key |
gitlab_base_url | https://gitlab.example.com | 接入的 GitLab 地址(必填,须以 http:// 或 https:// 开头) |
gitlab_token | glpat-xxxxxxxxxxxx | GitLab Personal Access Token(必填) |
gitlab_webhook_secret | 0123456789 | GitLab Webhook 密钥(必填,需与 GitLab Webhook 配置中的 Secret 保持一致) |
{
"model_api_key": "sk-xxxxxxxxxxxxxx",
"gitlab_base_url": "https://gitlab.example.com",
"gitlab_token": "glpat-xxxxxxxxxxxx",
"gitlab_webhook_secret": "0123456789"
}
可选资源变量:
成本参考:使用默认配置(
ecs.c1.c12m24实例 + 100GB 系统盘 + 200Mbps 峰值带宽),预估主机每日费用约 30 元人民币。实际费用以七牛云账单为准。
| 参数名 | 默认值 | 说明 | 取值范围 |
|---|---|---|---|
instance_type | ecs.c1.c12m24 | ECS 实例规格 | T1/C1/G1 系列(见下方) |
instance_system_disk_size | 100 | 系统盘大小(GiB) | 100–500 |
internet_max_bandwidth | 200 | 最大互联网带宽(Mbps) | 50–200 |
internet_charge_type | PeakBandwidth | 互联网计费方式 | Bandwidth、PeakBandwidth、Traffic |
image_id | image-694ba6d04003c59f46bd71c5 | 预配置镜像 ID | image-xxxxx 格式 |
支持的 ECS 实例规格:
- T1 系列:ecs.t1.c1m2, c2m4, c4m8, c8m16, c12m24, c16m32, c24m48, c32m64
- C1 系列:ecs.c1.c1m2, c2m4, c4m8, c8m16, c12m24, c16m32, c24m48, c32m64
- G1 系列:ecs.g1.c16m120, ecs.g1.c32m240
第 5 步:配置存储位置(可选)
可不填,系统将自动生成。自动生成规则:kodo://rfs-<随机8字符>-<区域ID>-artifacts
第 6 步:确认配置
勾选确认配置信息。
第 7 步:创建资源栈
点击创建按钮,完成部署。