Preparing the hub cluster for ZTP

To use RHACM in a disconnected environment, create a mirror registry that mirrors the OKD release images and Operator Lifecycle Manager (OLM) catalog that contains the required Operator images. OLM manages, installs, and upgrades Operators and their dependencies in the cluster. You can also use a disconnected mirror host to serve the FCOS ISO and RootFS disk images that are used to provision the bare-metal hosts.

Telco RAN DU 4 validated software components

The Red Hat telco RAN DU 4 solution has been validated using the following Red Hat software products for OKD managed clusters and hub clusters.

Table 1. Telco RAN DU managed cluster validated software components
ComponentSoftware version

Managed cluster version

4.14

Cluster Logging Operator

5.7

Local Storage Operator

4.14

PTP Operator

4.14

SRIOV Operator

4.14

Node Tuning Operator

4.14

Logging Operator

4.14

SRIOV-FEC Operator

2.7

Table 2. Hub cluster validated software components
ComponentSoftware version

Hub cluster version

4.14

GitOps ZTP plugin

4.14

Red Hat Advanced Cluster Management (RHACM)

2.8, 2.9

Red Hat OpenShift GitOps

1.9, 1.10

Topology Aware Lifecycle Manager (TALM)

4.14

With GitOps Zero Touch Provisioning (ZTP), you can manage thousands of clusters in geographically dispersed regions and networks. The Red Hat Performance and Scale lab successfully created and managed 3500 virtual single-node OpenShift clusters with a reduced DU profile from a single Red Hat Advanced Cluster Management (RHACM) hub cluster in a lab environment.

In real-world situations, the scaling limits for the number of clusters that you can manage will vary depending on various factors affecting the hub cluster. For example:

Hub cluster resources

Available hub cluster host resources (CPU, memory, storage) are an important factor in determining how many clusters the hub cluster can manage. The more resources allocated to the hub cluster, the more managed clusters it can accommodate.

Hub cluster storage

The hub cluster host storage IOPS rating and whether the hub cluster hosts use NVMe storage can affect hub cluster performance and the number of clusters it can manage.

Network bandwidth and latency

Slow or high-latency network connections between the hub cluster and managed clusters can impact how the hub cluster manages multiple clusters.

Managed cluster size and complexity

The size and complexity of the managed clusters also affects the capacity of the hub cluster. Larger managed clusters with more nodes, namespaces, and resources require additional processing and management resources. Similarly, clusters with complex configurations such as the RAN DU profile or diverse workloads can require more resources from the hub cluster.

Number of managed policies

The number of policies managed by the hub cluster scaled over the number of managed clusters bound to those policies is an important factor that determines how many clusters can be managed.

Monitoring and management workloads

RHACM continuously monitors and manages the managed clusters. The number and complexity of monitoring and management workloads running on the hub cluster can affect its capacity. Intensive monitoring or frequent reconciliation operations can require additional resources, potentially limiting the number of manageable clusters.

RHACM version and configuration

Different versions of RHACM can have varying performance characteristics and resource requirements. Additionally, the configuration settings of RHACM, such as the number of concurrent reconciliations or the frequency of health checks, can affect the managed cluster capacity of the hub cluster.

Use the following representative configuration and network specifications to develop your own Hub cluster and network specifications.

The following guidelines are based on internal lab benchmark testing only and do not represent complete bare-metal host specifications.

Table 3. Representative three-node hub cluster machine specifications
RequirementDescription

OKD

version 4.13

RHACM

version 2.7

Topology Aware Lifecycle Manager (TALM)

version 4.13

Server hardware

3 x Dell PowerEdge R650 rack servers

NVMe hard disks

  • 50 GB disk for /var/lib/etcd

  • 2.9 TB disk for /var/lib/containers

SSD hard disks

  • 1 SSD split into 15 200GB thin-provisioned logical volumes provisioned as PV CRs

  • 1 SSD serving as an extra large PV resource

Number of applied DU profile policies

5

The following network specifications are representative of a typical real-world RAN network and were applied to the scale lab environment during testing.

