|Index|Getting started with SUSE Private Registry|Installing SUSE Private Registry using the Rancher UI
Applies to SUSE Private Registry

3 Installing SUSE Private Registry using the Rancher UI

You can install SUSE Private Registry from the Rancher UI by adding the SUSE Private Registry OCI repository, creating a registry secret and installing the Helm chart from the Apps catalog. The procedure consists of five tasks: create a namespace, add the repository, create the secrets, install the chart and verify the deployment.

3.1 What requirements must I meet?

3.2 Creating a namespace

  1. Log in to Rancher.

  2. Click menu:☰[] and select Cluster Management.

  3. Click Explore next to your cluster, usually local.

  4. Select Cluster › Projects/Namespaces.

  5. Click Create Namespace in a project or under Not in a Project.

  6. Enter suse-registry as the name and click Create.

3.3 Adding the SUSE Private Registry repository

  1. In the cluster view, select Apps › Repositories and click Add Repository.

  2. Select OCI Repository as the target.

  3. Enter a name, such as suse-private-registry.

  4. In OCI Repository Host URL, enter oci://registry.suse.com/private-registry/private-registry-helm.

  5. In Authentication, select Create an HTTP Basic Auth Secret and enter the SCC user name and password.

  6. Click Add Repository.

  7. Wait until the repository state changes to Active.

A screenshot showing how to add a SUSE Private Registry repository to Rancher
Figure 3.1: Adding a SUSE Private Registry repository

3.4 Creating the registry and TLS secrets

The cluster needs a secret to pull the Private Registry images from registry.suse.com.

  1. Select Storage › Secrets and click Create.

  2. Select Registry as the secret type.

  3. In the Namespace list, select the suse-registry namespace and enter suse-registry as the secret name. The chart expects this secret name by default.

  4. From the registry list, select Custom, then enter registry.suse.com as the domain.

  5. Enter the SCC user name and password and click Create.

  6. Optional: To use your own certificate, click Create again, select TLS Certificate, enter suse-registry-tls as the name and paste the certificate and private key.

A screenshot showing how to add SUSE Private Registry secrets to Rancher
Figure 3.2: Adding SUSE Private Registry secrets

3.5 Installing the Helm chart

  1. Select Apps › Charts.

  2. Search for suse-private-registry. If the chart is missing, select Apps › Repositories, select the repository and click Refresh.

    Note
    Note

    The catalog can show two entries. Select suse-private-registry, which has the description and the latest version.

  3. Click the chart and review the README.md.

  4. Click Install this version.

  5. On the Metadata step, select the suse-registry namespace and enter spr as the release name.

  6. Click Next.

  7. On the Values step, configure the chart as described in Section 3.6, “How do I configure Private Registry during the installation?”.

  8. Click Install.

A screenshot showing the installation screen of SUSE Private Registry in Rancher
Figure 3.3: Installing SUSE Private Registry

3.6 How do I configure Private Registry during the installation?

The Values step of the installation wizard offers two ways to configure the chart: a guided form and a YAML editor. Both change the same values, and you can switch between them at any time.

Method 1: Using the guided form

  1. On the Values step, select Edit Options. The form groups the settings into tabs.

  2. On the Expose tab, enter the FQDN in Ingress Host and the controller in Ingress Class Name, such as traefik.

  3. On the General tab, enter https://<PRIVATE_REGISTRY_FQDN> in External URL and set Harbor Admin Password.

  4. Optional: Use the External Services, Deployment and Storage tabs to use external Redis or database services, set replica counts and set volume sizes and the storage class.

  5. Select Compare Changes to review the differences from the defaults.

A screenshot showing the Expose tab of the installation form
Figure 3.4: Setting the ingress values
Important
Important

Do not edit Image Pull Secrets in the form. It can display [object Object]. To change it, use Edit YAML.

Method 2: Using Edit YAML

  1. On the Values step, select Edit YAML next to Edit Options. The editor shows all chart values with their defaults.

    A screenshot showing the Edit YAML view of the installation wizard
    Figure 3.5: Editing the chart values as YAML
  2. Change the values that you need, for example:

    externalURL: https://<PRIVATE_REGISTRY_FQDN>
    harborAdminPassword: "<MY_PASSWORD>"
    imagePullSecrets:
      - name: suse-registry
    expose:
      type: ingress
      tls:
        enabled: true
        certSource: auto
      ingress:
        className: <INGRESS_CLASS>
        hosts:
          core: <PRIVATE_REGISTRY_FQDN>
    persistence:
      enabled: true

    To use your own certificate, create a TLS secret first, set certSource to secret and set expose.tls.secret.secretName. For all values, see Appendix A, Overriding the SUSE Private Registry Helm chart.

Important
Important

If you do not set harborAdminPassword, the default password is Harbor12345. Change it after the first login.

3.7 How do I verify the installation?

  1. Select Apps › Installed Apps and check that the release status is Deployed.

    A screenshot showing the deployed release in Installed Apps
    Figure 3.6: Installed release
  2. Select Workloads › Pods and check that all pods in the suse-registry namespace are Running.

  3. Open https://<PRIVATE_REGISTRY_FQDN> and log in as admin.

If you did not set a password, read it from the HARBOR_ADMIN_PASSWORD key of the spr-harbor-core secret in Storage › Secrets.

3.8 Upgrading Private Registry using the Rancher UI

  1. Select Apps › Installed Apps.

  2. Click menu:⋮[] for the release and select Edit / Change Version.

  3. Select the new chart version and review the values.

  4. Click Upgrade.

3.9 What if the installation fails?

The chart does not appear in the catalog

Check that the repository state is Active. Verify the SCC credentials and refresh the repository.

Pods show ImagePullBackOff

Check that the suse-registry secret exists in the release namespace and has valid credentials.

The portal is not reachable

Check that externalURL and expose.ingress.hosts.core match the FQDN, and that the FQDN resolves to your Ingress controller.

For more problems, see Chapter 12, Troubleshooting.