依赖项目
Harbor 部署指南
Crater 依赖于内部的 Harbor 镜像仓库,以支持集群内镜像的构建、存储和安全分发。
部署
我们建议使用 官方 Harbor Helm Chart 进行部署。一个基本示例:
helm repo add harbor https://helm.goharbor.io
helm pull harbor/harbor --version 1.14.0
# 根据需要修改 values.yaml(见下文)
helm install crater-harbor harbor/harbor -f values.yaml -n harbor-system --create-namespace
注意事项:
确保域名(例如 crater-harbor.act.buaa.edu.cn)在您的集群或内部 DNS 中可解析。
您需要有效的 TLS 配置,或者将 expose.tls.enabled 设置为 false 以使用 HTTP。
配置提示
在 values.yaml 中正确设置 externalURL:
externalURL: https://crater-harbor.act.buaa.edu.cn
配置 Ingress 使用适当的类(ingress-nginx)和主机名。
使用内部证书或在测试时禁用 TLS:
expose:
tls:
enabled: false
镜像拉取密钥
为允许 Crater 组件从 Harbor 拉取镜像:
kubectl create secret docker-registry crater-harbor-auth \
--docker-server=crater-harbor.act.buaa.edu.cn \
--docker-username=<user> \
--docker-password=<password> \
-n <target-namespace>
然后您可以在 pod.spec.imagePullSecrets 中引用此密钥。
Harbor 项目结构
项目结构如下所示:
项目 | 目的 |
---|---|
crater/base | 基础操作系统和工具 |
crater/jobs | 用户提交的作业镜像 |
crater/charts | Helm chart 的镜像 |
crater/models | 推理使用的大型模型 |
与 Crater 集成
大多数系统组件(例如 gpu-operator, ingress-nginx, prometheus)都预配置为使用 Harbor 镜像。
镜像路径应如下所示:
crater-harbor.act.buaa.edu.cn/crater/<component>:<tag>
在 Helm chart 自定义过程中,请更新 image.repository 和 imagePullSecrets。