OpenShift Container Storage is now OpenShift Data Foundation starting with version 4.9.
Chapter 7. Gluster Block Storage as Backend for Logging and Metrics
Following section guides to configure Gluster Block Storage as the backend storage for logging and metrics
Block volume expansion is now supported in OpenShift Container Storage 3.11. Refer to Section 3.2.3, “Block volume expansion”.
7.1. Prerequisites Copy linkLink copied to clipboard!
Before setting gluster block storage as the backend for logging or metrics, check if the following prerequisites are met:
In the storageclass file, check if the default storage class is set to the storage class of gluster block. For example:
oc get storageclass
# oc get storageclass NAME TYPE gluster-block gluster.org/glusterblock
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If the default is not set to
gluster-block
(or any other name that you have provided) then execute the following command. For example:oc patch storageclass gluster-block -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
# oc patch storageclass gluster-block -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Execute the following command to verify:
oc get storageclass NAME TYPE gluster-block (default) gluster.org/glusterblock
oc get storageclass NAME TYPE gluster-block (default) gluster.org/glusterblock
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.2. Enabling Gluster Block Storage as Backend for Logging Copy linkLink copied to clipboard!
Follow the tasks mentioned below to enable Gluster Block Storage as backend for logging:
- To enable logging in Openshift Container platform, see https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/configuring_clusters/#install-config-aggregate-logging
The
openshift_logging_es_pvc_dynamic
ansible variable has to be set to true.[OSEv3:vars] openshift_logging_es_pvc_dynamic=true
[OSEv3:vars] openshift_logging_es_pvc_dynamic=true
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example, a sample set of variables for openshift_logging_ are listed below.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the Ansible playbook. For more information, see .https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/configuring_clusters/#install-config-aggregate-logging
To verify, execute the following command:
oc get pods -n openshift-logging
# oc get pods -n openshift-logging
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
For more information regarding logging storage considerations, see https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/configuring_clusters/#install-config-aggregate-logging-sizing-guidelines-storage.
7.3. Enabling Gluster Block Storage as Backend for Metrics Copy linkLink copied to clipboard!
Follow the tasks mentioned below to enable Gluster Block Storage as backend for metrics
By default, since Container Native Storage performs three-way replication, data will be available to the restarted node from anywhere in the cluster. As a result, it is recommended that Cassandra-level replication is turned off to avoid capacity overhead
- To enable metrics in Openshift Container platform, see https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/configuring_clusters/#install-config-cluster-metrics
The
openshift_metrics_cassandra_storage_type
ansible variable should be set todynamic
:[OSEv3:vars]openshift_metrics_cassandra_storage_type=dynamic
[OSEv3:vars]openshift_metrics_cassandra_storage_type=dynamic
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example, a sample set of variables for openshift_metrics_ are listed below.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the Ansible playbook. For more information, see https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/configuring_clusters/#install-config-cluster-metrics.
To verify, execute the following command:
oc get pods --namespace openshift-infra
# oc get pods --namespace openshift-infra
Copy to Clipboard Copied! Toggle word wrap Toggle overflow It should list the following pods running:
heapster-cassandra heapster-metrics hawkular-&*9
heapster-cassandra heapster-metrics hawkular-&*9
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
For more information regarding metrics storage considerations, see https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/configuring_clusters/#metrics-data-storage.
7.4. Verifying if Gluster Block is Setup as Backend Copy linkLink copied to clipboard!
Execute the following commands to verify if gluster block is setup as the backend for logging and metrics:
To get an overview of the infrastructure, execute the following command:
oc get pods -n logging -o jsonpath='{range .items[].status.containerStatuses[]}{"Name: "}{.name}{"\n "}{"Image: "}{.image}{"\n"}{" State: "}{.state}{"\n"}{end}'
# oc get pods -n logging -o jsonpath='{range .items[].status.containerStatuses[]}{"Name: "}{.name}{"\n "}{"Image: "}{.image}{"\n"}{" State: "}{.state}{"\n"}{end}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To get the details of all the persistent volume claims, execute the following command:
oc get pvc
# oc get pvc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To get the details of the pvc, execute the following command:
oc describe pvc <claim_name>
# oc describe pvc <claim_name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify the volume is mountable and that permissions allow read/write. Also, PVC claim name should match the dynamically provisioned gluster block storage class.
For more information, see https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/configuring_clusters/#install-config-aggregate-logging-sizing.