Table 4. Simulated lab environment network specifications
SpecificationDescription

Round-trip time (RTT) latency

50 ms

Packet loss

0.02% packet loss

Network bandwidth limit

20 Mbps

Additional resources

Installing GitOps ZTP in a disconnected environment

Use Red Hat Advanced Cluster Management (RHACM), Red Hat OpenShift GitOps, and Topology Aware Lifecycle Manager (TALM) on the hub cluster in the disconnected environment to manage the deployment of multiple managed clusters.

Prerequisites

  • You have installed the OKD CLI (oc).

  • You have logged in as a user with cluster-admin privileges.

  • You have configured a disconnected mirror registry for use in the cluster.

    The disconnected mirror registry that you create must contain a version of TALM backup and pre-cache images that matches the version of TALM running in the hub cluster. The spoke cluster must be able to resolve these images in the disconnected mirror registry.

Procedure

Additional resources

Adding FCOS ISO and RootFS images to the disconnected mirror host

Before you begin installing clusters in the disconnected environment with Red Hat Advanced Cluster Management (RHACM), you must first host Fedora CoreOS (FCOS) images for it to use. Use a disconnected mirror to host the FCOS images.

Prerequisites

  • Deploy and configure an HTTP server to host the FCOS image resources on the network. You must be able to access the HTTP server from your computer, and from the machines that you create.

The FCOS images might not change with every release of OKD. You must download images with the highest version that is less than or equal to the version that you install. Use the image versions that match your OKD version if they are available. You require ISO and RootFS images to install FCOS on the hosts. FCOS QCOW2 images are not supported for this installation type.

Procedure

  1. Log in to the mirror host.

  2. Obtain the FCOS ISO and RootFS images from mirror.openshift.com, for example:

    1. Export the required image names and OKD version as environment variables:

      1. $ export ISO_IMAGE_NAME=<iso_image_name> (1)
      1. $ export ROOTFS_IMAGE_NAME=<rootfs_image_name> (2)
      1. $ export OCP_VERSION=<ocp_version> (3)
      1ISO image name, for example, rhcos-4.1-x86_64-live.x86_64.iso
      2RootFS image name, for example, rhcos-4.1-x86_64-live-rootfs.x86_64.img
      3OKD version, for example, 4.1
    2. Download the required images:

      1. $ sudo wget https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4/${OCP_VERSION}/${ISO_IMAGE_NAME} -O /var/www/html/${ISO_IMAGE_NAME}
      1. $ sudo wget https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4/${OCP_VERSION}/${ROOTFS_IMAGE_NAME} -O /var/www/html/${ROOTFS_IMAGE_NAME}

Verification steps

  • Verify that the images downloaded successfully and are being served on the disconnected mirror host, for example:

    1. $ wget http://$(hostname)/${ISO_IMAGE_NAME}

    Example output

    1. Saving to: rhcos-4.1-x86_64-live.x86_64.iso
    2. rhcos-4.1-x86_64-live.x86_64.iso- 11%[====> ] 10.01M 4.71MB/s

Additional resources

Enabling the assisted service

Red Hat Advanced Cluster Management (RHACM) uses the assisted service to deploy OKD clusters. The assisted service is deployed automatically when you enable the MultiClusterHub Operator on Red Hat Advanced Cluster Management (RHACM). After that, you need to configure the Provisioning resource to watch all namespaces and to update the AgentServiceConfig custom resource (CR) with references to the ISO and RootFS images that are hosted on the mirror registry HTTP server.

Prerequisites

  • You have installed the OpenShift CLI (oc).

  • You have logged in to the hub cluster as a user with cluster-admin privileges.

  • You have RHACM with MultiClusterHub enabled.

