Managing image registries
The image registry is an important component of the Neutree infrastructure layer, providing the container images required for cluster deployment.
If the cluster nodes can connect to a Docker-compatible image registry (such as Docker Hub), the cluster will retrieve Neutree container images through the registries you create. If no image registry (such as Harbor or Docker Hub) is available in your environment, see Setting up a temporary image registry.
If the cluster nodes cannot connect to the above registries or the connection is slow, select an import method based on the image type.
- To import custom workload images, Flex Engine image parameters, or other supporting component images, see Importing custom container images.
- To import static node cluster images, see Managing static node clusters > Manually importing a cluster image.
- To import Kubernetes cluster images, see Managing Kubernetes clusters > Manually importing a cluster image.
Creating an image registry
Section titled “Creating an image registry”-
Log in to the Neutree management interface. Click Image Registries in the left navigation pane, then click Create on the right.
-
Fill in the configuration.
-
Basic Information
Parameter Description Editable after creation Name The name of the image registry. No Workspace The workspace to which the image registry belongs. No -
Image Registry
Parameter Description Editable after creation URL The URL of the image registry. When using Docker Hub, the URL is https://docker.io.Yes Repository The project or repository in the image registry. Leave this field empty in the following cases:
- When using Docker Hub.
- When no project name was set when uploading images with the CLI tool.
Yes -
Authentication
Parameter Description Editable after creation Username The username for accessing the image registry. Yes Password The password for accessing the image registry. Yes
-
-
After confirming that all configurations are correct, click Save.
Viewing image registries
Section titled “Viewing image registries”Log in to the Neutree management interface. Click Image Registries in the left navigation pane. The registry list on the right shows all current image registries. Click a registry name to view its details.
Importing custom container images
Section titled “Importing custom container images”When you need to use a custom service image, Flex Engine image parameter, or another supporting component image in Neutree, you can use the CLI to import the image to the image registry managed by Neutree.
Applicable scenarios include:
- When using Flex Engine or a custom inference engine, import the custom service image to the image registry managed by Neutree, and reference it through the
imageparameter in engine variables. - In an offline environment, import a single service image exported by
docker saveto an image registry that Neutree can access. - Validate a temporarily built custom image or patched image, and reference the imported image address in an inference instance or YAML configuration.
Prerequisites
- You have created an image registry, and the registry is in a healthy state.
- The image to be imported already exists in the local Docker daemon, or you have prepared an image archive exported by
docker save. - You have created an API key. Make sure that this API key has permission to read image registry credentials. If the API key cannot read the saved registry credentials, provide an image registry username and password with push permissions through command parameters.
Procedure
-
Run the following command to import a local image:
Terminal window ./neutree-cli-<arch> image push <image> \-w [workspace] \-r [image_registry] \[--target <repository[:tag]>] \[--registry-username <registry_username>] \[--registry-password <registry_password>] \--api-key <api_key> \--server-url <server_url>If the image to be imported is an archive generated by
docker save, use the--archiveparameter to load the archive before importing it:Terminal window ./neutree-cli-<arch> image push <image> \--archive <image_archive> \--target <repository[:tag]> \-w [workspace] \-r [image_registry] \--api-key <api_key> \--server-url <server_url>Parameter Description <arch>Replace this with the CPU architecture of the server. Valid values are amd64andarm64.<image>The name of the local image to import, for example, my-workload:v1. When using the--archiveparameter, this name must match the image name included in the image archive.[workspace]The workspace to which the image registry belongs. Optional. If left empty, the defaultworkspace is used.[image_registry]The name of the destination image registry. Optional. If left empty, defaultis used.[--target <repository[:tag]>]Optional. The repository path and tag of the destination image in the image registry. If left empty, the destination is generated automatically based on <image>.<image_archive>The path of the image archive generated by docker save. This parameter is required only when importing an image archive.[--registry-username <registry_username>]/[--registry-password <registry_password>]Optional. The image registry username and password used when importing the image. If left empty, the credentials saved in the image registry are used first. <api_key>The API key created during preparation. <server_url>The control plane access address, for example, http://localhost:3000. -
View the destination image address in the command output. When configuring a custom service image, Flex Engine image parameter, or another image reference later, use this address.
Editing an image registry
Section titled “Editing an image registry”After an image registry is created, you can modify the registry URL, repository information, and authentication configuration as needed.
-
Log in to the Neutree management interface. In the registry list or details page, click the menu icon (…) and select Edit.
-
Modify the configuration as needed. For parameter descriptions, see Creating an image registry.
-
After confirming that the configuration is correct, click Save to complete the edit.
Deleting image registries
Section titled “Deleting image registries”You can delete one or more image registries at the same time.
-
Log in to the Neutree management interface. In the registry list or details page, click the menu icon (…) and select Delete; or select multiple image registries in the list and click Delete above the list.
-
In the confirmation dialog, confirm the deletion and click Delete. The selected image registries will be permanently deleted.