Language and Page Formatting Options

Deploying OpenShift Data Foundation on single node OpenShift clusters

Red Hat OpenShift Data Foundation 4.10

Instructions for deploying OpenShift Data Foundation on single node OpenShift clusters.

Red Hat Storage Documentation Team

Abstract

Read this document for instructions regarding installing Red Hat OpenShift Data Foundation Logical Volume Manager Operator on single node OpenShift clusters.
Important
Deploying OpenShift Data Foundation on single node OpenShift clusters is a Technology Preview feature. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. We are beginning with these four terms: master, slave, blacklist, and whitelist. Because of the enormity of this endeavor, these changes will be implemented gradually over several upcoming releases. For more details, see our CTO Chris Wright’s message.

Providing feedback on Red Hat documentation

We appreciate your input on our documentation. Do let us know how we can make it better. To give feedback:

  • For simple comments on specific passages:

    1. Make sure you are viewing the documentation in the Multi-page HTML format. In addition, ensure you see the Feedback button in the upper right corner of the document.
    2. Use your mouse cursor to highlight the part of text that you want to comment on.
    3. Click the Add Feedback pop-up that appears below the highlighted text.
    4. Follow the displayed instructions.
  • For submitting more complex feedback, create a Bugzilla ticket:

    1. Go to the Bugzilla website.
    2. In the Component section, choose documentation.
    3. Fill in the Description field with your suggestion for improvement. Include a link to the relevant part(s) of documentation.
    4. Click Submit Bug.

Preface

Red Hat OpenShift Data Foundation supports deploying OpenShift Data Foundation using the OpenShift Data Foundation Logical Volume Manager Operator on single node OpenShift (SNO) clusters.

OpenShift Data Foundation Logical Volume Manager Operator provides dynamic provisioning of block storage on a single, limited resources SNO cluster.

You can deploy the OpenShift Data Foundation Logical Volume Manager Operator on a single node Openshift baremetal cluster and configure it to dynamically provision storage for your workloads.

Chapter 1. Preparing to deploy OpenShift Data Foundation on single node OpenShift clusters

Before you begin deploying OpenShift Data Foundation Logical Volume Manager Operator on single node Openshift clusters, ensure that the following requirements are met:

  1. You have installed Red Hat Advanced Cluster Management for Kubernetes (RHACM) on an OpenShift cluster. For information, see Red Hat Advanced Cluster Management for Kubernetes: Install.
  2. Every managed SNO cluster has dedicated disks that are used to provision storage.

Chapter 2. Installing the OpenShift Data Foundation Logical Volume Manager Operator using RHACM

The OpenShift Data Foundation Logical Volume Manager Operator is deployed on single node OpenShift (SNO) clusters using Red Hat Advanced Cluster Management for Kubernetes (RHACM). You create a Policy on RHACM that deploys and configures the operator when it is applied to managed clusters which match the selector specified in the PlacementRule. The policy is also be applied to clusters that are imported later and satisfy the PlacementRule.

Prerequisites

  • Access to the RHACM cluster using an account with cluster-admin and operator installation permissions.
  • Dedicated disks on each SNO cluster to be used by OpenShift Data Foundation Logical Volume Manager Operator.