Procedure

  1. Enable the Provisioning resource to watch all namespaces and configure mirrors for disconnected environments. For more information, see Enabling the central infrastructure management service.

  2. Update the AgentServiceConfig CR by running the following command:

    1. $ oc edit AgentServiceConfig
  3. Add the following entry to the items.spec.osImages field in the CR:

    1. - cpuArchitecture: x86_64
    2. openshiftVersion: "4"
    3. rootFSUrl: https://<host>/<path>/rhcos-live-rootfs.x86_64.img
    4. url: https://<mirror-registry>/<path>/rhcos-live.x86_64.iso

    where:

    <host>

    Is the fully qualified domain name (FQDN) for the target mirror registry HTTP server.

    <path>

    Is the path to the image on the target mirror registry.

    Save and quit the editor to apply the changes.

Configuring the hub cluster to use a disconnected mirror registry

You can configure the hub cluster to use a disconnected mirror registry for a disconnected environment.

Prerequisites

  • You have a disconnected hub cluster installation with Red Hat Advanced Cluster Management (RHACM) 2.8 installed.

  • You have hosted the rootfs and iso images on an HTTP server.

If you enable TLS for the HTTP server, you must confirm the root certificate is signed by an authority trusted by the client and verify the trusted certificate chain between your OKD hub and managed clusters and the HTTP server. Using a server configured with an untrusted certificate prevents the images from being downloaded to the image creation service. Using untrusted HTTPS servers is not supported.

Procedure

  1. Create a ConfigMap containing the mirror registry config:

    1. apiVersion: v1
    2. kind: ConfigMap
    3. metadata:
    4. name: assisted-installer-config-map
    5. namespace: "<infrastructure_operator_namespace>" (1)
    6. labels:
    7. app: assisted-service
    8. data:
    9. ca-bundle.crt: | (2)
    10. -----BEGIN CERTIFICATE-----
    11. <certificate_contents>
    12. -----END CERTIFICATE-----
    13. registries.conf: | (3)
    14. unqualified-search-registries = ["registry.access.redhat.com", "docker.io"]
    15. [[registry]]
    16. prefix = ""
    17. location = "quay.io/example-repository" (4)
    18. mirror-by-digest-only = true
    19. [[registry.mirror]]
    20. location = "mirror1.registry.corp.com:5000/example-repository" (5)
    1The ConfigMap namespace must be the same as the namespace of the Infrastructure Operator.
    2The mirror registry’s certificate that is used when creating the mirror registry.
    3The configuration file for the mirror registry. The mirror registry configuration adds mirror information to the /etc/containers/registries.conf file in the discovery image. The mirror information is stored in the imageContentSources section of the install-config.yaml file when the information is passed to the installation program. The Assisted Service pod that runs on the hub cluster fetches the container images from the configured mirror registry.
    4The URL of the mirror registry. You must use the URL from the imageContentSources section by running the oc adm release mirror command when you configure the mirror registry. For more information, see the Mirroring the OpenShift Container Platform image repository section.
    5The registries defined in the registries.conf file must be scoped by repository, not by registry. In this example, both the quay.io/example-repository and the mirror1.registry.corp.com:5000/example-repository repositories are scoped by the example-repository repository.

    This updates mirrorRegistryRef in the AgentServiceConfig custom resource, as shown below:

    Example output

    1. apiVersion: agent-install.openshift.io/v1beta1
    2. kind: AgentServiceConfig
    3. metadata:
    4. name: agent
    5. spec:
    6. databaseStorage:
    7. volumeName: <db_pv_name>
    8. accessModes:
    9. - ReadWriteOnce
    10. resources:
    11. requests:
    12. storage: <db_storage_size>
    13. filesystemStorage:
    14. volumeName: <fs_pv_name>
    15. accessModes:
    16. - ReadWriteOnce
    17. resources:
    18. requests:
    19. storage: <fs_storage_size>
    20. mirrorRegistryRef:
    21. name: 'assisted-installer-mirror-config'
    22. osImages:
    23. - openshiftVersion: <ocp_version>
    24. url: <iso_url> (1)
    1Must match the URL of the HTTPD server.

A valid NTP server is required during cluster installation. Ensure that a suitable NTP server is available and can be reached from the installed clusters through the disconnected network.

Additional resources

Configuring the hub cluster to use unauthenticated registries

