Acceleration Service provides a general service to Harbor with the ability to automatically convert user images to accelerated images. When a user does something such as artifact push, Harbor will request the service to complete the corresponding image conversion through its integrated Nydus,
eStargz, zstdchunked etc. drivers.
Select one project and add a new Webhook configuration with the following fields:
Notify Type: choose HTTP
Event Type: Enable artifact pushed
Endpoint URL: <acceleration service address>/api/v1/conversions
Auth Header: <configured in acceleration service>
Note: The webhook can help to convert images automatically by acceleration service.
Also you can trigger an image conversion task by sending an HTTP request manually or using accelctl.
Create a system robot account with following fields:
Expiration time: <by your choice>
Reset permissions: select Push Artifact, Pull Artifact, Create Tag
When you get the robot account robotlt;robot-name>, please copy the secret and
generate a base64 encoded auth string like this:
$ echo -n '<robot-name>:<robot-secret>' | base64
Note: the encoded auth string will be used in configuring acceleration service on the next step.
Change provider.source with your own harbor service hostname, the auth and
webhook.auth_header should also be configured as the one generated by the above step.
Change settings in the converter.driver filed according to your requirements.
Please follow the comments in the template config file.
Acceleration Service
Acceleration Service provides a general service to Harbor with the ability to automatically convert user images to accelerated images. When a user does something such as artifact push, Harbor will request the service to complete the corresponding image conversion through its integrated Nydus, eStargz, zstdchunked etc. drivers.
See more details in the design doc.
Quickstart
GETTING STARTED
Get Harbor
Deploy a local harbor service if you don’t have one, please refer to the harbor documentation.
Get binaries from release page
Currently, Acceleration Service includes the following tools:
accelddaemon to work as an HTTP service to handle image conversion requests from harbor oraccelctl.accelctlCLI tool to manage acceleration service (acceld) and can do image conversion in one-time mode.Get
accelctlandacceldbinaries from acceleration-service release.Configuration
Configure Habor
Login to the Harbor web interface.
Select one project and add a new Webhook configuration with the following fields:
<acceleration service address>/api/v1/conversions<configured in acceleration service>Create a system robot account with following fields:
<by your choice>When you get the robot account
robotlt;robot-name>, please copy the secret and generate a base64 encoded auth string like this:Configure Acceleration Service
provider.sourcewith your own harbor service hostname, theauthandwebhook.auth_headershould also be configured as the one generated by the above step.converter.driverfiled according to your requirements.Convert Image with Acceleration Service
Convert by acceld service
accelctlCLI tool. Or you can create a conversion task over the HTTP API bycurl. Please refer to the development document.One-time mode
One-time mode allows to do a conversion without starting the acceld service, using accelctl like this:
Check Converted Image
You can see the converted image and source oci image in the some repo, they have different tag suffix.
Documentation