Chapter 6. Optional: Installing and modifying Operators


The Assisted Installer can install select Operators for you with default configurations in either the UI or API. If you require advanced options, install the desired Operators after installing the cluster.

The Assisted Installer monitors the installation of the selected operators as part of the cluster installation and reports their status. If one or more Operators encounter errors during installation, the Assisted Installer reports that the cluster installation has completed with a warning that one or more operators failed to install.

See the sections below for the Operators you can set when installing or modifying a cluster definition using the Assisted Installer UI or API. For full instructions on installing an OpenShift Container Platform cluster, see Installing with the Assisted Installer UI or Installing with the Assisted Installer API respectively.

6.1. Installing Operators

When installng Operators using the Assisted Installer UI, select the Operators on the Operators page of the wizard. When installing Operators using the Assisted Installer API, use the POST method in the /v2/clusters endpoint.

6.1.1. Installing OpenShift Virtualization

When you configure the cluster, you can enable OpenShift Virtualization.

Note

Currently, OpenShift Virtualization is not supported on IBM zSystems and IBM Power.

If enabled, the Assisted Installer:

  1. Validates that your environment meets the prerequisites outlined below.
  2. Configures virtual machine storage as follows:

    1. For single-node OpenShift clusters version 4.10 and newer, the Assisted Installer configures the hostpath provisioner.
    2. For single-node OpenShift clusters on earlier versions, the Assisted Installer configures the Local Storage Operator.
    3. For multi-node clusters, the Assisted Installer configures OpenShift Data Foundation.

Prerequisites

  • Supported by Red Hat Enterprise Linux (RHEL) 8
  • Support for Intel 64 or AMD64 CPU extensions
  • Intel Virtualization Technology or AMD-V hardware virtualization extensions enabled
  • NX (no execute) flag enabled

Procedure

  1. If you are using the Assisted Installer UI:

    • In the Operators step of the wizard, enable the Install OpenShift Virtualization checkbox.
  2. If you are using the Assisted Installer API:

    • When registering a new cluster, add the "olm_operators: [{"name": "cnv"}]" statement.

      Note

      CNV stands for container-native virtualization.

      For example:

      $ curl -s -X POST https://api.openshift.com/api/assisted-install/v2/clusters \
      -H "Authorization: Bearer ${API_TOKEN}" \
      -H "Content-Type: application/json" \
      -d "$(jq --null-input \
         --slurpfile pull_secret ~/Downloads/pull-secret.txt '
      {
         "name": "testcluster",
         "openshift_version": "4.11",
         "cpu_architecture" : "x86_64",
         "base_dns_domain": "example.com",
         "olm_operators: [{"name": "cnv"}]"
         "pull_secret": $pull_secret[0] | tojson
      }
      ')" | jq '.id'

Additional resources

6.1.2. Installing Multicluster Engine (MCE)

When you configure the cluster, you can enable the Multicluster Engine (MCE) Operator. The Multicluster Engine (MCE) Operator allows you to install additional clusters from the cluster that you are currently installing.

Prerequisites

  • OpenShift version 4.10 and above
  • An additional 4 CPU cores and 16GB of RAM for multi-node OpenShift clusters.
  • An additional 8 CPU cores and 32GB RAM for single-node OpenShift clusters.

Storage considerations

Prior to installation, you must consider the storage required for managing the clusters to be deployed from the Multicluster Engine. You can choose one of the following scenarios for automating storage:

  • Install OpenShift Data Foundation (ODF) on a multi-node cluster. ODF is the recommended storage for clusters, but requires an additional subscription. For details, see Installing OpenShift Data Foundation in this chapter.
  • Install Logical Volume Management Storage (LVMS) on a single-node OpenShift (SNO) cluster.
  • Install Multicluster Engine on a multi-node cluster without configuring storage. Then configure a storage of your choice and enable the Central Infrastructure Management (CIM) service following the installation. For details, see Additional Resources in this chapter.

