
goharbor/harbor-acceldAcceleration Service 是为 Harbor 提供的通用服务,具备自动将用户镜像转换为加速镜像的能力。当用户执行镜像推送等操作时,Harbor 会通过集成的 Nydus、eStargz, zstdchunked 等驱动,请求该服务完成相应的镜像转换。
及执行一次性镜像转换从 acceleration-service 发布页面 获取 accelctl 和 acceld 二进制文件。
登录 Harbor Web 界面。
选择一个项目,添加新的 Webhook 配置,填写以下字段:
<加速服务地址>/api/v1/conversions<加速服务配置的认证头>注意:Webhook 可帮助加速服务自动转换镜像。也可通过手动发送 HTTP 请求或使用
accelctl触发镜像转换任务。
创建系统机器人账户,填写以下字段:
<自定义>获取机器人账户 robot$<robot-name> 后,复制密钥并生成 base64 编码的认证字符串,命令如下:
bash$ echo -n '<robot-name>:<robot-secret>' | base64
注意:编码后的认证字符串将用于下一步配置加速服务。
provider.source 改为 Harbor 服务主机名,auth 和 webhook.auth_header 需配置为上述步骤生成的认证信息converter.driver 字段中的设置请参考模板配置文件中的注释进行配置。
在配置文件目录启动 acceld 守护进程:
bash$ ./acceld --config ./config.yaml
触发镜像转换:
bash$ docker push <harbor服务地址>/library/nginx:latest
accelctl 手动触发(确保源 OCI v1 镜像已存在于 Harbor 仓库):bash$ ./accelctl task create <harbor服务地址>/library/nginx:latest
curl 发送 HTTP 请求触发(参考 开发文档):bash$ curl --location 'http://<加速服务地址>/api/v1/conversions?sync=$snyc' \ --header 'Content-Type: application/json' \ --data '{ "type": "PUSH_ARTIFACT", "event_data": { "resources": [ { "resource_url": "<harbor服务地址>/dfns/alpine:latest" } ] } } '
一次性模式无需启动 acceld 服务,直接通过 accelctl 完成转换:
bash$ ./accelctl convert --config ./config.yaml 192.168.1.1/library/nginx:latest INFO[2022-01-28T03:39:28.039029557Z] 拉取镜像 192.168.1.1/library/nginx:latest module=converter INFO[2022-01-28T03:39:28.075375146Z] 拉取完成 192.168.1.1/library/nginx:latest module=converter INFO[2022-01-28T03:39:28.075530522Z] 开始转换镜像 192.168.1.1/library/nginx:latest module=converter INFO[2022-01-28T03:39:29.561103924Z] 转换完成 192.168.1.1/library/nginx:latest-nydus module=converter INFO[2022-01-28T03:39:29.561197593Z] 推送镜像 192.168.1.1/library/nginx:latest-nydus module=converter INFO[2022-01-28T03:39:29.587585066Z] 推送完成 192.168.1.1/library/nginx:latest-nydus module=converter
转换后的镜像与源 OCI 镜像位于同一仓库,两者标签后缀不同,可通过 Harbor Web 界面或 docker pull 命令查看。






manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务