Procedure

  1. Log in to the RHACM CLI using your OpenShift credentials.

    For more information, see Install Red Hat Advanced Cluster Management for Kubernetes.

  2. Create a namespace.

    # oc create ns lvm-policy-ns
  3. Create the policy YAML in the namespace.

    # This policy verifies the installation of the official version of the OpenShift Data Foundation
    # Logical Volume Manager Operator on the managed clusters.
    # If set to "enforce" it installs the operator.
    # Used APIs: OLM, ODF-LVMO #https://github.com/operator-framework/operator-lifecycle-manager
    # https://github.com/red-hat-storage/lvm-operator
    
    apiVersion: policy.open-cluster-management.io/v1
    kind: Policy
    metadata:
     annotations:
       policy.open-cluster-management.io/categories: CM Configuration Management
       policy.open-cluster-management.io/controls: CM-2 Baseline Configuration
       policy.open-cluster-management.io/standards: NIST SP 800-53
     name: policy-lvm-operator
    spec:
     disabled: false
     policy-templates:
       - objectDefinition:
           apiVersion: policy.open-cluster-management.io/v1
           kind: ConfigurationPolicy
           metadata:
             name: policy-lvm-namespace
           spec:
             object-templates:
               - complianceType: musthave
                 objectDefinition:
                   apiVersion: v1
                   kind: Namespace
                   metadata:
                     name: openshift-storage
                     labels:
                       openshift.io/cluster-monitoring: "true"
             remediationAction: inform
             severity: high
       - objectDefinition:
           apiVersion: policy.open-cluster-management.io/v1
           kind: ConfigurationPolicy
           metadata:
             name: policy-lvm-operator-operatorgroup
           spec:
             object-templates:
               - complianceType: musthave
                 objectDefinition:
                   apiVersion: operators.coreos.com/v1alpha2
                   kind: OperatorGroup
                   metadata:
                     name: openshift-storage-operatorgroup
                     namespace: openshift-storage
                   spec:
                     targetNamespaces:
                       - openshift-storage
             remediationAction: inform
             severity: high
       - objectDefinition:
           apiVersion: policy.open-cluster-management.io/v1
           kind: ConfigurationPolicy
           metadata:
             name: policy-lvm-operator-subscription
           spec:
             object-templates:
               - complianceType: musthave
                 objectDefinition:
                   apiVersion: operators.coreos.com/v1alpha1
                   kind: Subscription
                   metadata:
                     name: odf-lvm-operator
                     namespace: openshift-storage
                   spec:
                     channel: stable-4.10
                     installPlanApproval: Automatic
                     name: odf-lvm-operator
                     source: redhat-operators
                     sourceNamespace: openshift-marketplace
                     startingCSV: odf-lvm-operator.v4.10.0
             remediationAction: inform
             severity: high
       - objectDefinition:
           apiVersion: policy.open-cluster-management.io/v1
           kind: ConfigurationPolicy
           metadata:
             name: policy-lvmcluster
           spec:
             object-templates:
               - complianceType: musthave
                 objectDefinition:
                   apiVersion: lvm.topolvm.io/v1alpha1
                   kind: LVMCluster
                   metadata:
                     name: lvmcluster-sample
                     namespace: openshift-storage
                   spec:
                     storage:
                       deviceClasses:
                       - name: vg1
     remediationAction: enforce
    ---
    apiVersion: policy.open-cluster-management.io/v1
    kind: PlacementBinding
    metadata:
     name: binding-policy-lvm-operator
    placementRef:
     apiGroup: apps.open-cluster-management.io
     kind: PlacementRule
     name: placement-policy-lvm-operator
    subjects:
     - apiGroup: policy.open-cluster-management.io
       kind: Policy
       name: policy-lvm-operator
    ---
    apiVersion: apps.open-cluster-management.io/v1
    kind: PlacementRule
    metadata:
     name: placement-policy-lvm-operator
    spec:
     clusterConditions:
       - status: 'True'
         type: ManagedClusterConditionAvailable
     clusterSelector:
       matchExpressions:
         - key: env
           operator: In
           values:
             - dev
  4. Run the following command:

    # oc create -f policy-lvm-operator.yaml -n lvm-policy-ns

    This creates a Policy, a PlacementRule, and a PlacementBinding. The Policy creates a Namespace, OperatorGroup, Subscription, and LVMCluster resource. This deploys the operator on the SNO clusters which match the selection criteria and configures it to set up the required resources in order to provision storage. The operator uses all the unused disks after installation.

Chapter 3. Monitoring the OpenShift Data Foundation Logical Volume Manager Operator

You can monitor the OpenShift Data Foundation Logical Volume Manager Operator by viewing the metrics exported by the operator on the RHACM dashboards. Enable RHACM Observability as described in the Observability guide.

topolvm_volumegroup_size_bytes
topolvm_volumegroup_available_bytes

Chapter 4. Uninstalling OpenShift Data Foundation Logical Volume Manager Operator

To uninstall OpenShift Data Foundation Logical Volume Manager Operator, you can either delete the policy or change the matching so that the policy does not match to that cluster any more.

Prerequisites

  • Ensure that the persistent volume claims (PVCs) and persistent volumes (PVs) provisioned using the the OpenShift Data Foundation Logical Volume Manager Operator is deleted before deleting the policy.
  • Ensure that the following are deleted:

    • All the applications on the managed clusters using the storage provisioned by the Logical Volume Manager Operator.
    • Persistent volume claims (PVCs) and persistent volumes (PVs) provisioned using the Logical Volume Manager Operator.

Procedure

  • Delete the policy on the hub cluster by using the following command:
# oc delete -f <policy-name> -n <policy-ns>

The OpenShift Data Foundation Logical Volume Manager Operator does not currently clean up the LVM resources created on the node on uninstallation. You must manually remove the resources on the node after uninstalling the operator. For more information, see https://access.redhat.com/solutions/6843041.