Creating cluster-scoped resources for shared cluster components

If you plan to install the scheduling service, you must create the cluster-scoped resources, such as custom resource definitions (CRDs), for the scheduling service and the instance of the Backup Restore Orchestration service for the scheduling service.

Installation phase
  • You are not here. Setting up a client workstation
  • You are not here. Setting up a cluster
  • You are not here. Collecting required information
  • You are not here. Preparing to run installs in a restricted network
  • You are not here. Preparing to run installs from a private container registry
  • You are here icon. Preparing the cluster for IBM Software Hub
  • You are not here. Preparing to install an instance of IBM Software Hub
  • You are not here. Installing an instance of IBM Software Hub
  • You are not here. Setting up the control plane
  • You are not here. Installing solutions and services
Who needs to complete this task?

Cluster administrator A cluster administrator must complete this task.

When do you need to complete this task?

Complete this task if you plan to install the scheduling service.

One-time setup Complete this task once for each cluster where you plan to install the IBM Software Hub scheduling service.

You must create the cluster-scoped resources before you install the scheduling service or the Backup Restore Orchestration service for the scheduling service.

Before you begin

Best practice: You can run the commands in this task exactly as written if you use your installation environment variables script.

Ensure that you source the environment variables before you run the commands in this task.

About this task

Use the cpd-cli manage case-download command to generate cluster-scoped resources for the scheduling service.

The command generates a YAML file named cluster_scoped_resources.yaml that defines the following resources for the scheduling service:

  • CRDs
  • Cluster roles
  • Cluster role bindings
  • Webhooks

After you review the YAML files, use the cluster_scoped_resources.yaml file to apply the resources to the cluster.

Procedure

  1. Generate the cluster-scoped resource definitions for the scheduling service:
    The command requires the CASE packages to be on the workstation. Run the appropriate command for your environment:
    The CASE packages are already on the client workstation
    cpd-cli manage case-download \
    --components=scheduler \
    --release=${VERSION} \
    --patch_id=${PATCH_ID} \
    --scheduler_ns=${PROJECT_SCHEDULING_SERVICE} \
    --cluster_resources=true

    Download the CASE package from GitHub (github.com/IBM)
    cpd-cli manage case-download \
    --components=scheduler \
    --release=${VERSION} \
    --patch_id=${PATCH_ID} \
    --scheduler_ns=${PROJECT_SCHEDULING_SERVICE} \
    --cluster_resources=true

    Download the CASE package from the IBM Cloud Pak Open Container Initiative repository
    cpd-cli manage case-download \
    --components=scheduler \
    --release=${VERSION} \
    --patch_id=${PATCH_ID} \
    --from_oci=true \
    --scheduler_ns=${PROJECT_SCHEDULING_SERVICE} \
    --cluster_resources=true

    Download the CASE packages from your own Open Container Initiative repository
    cpd-cli manage case-download \
    --components=scheduler \
    --release=${VERSION} \
    --patch_id=${PATCH_ID} \
    --from_oci=true \
    --oci_location=${OCI_REGISTRY_LOCATION} \
    --scheduler_ns=${PROJECT_SCHEDULING_SERVICE} \
    --cluster_resources=true

  2. Change to the work directory.
    The default location of the work directory is cpd-cli-workspace/olm-utils-workspace/work.
  3. Log in to Red Hat® OpenShift® Container Platform as a cluster administrator.
    ${OC_LOGIN}
    Remember: OC_LOGIN is an alias for the oc login command.
  4. Apply the cluster-scoped resources for the scheduling service from the cluster_scoped_resources.yaml file:
    oc apply -f cluster_scoped_resources.yaml \
    --server-side \
    --force-conflicts
  5. Optional: If you want a record of the resources that you generated for the scheduling service, rename the cluster_scoped_resources.yaml
    mv cluster_scoped_resources.yaml ${VERSION}-${PROJECT_SCHEDULING_SERVICE}-cluster_scoped_resources.yaml
  6. Generate the cluster-scoped resource definitions for the Backup Restore Orchestration service:
    The command requires the CASE packages to be on the workstation. Run the appropriate command for your environment:
    The CASE packages are already on the client workstation
    cpd-cli manage case-download \
    --components=br_orchestration \
    --release=${VERSION} \
    --patch_id=${PATCH_ID} \
    --operator_ns=${PROJECT_SCHEDULING_BR_SVC} \
    --br_operator_ns=${PROJECT_SCHEDULING_BR_SVC} \
    --cluster_resources=true

    Download the CASE package from GitHub (github.com/IBM)
    cpd-cli manage case-download \
    --components=br_orchestration \
    --release=${VERSION} \
    --patch_id=${PATCH_ID} \
    --operator_ns=${PROJECT_SCHEDULING_BR_SVC} \
    --br_operator_ns=${PROJECT_SCHEDULING_BR_SVC} \
    --cluster_resources=true

    Download the CASE package from the IBM Cloud Pak Open Container Initiative repository
    cpd-cli manage case-download \
    --components=br_orchestration \
    --release=${VERSION} \
    --patch_id=${PATCH_ID} \
    --from_oci=true \
    --operator_ns=${PROJECT_SCHEDULING_BR_SVC} \
    --br_operator_ns=${PROJECT_SCHEDULING_BR_SVC} \
    --cluster_resources=true

    Download the CASE packages from your own Open Container Initiative repository
    cpd-cli manage case-download \
    --components=br_orchestration \
    --release=${VERSION} \
    --patch_id=${PATCH_ID} \
    --from_oci=true \
    --oci_location=${OCI_REGISTRY_LOCATION} \
    --operator_ns=${PROJECT_SCHEDULING_BR_SVC} \
    --br_operator_ns=${PROJECT_SCHEDULING_BR_SVC} \
    --cluster_resources=true

  7. Apply the cluster-scoped resources for the Backup Restore Orchestration service from the cluster_scoped_resources.yaml file:
    oc apply -f cluster_scoped_resources.yaml \
    --server-side \
    --force-conflicts
  8. Optional: If you want a record of the resources that you generated for the Backup Restore Orchestration service, rename the cluster_scoped_resources.yaml
    mv cluster_scoped_resources.yaml ${VERSION}-${PROJECT_SCHEDULING_BR_SVC}-cluster_scoped_resources.yaml

What to do next

Now that you've created the cluster-scoped resources for the shared cluster components, you're ready to complete Creating image pull secrets for shared cluster components.