You can configure the hub cluster to use unauthenticated registries. Unauthenticated registries does not require authentication to access and download images.

Prerequisites

  • You have installed and configured a hub cluster and installed Red Hat Advanced Cluster Management (RHACM) on the hub cluster.

  • You have installed the OpenShift Container Platform CLI (oc).

  • You have logged in as a user with cluster-admin privileges.

  • You have configured an unauthenticated registry for use with the hub cluster.

Procedure

  1. Update the AgentServiceConfig custom resource (CR) by running the following command:

    1. $ oc edit AgentServiceConfig agent
  2. Add the unauthenticatedRegistries field in the CR:

    1. apiVersion: agent-install.openshift.io/v1beta1
    2. kind: AgentServiceConfig
    3. metadata:
    4. name: agent
    5. spec:
    6. unauthenticatedRegistries:
    7. - example.registry.com
    8. - example.registry2.com
    9. ...

    Unauthenticated registries are listed under spec.unauthenticatedRegistries in the AgentServiceConfig resource. Any registry on this list is not required to have an entry in the pull secret used for the spoke cluster installation. assisted-service validates the pull secret by making sure it contains the authentication information for every image registry used for installation.

Mirror registries are automatically added to the ignore list and do not need to be added under spec.unauthenticatedRegistries. Specifying the PUBLIC_CONTAINER_REGISTRIES environment variable in the ConfigMap overrides the default values with the specified value. The PUBLIC_CONTAINER_REGISTRIES defaults are quay.io and registry.svc.ci.openshift.org.

Verification

Verify that you can access the newly added registry from the hub cluster by running the following commands:

  1. Open a debug shell prompt to the hub cluster:

    1. $ oc debug node/<node_name>
  2. Test access to the unauthenticated registry by running the following command:

    1. sh-4.4# podman login -u kubeadmin -p $(oc whoami -t) <unauthenticated_registry>

    where:

    <unauthenticated_registry>

    Is the new registry, for example, unauthenticated-image-registry.openshift-image-registry.svc:5000.

    Example output

    1. Login Succeeded!

Configuring the hub cluster with ArgoCD

You can configure the hub cluster with a set of ArgoCD applications that generate the required installation and policy custom resources (CRs) for each site with GitOps Zero Touch Provisioning (ZTP).

Red Hat Advanced Cluster Management (RHACM) uses SiteConfig CRs to generate the Day 1 managed cluster installation CRs for ArgoCD. Each ArgoCD application can manage a maximum of 300 SiteConfig CRs.

Prerequisites

  • You have a OKD hub cluster with Red Hat Advanced Cluster Management (RHACM) and Red Hat OpenShift GitOps installed.

  • You have extracted the reference deployment from the GitOps ZTP plugin container as described in the “Preparing the GitOps ZTP site configuration repository” section. Extracting the reference deployment creates the out/argocd/deployment directory referenced in the following procedure.

