Bookmark this page

Guided Exercise: Install Operators with the Web Console

Install an operator by using the web console.

Outcomes

  • Install and uninstall an operator with the web console.

  • Examine the resources that the web console creates for the installation, and the operator workloads.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

This command ensures that the environment is ready.

[student@workstation ~]$ lab start operators-web

Instructions

  1. As the admin user, locate and navigate to the OpenShift web console.

    1. Log in to your OpenShift cluster as the admin user.

      [student@workstation ~]$ oc login -u admin -p redhatocp \
        https://api.ocp4.example.com:6443
      Login successful.
      
      ...output omitted...
    2. Identify the URL for the web console.

      [student@workstation ~]$ oc whoami --show-console
      https://console-openshift-console.apps.ocp4.example.com
    3. Open a web browser and navigate to https://console-openshift-console.apps.ocp4.example.com.

    4. Click Red Hat Identity Management and log in as the admin user with the redhatocp password.

  2. Install the File Integrity operator.

    1. Click OperatorsOperatorHub. In the Filter by keyword field, type integrity to locate the File Integrity operator, and then click File Integrity Operator.

    2. The web console displays information about the File Integrity operator. Click Install to proceed to the Install Operator page.

    3. The Install Operator page contains installation options. You can use the default options.

      The lab environment cluster is a disconnected cluster to ensure that exercises are reproducible. The Operator Lifecycle Manager is configured to use a mirror registry with only the required operators for the course. In this registry, the File Integrity operator has a single available update channel.

      By default, the File Integrity operator installs to all namespaces and creates the openshift-file-integrity namespace. The operator workload resides in this namespace.

      Do not enable monitoring, which this exercise does not cover.

      For more information about the File Integrity operator, refer to the File Integrity Operator chapter in the Red Hat OpenShift Container Platform 4.14 Security and Compliance documentation at https://access.redhat.com/documentation/en-us/openshift_container_platform/4.14/html-single/security_and_compliance/index#file-integrity-operator

    4. Click Install to install the operator.

      The web console displays some progress information. Click View Operator.

      Note

      The web console might display the View Operator button briefly before the OLM finishes the installation. The web console can also display errors briefly.

      Wait until the web console displays View Operator for more than a few seconds.

      Ensure that the openshift-file-integrity project is selected in the Project list.

  3. The web console displays details about the installed operator.

    The Details tab displays information about the operator and the related cluster service version resource.

    Scroll down to the Conditions section to review the evolution of the installation process. The last condition is for the Succeeded phase, because the installation completed correctly.

    The YAML tab displays the cluster service version resource API resource in YAML format.

    Click the Subscription tab to view information about the operator subscription resource. In this tab, you can change the update channel and the update approval configuration. The tab also links to the install plan. The install plan further describes the operator installation process. When the OLM finds an update for an operator that is configured for manual updates, then the OLM creates an install plan for the update. You approve the update in the install plan details page.

  4. Optionally, test the File Integrity operator.

    The File Integrity operator watches resources of the FileIntegrity type. When you create a file integrity resource, the operator creates a workload that verifies the file integrity of nodes. The results of the verification are presented as resources of the FileIntegrityNodeStatus type.

    1. Click the File Integrity tab, and click Create FileIntegrity.

    2. Use YAML view and modify the gracePeriod to 60. Then, click Create to create a file integrity resource.

    3. Click the FileIntegrityNodeStatus tab. After a few minutes, the list shows a new example-fileintegrity-master01 resource.

      Note

      The first file integrity resource that you create might not work correctly.

      If the operator does not create the FileIntegrityNodeStatus resource in a few minutes, then delete and create again the FileIntegrity resource.

      The exercise outcome does not depend on obtaining a FileIntegrityNodeStatus resource.

    4. After FileIntegrityNodeStatus has successfully been created, run this as the admin user to modify the node's filesystem: oc debug node/master01 — touch /host/etc/foobar

      [student@workstation ~]$ oc debug node/master01 -- touch /host/etc/foobar
      Starting pod/master01-debug-l92pd ...
      To use host binaries, `run chroot /host`
      
      Removing debug pod ...
    5. Click WorkloadsConfigMaps to list configmaps in the openshift-file-integrity namespace.

    6. Select aide-example-fileintegrity-master01-failed and view the report below Data

  5. Examine and differentiate the File Integrity operator workloads from the operator-managed workloads.

    1. Click WorkloadsDeployments to list deployments in the openshift-file-integrity namespace.

      The file-integrity-operator deployment is the operator workload that the OLM creates. This deployment watches file integrity resources, and creates the workloads to verify file integrity.

    2. Click WorkloadsDaemonSets to list daemon sets in the openshift-file-integrity namespace.

      If you create a file integrity resource, then the operator creates an aide-example-fileintegrity daemon set to verify file integrity.

  6. Uninstall the File Integrity operator.

    1. Click OperatorsInstalled Operators.

    2. In the list of installed operators, click File Integrity Operator.

    3. Select Uninstall Operator from the Actions list, and then click Uninstall.

  7. Delete the openshift-file-integrity namespace.

    The OLM creates the openshift-file-integrity namespace when installing the File Integrity operator.

    Before deleting an operator, always review the operator documentation to learn specific deletion actions.

    1. Click HomeProjects.

    2. Type integrity in the Name filter field.

    3. Click openshift-file-integrity.

    4. Select Delete Project from the Actions list. Then, type openshift-file-integrity and click Delete.

Finish

On the workstation machine, use the lab command to complete this exercise. This step is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish operators-web

Revision: do280-4.14-08d11e1