Operators

About Operators

The collection of operators are used for reporting workload metrics and integrating product install lifecycle

IBM Metrics Operator

The IBM Metrics Operator is used to meter workloads and report usage from Prometheus on an OpenShift cluster, and reports it to IBM Software Central. It enables pay for what you use pricing options, and consolidates billing and reporting.

IBM Data Reporter Operator

The IBM Data Reporter Operator is used as a push event interface into the IBM Metrics Operator’s data-service, for reporting to IBM Software Central.

Red Hat Marketplace Deployment Operator

The Red Hat Marketplace Deployment Operator allows for seamless integration among OpenShift, sellers, and your business. The operator makes it simpler to deploy products to your OpenShift clusters. It fetches and installs software updates.


How the Operators work

IBM Metrics Operator

The IBM Metrics Operator builds reports from the OpenShift cluster’s Prometheus data, as defined by a MeterDefinition, and uploads the report to IBM Software Central. Metrics may be viewed on the usage dashboard.

IBM Data Reporter Operator

The IBM Data Reporter Operator accepts authenticated push events on a REST endpoint, builds a report and forwards it to the IBM Metrics Operator data-service. The IBM Metrics Operator uploads the report to IBM Software Central.

Red Hat Marketplace Deployment Operator

The Red Hat Marketplace Deployment Operator registers the cluster, and provides the ability to manage clusters and install software directly from the platform.

Installing the Operators

The operators may be installed from the OpenShift console’s OperatorHub. The operators are published in the Certified Operators catalog.

Alternatively, this yaml may be applied by the OpenShift cluster administrator to create the operator Subscriptions.


Cluster requirements

The Operators and Prometheus instances require the following cluster resources. Note: To help ensure high availability, multiple nodes are required to provide pod scheduling across RedHat Marketplace Data Service and Prometheus.

Memory (GB)CPU (cores)Disk (GB)Nodes
IBM Metrics Operator0.80.73x13
IBM Data Reporter Operator0.30.71
Red Hat Marketplace Deployment Operator0.30.11
Prometheus via OpenShift Container Platform monitoring10.12x402

For additional details on resource requirements and storage configuration, refer to the documentation in the operator github repository.

The IBM Metrics Operator creates 3 x 1GB PersistentVolumeClaims to store reports as part of the data service, with ReadWriteOnce access mode.

Supported Storage Providers

  • OpenShift Container Storage / OpenShift Data Foundation version 4.x, from version 4.2 or higher
  • IBM Cloud Block storage and IBM Cloud File storage
  • IBM Storage Suite for IBM Cloud Paks:
    • File storage from IBM Spectrum Fusion/Scale
    • Block storage from IBM Spectrum Virtualize, FlashSystem or DS8K
  • Portworx Storage, version 2.5.5 or above
  • Amazon Elastic File Storage

Access Modes required

  • ReadWriteOnce (RWO)

Provisioning Options supported


Integration with OpenShift Container Platform monitoring

When using monitoring, available with OpenShift Container Platform, IBM Metrics Operator must be configured to reuse the user workload Prometheus instance. Configuring the operator to reuse the Prometheus instance helps reduce resource requirements necessary to maintain performance.

Enable OpenShift user workload monitoring

The task enables Openshift User Workload Monitoring for OpenShift Container Platform.

Prerequisites

  • Access cluster as cluster-admin role.
  • Install OpenShift CLI (oc).
  • Create the cluster-monitoring-config ConfigMap object.

Steps

  1. Create the user-workload-monitoring-config ConfigMap object with the following default values: retention: 168h and storage: 40Gi.

    For example:

    apiVersion: v1
    kind: ConfigMap
    metadata:
    name: user-workload-monitoring-config
    namespace: openshift-user-workload-monitoring
    data:
    config.yaml: |
    prometheus:
    retention: 168h
    volumeClaimTemplate:
    spec:
    resources:
    requests:
    storage: 40Gi
  2. Edit the cluster-monitoring-config ConfigMap object by running the following command:

    $ oc -n openshift-monitoring edit configmap cluster-monitoring-config
  3. Under data/config.yaml, set enableUserWorkload to true. Note: When set to true, the enableUserWorkload parameter enables monitoring for user-defined projects in a cluster.

    For example:

    apiVersion: v1
    kind: ConfigMap
    metadata:
    name: cluster-monitoring-config
    namespace: openshift-monitoring
    data:
    config.yaml: |
    enableUserWorkload: true
  4. Save the file.

Result

Changes are applied and monitoring for user-defined projects is enabled automatically.

Next steps

  • To verify the prometheus-operator, prometheus-user-workload and thanos-ruler-user-workload pods are running in the openshift-user-workload-monitoring project, run the following command. Note: It may take a few minutes for the pods to start.

    $ oc -n openshift-user-workload-monitoring get pod

    Example response:

    NAME READY STATUS RESTARTS AGE
    prometheus-operator-6f7b748d5b-t7nbg 2/2 Running 0 3h
    prometheus-user-workload-0 4/4 Running 1 3h
    prometheus-user-workload-1 4/4 Running 1 3h
    thanos-ruler-user-workload-0 3/3 Running 0 3h
    thanos-ruler-user-workload-1 3/3 Running 0 3h

Additional Resources

For more information on user workload monitoring installation and configuration, refer to the following OpenShift guide:


Artifacts under the installation namespace

Once on your cluster, the operators create and manage the following artifacts under the installation namespace (default: redhat-marketplace)

  • Custom Resource Definitions
    • MarketplaceConfig - configuration object for the ibm-metrics-operator controller-manager
    • MeterBase - configuration object for ibm-metrics-operator metering
    • MeterReport - controller generated object representing the daily report
    • MeterDefinition - configuration object defining prometheus workload query
    • DataReporterConfig - configuration object for the ibm-data-reporter-operator
    • RazeeDeployment - configuration object for the redhat-marketplace-operator
    • RemoteResource - configuration object for remote resources
  • Deployments & Services
    • ibm-metrics-operator - controller-manager
    • metric-state - workload association service
    • data-service - storage service
    • ibm-data-reporter-operator - controller-manager
    • redhat-marketplace-operator - controller-manager
    • remoteresource-controller - communicates Subscriptions installations
    • watch-keeper - telemetry
  • Secrets & ConfigMaps
    • redhat-marketplace-pull-secret - user created pull secret for authenticating for Red Hat Marketplace customers
    • ibm-entitlement-key - user created pull secret for authenticating for IBM Software Central customers

Data passed from your clusters to IBM Software Central

To enable product deployments and billing, the operator sends the following information to IBM Software Central

  • Heartbeat — to maintain cluster state data, the Red Hat Marketplace Deployment Operator sends cluster metadata once per minute.
  • Resource list — to synch information about your cluster and products installed using Red Hat Marketplace, the Red Hat Marketplace Deployment Operator sends a summarized list of select resourcess including: Subscription, ClusterServiceVersion, ClusterVersion, Console, Infrastructure, Namespace, Node.
  • Usage data - to bill for application usage, when selected, the IBM Metrics Operator sends reports with usage data as described in the metering API documentation.

Configure your firewall for OpenShift and IBM Software Central

To access services, grant access to the following URL:

URLFunction
swc.saas.ibm.comRequired for api communication

Uninstalling the Operators

  • Delete MarketplaceConfig
oc delete marketplaceconfig marketplaceconfig -n redhat-marketplace
  • Uninstall the operator from your OpenShift cluster using OperatorHub