Procedure

  1. If you are using the Assisted Installer UI:

    • In the Operators step of the wizard, enable the Install multicluster engine checkbox.
  2. If you are using the Assisted Installer API:

    • When registering a new cluster, use the "olm_operators: [{"name": "mce"}]" statement, for example:

      $ curl -s -X POST https://api.openshift.com/api/assisted-install/v2/clusters \
      -H "Authorization: Bearer ${API_TOKEN}" \
      -H "Content-Type: application/json" \
      -d "$(jq --null-input \
          --slurpfile pull_secret ~/Downloads/pull-secret.txt '
      {
          "name": "testcluster",
          "openshift_version": "4.11",
          "cpu_architecture" : "x86_64"
          "base_dns_domain": "example.com",
          "olm_operators: [{"name": "mce"}]",
          "pull_secret": $pull_secret[0] | tojson
      }
      ')" | jq '.id'

Post-installation steps

Additional resources

6.1.3. Installing OpenShift Data Foundation

When you configure the cluster, you can enable OpenShift Data Foundation. If enabled, the Assisted Installer:

  1. Validates that your environment meets the prerequisites outlined below. It does not validate that the disk devices have been reformatted, which you must verify before starting.
  2. Configures the storage to use all available disks.

When you enable OpenShift Data Foundation, the Assisted Installer creates a StorageCluster resource that specifies all available disks for use with OpenShift Data Foundation. If a different configuration is desired, modify the configuration after installing the cluster or install the Operator after the cluster is installed.

Prerequisites

  • The cluster is a three-node OpenShift cluster or has at least 3 worker nodes.
  • Each host has at least one non-installation disk of at least 25GB.
  • The disk devices you use must be empty. There should be no Physical Volumes (PVs), Volume Groups (VGs), or Logical Volumes (LVs) remaining on the disks.
  • Each host has 6 CPU cores for three-node OpenShift or 8 CPU cores for standard clusters, in addition to other CPU requirements.
  • Each host has 19 GiB RAM, in addition to other RAM requirements.
  • Each host has 2 CPU cores and 5GiB RAM per storage disk in addition to other CPU and RAM requirements.
  • You have assigned control plane or worker roles for each host (and not auto-assign).

Procedure

  1. If you are using the Assisted Installer UI:

    • In the Operators step of the wizard, enable the Install OpenShift Data Foundation checkbox.
  2. If you are using the Assisted Installer API:

    • When registering a new cluster, add the "olm_operators: [{"name": "odf"}]" statement. For example:

      $ curl -s -X POST https://api.openshift.com/api/assisted-install/v2/clusters \
      -H "Authorization: Bearer ${API_TOKEN}" \
      -H "Content-Type: application/json" \
      -d "$(jq --null-input \
         --slurpfile pull_secret ~/Downloads/pull-secret.txt '
      {
         "name": "testcluster",
         "openshift_version": "4.11",
         "cpu_architecture" : "x86_64",
         "base_dns_domain": "example.com",
         "olm_operators: [{"name": "odf"}]",
         "pull_secret": $pull_secret[0] | tojson
      }
      ')" | jq '.id'

Additional resources

6.1.4. Installing Logical Volume Manager Storage

When you configure the cluster, you can enable the Logical Volume Manager Storage (LVMS) Operator on single-node OpenShift clusters. Installing the LVMS Operator allows you to dynamically provision local storage.

Prerequisites

  • A single-node OpenShift cluster installed with version 4.11 or later
  • At least one non-installation disk
  • One additional CPU core and 400 MB of RAM (1200 MB of RAM for versions earlier than 4.13)

Procedure

  1. If you are using the Assisted Installer UI:

    • In the Operators step of the wizard, enable the Install Logical Volume Manager Storage checkbox.
  2. If you are using the Assisted Installer API:

    • When registering a new cluster, use the olm_operators: [{"name": "lvm"}] statement. For example:

      $ curl -s -X POST https://api.openshift.com/api/assisted-install/v2/clusters \
      -H "Authorization: Bearer ${API_TOKEN}" \
      -H "Content-Type: application/json" \
      -d "$(jq --null-input \
         --slurpfile pull_secret ~/Downloads/pull-secret.txt '
      {
         "name": "testcluster",
         "openshift_version": "4.14",
         "cpu_architecture" : "x86_64",
         "base_dns_domain": "example.com",
         "olm_operators: [{"name": "lvm"}]"
         "pull_secret": $pull_secret[0] | tojson
      }
      ')" | jq '.id'