Procedure

  1. Prepare the ArgoCD pipeline configuration:

    1. Create a Git repository with the directory structure similar to the example directory. For more information, see “Preparing the GitOps ZTP site configuration repository”.

    2. Configure access to the repository using the ArgoCD UI. Under Settings configure the following:

      • Repositories - Add the connection information. The URL must end in .git, for example, [https://repo.example.com/repo.git](https://repo.example.com/repo.git) and credentials.

      • Certificates - Add the public certificate for the repository, if needed.

    3. Modify the two ArgoCD applications, out/argocd/deployment/clusters-app.yaml and out/argocd/deployment/policies-app.yaml, based on your Git repository:

      • Update the URL to point to the Git repository. The URL ends with .git, for example, [https://repo.example.com/repo.git](https://repo.example.com/repo.git).

      • The targetRevision indicates which Git repository branch to monitor.

      • path specifies the path to the SiteConfig and PolicyGenTemplate CRs, respectively.

  1. To install the GitOps ZTP plugin you must patch the ArgoCD instance in the hub cluster by using the patch file previously extracted into the out/argocd/deployment/ directory. Run the following command:

    1. $ oc patch argocd openshift-gitops \
    2. -n openshift-gitops --type=merge \
    3. --patch-file out/argocd/deployment/argocd-openshift-gitops-patch.json
  2. In RHACM 2.7 and later, the multicluster engine enables the cluster-proxy-addon feature by default. To disable this feature, apply the following patch to disable and remove the relevant hub cluster and managed cluster pods that are responsible for this add-on. Run the following command:

    1. $ oc patch multiclusterengines.multicluster.openshift.io multiclusterengine --type=merge --patch-file out/argocd/deployment/disable-cluster-proxy-addon.json
  3. Apply the pipeline configuration to your hub cluster by using the following command:

    1. $ oc apply -k out/argocd/deployment

Preparing the GitOps ZTP site configuration repository

Before you can use the GitOps Zero Touch Provisioning (ZTP) pipeline, you need to prepare the Git repository to host the site configuration data.

Prerequisites

  • You have configured the hub cluster GitOps applications for generating the required installation and policy custom resources (CRs).

  • You have deployed the managed clusters using GitOps ZTP.

Procedure

  1. Create a directory structure with separate paths for the SiteConfig and PolicyGenTemplate CRs.

    Keep SiteConfig and PolicyGenTemplate CRs in separate directories. Both the SiteConfig and PolicyGenTemplate directories must contain a kustomization.yaml file that explicitly includes the files in that directory.

  2. Export the argocd directory from the ztp-site-generate container image using the following commands:

    1. $ podman pull registry.redhat.io/openshift4/ztp-site-generate-rhel8:v4
    1. $ mkdir -p ./out
    1. $ podman run --log-driver=none --rm registry.redhat.io/openshift4/ztp-site-generate-rhel8:v4 extract /home/ztp --tar | tar x -C ./out
  3. Check that the out directory contains the following subdirectories:

    • out/extra-manifest contains the source CR files that SiteConfig uses to generate extra manifest configMap.

    • out/source-crs contains the source CR files that PolicyGenTemplate uses to generate the Red Hat Advanced Cluster Management (RHACM) policies.

    • out/argocd/deployment contains patches and YAML files to apply on the hub cluster for use in the next step of this procedure.

    • out/argocd/example contains the examples for SiteConfig and PolicyGenTemplate files that represent the recommended configuration.

  4. Copy the out/source-crs folder and contents to the PolicyGentemplate directory.

  5. The out/extra-manifests directory contains the reference manifests for a RAN DU cluster. Copy the out/extra-manifests directory into the SiteConfig folder. This directory should contain CRs from the ztp-site-generate container only. Do not add user-provided CRs here. If you want to work with user-provided CRs you must create another directory for that content. For example:

    1. example/
    2. ├── policygentemplates
    3. ├── kustomization.yaml
    4. └── source-crs/
    5. └── siteconfig
    6. ├── extra-manifests
    7. └── kustomization.yaml
  6. Commit the directory structure and the kustomization.yaml files and push to your Git repository. The initial push to Git should include the kustomization.yaml files.

You can use the directory structure under out/argocd/example as a reference for the structure and content of your Git repository. That structure includes SiteConfig and PolicyGenTemplate reference CRs for single-node, three-node, and standard clusters. Remove references to cluster types that you are not using.

For all cluster types, you must:

  • Add the source-crs subdirectory to the policygentemplate directory.

  • Add the extra-manifests directory to the siteconfig directory.

The following example describes a set of CRs for a network of single-node clusters:

  1. example/
  2. ├── policygentemplates
  3. ├── common-ranGen.yaml
  4. ├── example-sno-site.yaml
  5. ├── group-du-sno-ranGen.yaml
  6. ├── group-du-sno-validator-ranGen.yaml
  7. ├── kustomization.yaml
  8. ├── source-crs/
  9. └── ns.yaml
  10. └── siteconfig
  11. ├── example-sno.yaml
  12. ├── extra-manifests/ (1)
  13. ├── custom-manifests/ (2)
  14. ├── KlusterletAddonConfigOverride.yaml
  15. └── kustomization.yaml
1Contains reference manifests from the ztp-container.
2Contains custom manifests.

Preparing the GitOps ZTP site configuration repository for version independence

You can use GitOps ZTP to manage source custom resources (CRs) for managed clusters that are running different versions of OKD. This means that the version of OKD running on the hub cluster can be independent of the version running on the managed clusters.

Procedure

  1. Create a directory structure with separate paths for the SiteConfig and PolicyGenTemplate CRs.

  2. Within the PolicyGenTemplate directory, create a directory for each OKD version you want to make available. For each version, create the following resources:

    • kustomization.yaml file that explicitly includes the files in that directory

    • source-crs directory to contain reference CR configuration files from the ztp-site-generate container

  3. In the /siteconfig directory, create a subdirectory for each OKD version you want to make available. For each version, create at least one directory for reference CRs to be copied from the container. There is no restriction on the naming of directories or on the number of reference directories. If you want to work with user-provided CRs, you must create a separate directory for those.

    The following example describes a structure using user-provided CRs for different versions of OKD:

    1. ├── policygentemplates
    2. ├── kustomization.yaml (1)
    3. ├── version_4.13 (2)
    4. ├── common-ranGen.yaml
    5. ├── group-du-sno-ranGen.yaml
    6. ├── group-du-sno-validator-ranGen.yaml
    7. ├── helix56-v413.yaml
    8. ├── kustomization.yaml (3)
    9. ├── ns.yaml
    10. └── source-crs/ (4)
    11. └── version_4.14 (2)
    12. ├── common-ranGen.yaml
    13. ├── group-du-sno-ranGen.yaml
    14. ├── group-du-sno-validator-ranGen.yaml
    15. ├── helix56-v414.yaml
    16. ├── kustomization.yaml (3)
    17. ├── ns.yaml
    18. └── source-crs/ (4)
    19. └── siteconfig
    20. ├── kustomization.yaml
    21. ├── version_4.13
    22. ├── helix56-v413.yaml
    23. ├── kustomization.yaml
    24. ├── extra-manifest/ (5)
    25. └── custom-manifest/ (6)
    26. └── version_4.14
    27. ├── helix57-v414.yaml
    28. ├── kustomization.yaml
    29. ├── extra-manifest/ (5)
    30. └── custom-manifest/ (6)
    1Create a top-level kustomization yaml file.
    2Create the version-specific directories within the custom /policygentemplates directory.
    3Create a kustomization.yaml file for each version.
    4Create a source-crs directory for each version to contain reference CRs from the ztp-site-generate container.
    5Create a directory within the custom /siteconfig directory to contain extra manifests from the ztp-site-generate container.
    6Create a folder to hold user-provided CRs.

    In the previous example, each version subdirectory in the custom /siteconfig directory contains two further subdirectories, one containing the reference manifests copied from the container, the other for custom manifests that you provide. The names assigned to those directories are examples. If you use user-provided CRs, the last directory listed under extraManifests.searchPaths in the SiteConfig CR must be the directory containing user-provided CRs.

  4. Edit the SiteConfig CR to include the search paths of any directories you have created. The first directory that is listed under extraManifests.searchPaths must be the directory containing the reference manifests. Consider the order in which the directories are listed. In cases where directories contain files with the same name, the file in the final directory takes precedence.

    Example SiteConfig CR

    1. extraManifests:
    2. searchPaths:
    3. - extra-manifest/ (1)
    4. - custom-manifest/ (2)
    1The directory containing the reference manifests must be listed first under extraManifests.searchPaths.
    2If you are using user-provided CRs, the last directory listed under extraManifests.searchPaths in the SiteConfig CR must be the directory containing those user-provided CRs.
  5. Edit the top-level kustomization.yaml file to control which OKD versions are active. The following is an example of a kustomization.yaml file at the top level:

    1. resources:
    2. - version_4.13 (1)
    3. #- version_4.14 (2)
    1Activate version 4.13.
    2Use comments to deactivate a version.