Deploying OpenShift Data Foundation on single node OpenShift clusters
Instructions for deploying OpenShift Data Foundation on single node OpenShift clusters.
Abstract
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:
- 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.
- Use your mouse cursor to highlight the part of text that you want to comment on.
- Click the Add Feedback pop-up that appears below the highlighted text.
- Follow the displayed instructions.
For submitting more complex feedback, create a Bugzilla ticket:
- Go to the Bugzilla website.
- In the Component section, choose documentation.
- Fill in the Description field with your suggestion for improvement. Include a link to the relevant part(s) of documentation.
- 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:
- 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.
- 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.
Ensure that no other storage provisioner is installed on the SNO cluster. OpenShift Data Foundation Logical Volume Manager Operator should be the only storage provisioner as it uses all available disks on the node.
Procedure
Log in to the RHACM CLI using your OpenShift credentials.
For more information, see Install Red Hat Advanced Cluster Management for Kubernetes.
Create a namespace.
# oc create ns lvm-policy-ns
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 remediationAction: enforce 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: enforce 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: enforce 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: enforce 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: odf-lvmcluster namespace: openshift-storage spec: storage: deviceClasses: - name: vg1 remediationAction: enforce severity: high
Run the following command:
# oc create -f policy-lvm-operator.yaml -n lvm-policy-ns
This creates a
Policy
, aPlacementRule
, and aPlacementBinding
. ThePolicy
creates aNamespace
,OperatorGroup
,Subscription
, andLVMCluster
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.
- Add the following topolvm metrics to the allow list as specfied in the Adding custom metrics section:
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.