Additional resources

6.2. Modifying Operators

In the Assisted Installer, you can add or remove Operators for a cluster resource that has already been registered as part of a previous installation step. This is only possible before you start the OpenShift Container Platform installation.

To modify the defined Operators:

  • If you are using the Assisted Installer UI, navigate to the Operators page of the wizard and modify your selection. For details, see Installing Operators in this section.
  • If you are using the Assisted Installer API, set the required Operator definition using the PATCH method for the /v2/clusters/{cluster_id} endpoint.

Prerequisites

  • You have created a new cluster resource.

Procedure

  1. Refresh the API token:

    $ source refresh-token
  2. Identify the CLUSTER_ID variable by listing the existing clusters, as follows:

    $ curl -s https://api.openshift.com/api/assisted-install/v2/clusters -H "Authorization: Bearer ${API_TOKEN}" | jq '[ .[] | { "name": .name, "id": .id } ]'

    Sample output

    [
      {
        "name": "lvmtest",
        "id": "475358f9-ed3a-442f-ab9e-48fd68bc8188" 1
      },
      {
        "name": "mcetest",
        "id": "b5259f97-be09-430e-b5eb-d78420ee509a"
      }
    ]

    Note
    1
    The id value is the <cluster_id>.
  3. Assign the returned <cluster_id> to the CLUSTER_ID variable and export it:

    $ export CLUSTER_ID=<cluster_id>
  4. Update the cluster with the new Operators:

    $ curl https://api.openshift.com/api/assisted-install/v2/clusters/${CLUSTER_ID} \
    -X PATCH \
    -H "Authorization: Bearer ${API_TOKEN}" \
    -H "Content-Type: application/json" \
    -d '
    {
        "olm_operators": [{"name": "mce"}, {"name": "cnv"}], 1
    }
    ' | jq '.id'
    Note
    1
    Indicates the Operators to be installed. Valid values include mce, cnv, lvm, and odf. To remove a previously installed Operator, exclude it from the list of values. To remove all previously installed Operators, type "olm_operators": [].

    Sample output

    {
      <various cluster properties>,
      "monitored_operators": [
        {
          "cluster_id": "b5259f97-be09-430e-b5eb-d78420ee509a",
          "name": "console",
          "operator_type": "builtin",
          "status_updated_at": "0001-01-01T00:00:00.000Z",
          "timeout_seconds": 3600
        },
        {
          "cluster_id": "b5259f97-be09-430e-b5eb-d78420ee509a",
          "name": "cvo",
          "operator_type": "builtin",
          "status_updated_at": "0001-01-01T00:00:00.000Z",
          "timeout_seconds": 3600
        },
        {
          "cluster_id": "b5259f97-be09-430e-b5eb-d78420ee509a",
          "name": "mce",
          "namespace": "multicluster-engine",
          "operator_type": "olm",
          "status_updated_at": "0001-01-01T00:00:00.000Z",
          "subscription_name": "multicluster-engine",
          "timeout_seconds": 3600
        },
        {
          "cluster_id": "b5259f97-be09-430e-b5eb-d78420ee509a",
          "name": "cnv",
          "namespace": "openshift-cnv",
          "operator_type": "olm",
          "status_updated_at": "0001-01-01T00:00:00.000Z",
          "subscription_name": "hco-operatorhub",
          "timeout_seconds": 3600
        },
        {
          "cluster_id": "b5259f97-be09-430e-b5eb-d78420ee509a",
          "name": "lvm",
          "namespace": "openshift-local-storage",
          "operator_type": "olm",
          "status_updated_at": "0001-01-01T00:00:00.000Z",
          "subscription_name": "local-storage-operator",
          "timeout_seconds": 4200
        }
      ],
      <more cluster properties>

    Note

    The output is the description of the new cluster state. The monitored_operators property in the output contains Operators of two types:

    • "operator_type": "builtin": Operators of this type are an integral part of OpenShift Container Platform.
    • "operator_type": "olm": Operators of this type are added either manually by a user or automatically due to dependencies. In the example, the lso Operator was added automatically because the cnv Operator requires it.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.