Home / Platform management / DevOps toolchain / Tool deployment and upgrade / Deploy Harbor

Deploy Harbor

Harbor is an open source image repository management platform that helps you securely store, manage and distribute images.

Cautions

The service access address defaults to the IPV4 address. If you need to use IPV6 and the cluster network card supports IPV6, please modify the IPV4 address to the IPV6 address.

Prerequisites

Storage

Please ensure that at least one of the following prerequisites is met. Each prerequisite corresponds to a different storage method .

Tip: After deleting the tool created by the function, the PVC bound to the tool will still remain.

Network

High availability

Requirements for deploying Harbor as highly available:

On-premise deployment

  1. In the left navigation bar, click DevOps Toolchain > Instances.

  2. Click Create Instance.

  3. On the Deploy and Integrate page, select Harbor.

  4. In the Location area, select the Clusters and Namespaces where you want to deploy the tool.

  5. In the Architecture area, select whether to use a high-availability architecture.

    Caution: The architecture type cannot be modified after deployment.

  6. In the Resources section, select a CPU and memory allocation method and complete the configuration.

    Allocation Method Description
    Tool Allocate total resources for the tool to ensure overall availability. If you have no special requirements for the characteristics of individual components, the global allocation method will be more convenient.
    Components Allocate resources for each component of the tool to ensure business performance related to specific components. For example, you can set exclusive resource requirements for the PostgreSQL database to avoid performance bottlenecks.
  7. In the storage section, select a storage method and complete the configuration.

    Caution: Storage configuration cannot be modified after the instance is created.

    Storage Method Description
    Dynamically created PVCs Prerequisites: A storage class must be prepared in advance.
    After setting the required storage capacity for each component of Harbor, the platform will dynamically generate a PVC for each component of Harbor and dynamically create a persistent volume for each component based on the storage class requested by the PVC. If you need to expand storage, go to Container Platform for PVC expansion.
    Available PVCs Prerequisites: PVCs must be prepared in advance.
    After specifying an available PVC for each component of Harbor, the platform will dynamically create a persistent volume for each component based on the storage class requested by the PVC to meet the different storage demands of each component (expansion, snapshots, etc.). Supports direct storage expansion in Platform Management.
    Node storage Request storage resources on cluster nodes through the hostpath storage solution. NO StorageClasses is required.
    Caution:
    • This solution is not applicable to highly available architecture.
    • To avoid mounting failure, ensure that the path has not been used.
    • When deploying the tool in a public cloud cluster, this solution is unavailable to avoid data loss because of node elasticty.
  8. In the Networking section, configure network requirements.

    Caution:

    • After deployment, please be cautious when updating the service access address. If updated, external settings need to be coordinated to ensure normal access, such as configuring DNS resolution. And this update only applies to the current network setting status. When the network setting changes again, the service access address will be automatically replaced with a restricted value.

    • If there are dual NIC nodes in the cluster where the tool is to be deployed, check whether the default load balancer IP address or node IP address used for service access is available outside the cluster ), otherwise the tool cannot be accessed normally after deployment, and the error message “check xx alive failed” will appear.

    • Ingress method

      Parameter Description
      Domain Select a domain name that already exists in the platform. Make sure that the selected domain name has been allocated to the project that will use this tool.
      Scheme Supports selecting HTTP and HTTPS protocols.
      Note: If you choose the HTTP protocol, you may encounter a situation where you cannot push images after quickly deploying and integrating Harbor. This is because Docker does not allow the use of Docker Registry without permission verification by default. In this case, you need to edit the /etc/docker/daemon.json file in each cluster resource node of the Harbor image repository and add the Harbor access address to the insecure-registries field, for example: "insecure-registries": ["192.168.0.100:5000"]. After completing the configuration, restart to take effect.
      Certificate If using the HTTPS protocol, you also need to configure a certificate that matches the domain name.
      Service access address Will be automatically generated, following the rule http://{Ingress name} or https://{Ingress name}.
    • Nodeport: set up HTTP port, HTTPS port, and Notary port as planned.

  9. In the Account section, configure the account-related information.

    Parameter Description
    Name Default value is admin and cannot be modified.
    Password To ensure environment security, set a password in the credentials: click Create, fill in a recognizable name, and enter the password after HARBOR_ADMIN_PASSWORD in Configuration.

    Note: If you need to modify the password later, please update the credential data information .
    SSO login Single sign-on. If enabled, you can use the platform account to log in to Harbor, and the authorized account can also pull images.

    Note: After enabling SSO login, the following restrictions apply.

    • After quick deployment and integration with Harbor, updating the SSO button switch status is not supported.

    • When logging in with a local Harbor user, only the default administrator account is supported.

    • When binding the Harbor tool under the platform project, the SSO authorized account cannot be used for binding.

    • The Name and CLI Password in the User Settings can also be used to access Harbor using Helm or Docker CLI.
  10. In the Integration area, enter an integration name that will help the project members to identify and select this tool in DevOps.

  11. After the configuration is complete, click Deploy and Integrate.

    The instance integrates into the plaftform automatically.

Public cloud deployment

It is recommended to open a virtual machine and deploy a public cloud cluster before deploying DevOps tools, and use the same storage and network solution as the native cluster. In this way, the tools and capabilities supported for deployment are synchronized with the native cluster deployment tools.

Verification

Once the deployment status become Deployed, verify the tool’s accessibility by accessing the URL.

What’s next