Chapter 6. Migrating Data Grid clusters on Red Hat OpenShift

Review migration details for Data Grid clusters running on Red Hat OpenShift.

6.1. Data Grid on OpenShift

Data Grid 8 introduces Data Grid Operator that provides operational intelligence and reduces management complexity for deploying Data Grid on OpenShift.

Red Hat supports Data Grid 8 on OpenShift only through Data Grid Operator subscriptions.

With Data Grid 8, Data Grid Operator handles most configuration for Data Grid clusters, including authentication, client keystores, external network access, and logging.

Creating Data Grid Services

Data Grid 7.3 introduced the Cache service and Data Grid service for creating Data Grid clusters on OpenShift.

To create these services in Data Grid 7.3, you import the service templates, if necessary, and then use template parameters and environment variables to configure the services.

Creating Cache service nodes in 7.3
$ oc new-app cache-service \
  -p APPLICATION_USER=${USERNAME} \
  -p APPLICATION_PASSWORD=${PASSWORD} \
  -p NUMBER_OF_INSTANCES=3 \
  -p REPLICATION_FACTOR=2
Creating Data Grid service nodes in 7.3
$ oc new-app datagrid-service \
  -p APPLICATION_USER=${USERNAME} \
  -p APPLICATION_PASSWORD=${PASSWORD} \
  -p NUMBER_OF_INSTANCES=3
  -e AB_PROMETHEUS_ENABLE=true
Creating services in Data Grid 8
  1. Create an Data Grid Operator subscription.
  2. Create an Infinispan Custom Resource (CR) to instantiate and configure Data Grid clusters.
apiVersion: infinispan.org/v1
kind: Infinispan
metadata:
  name: example-infinispan
spec:
  replicas: 2
  service:
    type: Cache 1
1
The spec.service.type field specifies whether you create Cache service or Data Grid service nodes.

6.1.1. Container storage

Data Grid 7.3 services use storage volumes mounted at /opt/datagrid/standalone/data.

Data Grid 8 services use persistent volume claims mounted at /opt/infinispan/server/data.

6.1.2. Data Grid CLI

Data Grid 7.3 let you access the CLI through remote shells only. Changes that you made to via the Data Grid 7.3 CLI were bound to the pod and did not survive restarts. With Data Grid 8 you can use the CLI as a fully functional mechanism for performing administrative operations with clusters on OpenShift or manipulating data.

6.1.3. Data Grid console

Data Grid 7.3 did not support the console on OpenShift. With Data Grid 8 you can use the console to monitor clusters running on OpenShift, perform administrative operations, and create caches remotely.

6.1.4. Customizing Data Grid

Data Grid 7.3 let you use the Source-to-Image (S2I) process and ConfigMap API to customize Data Grid server images running on OpenShift.

In Data Grid 8, Red Hat does not support customization of any Data Grid images from the Red Hat Container Registry.

Data Grid Operator handles the deployment and management of Data Grid 8 clusters on OpenShift.

As a result it is not possible to use custom:

  • Discovery protocols
  • Encryption mechanisms (SYM_ENCRYPT or ASYM_ENCRYPT)
  • Persistent datasources

In Data Grid 8.0 and 8.1, Data Grid Operator does not allow you to deploy custom code such as JAR files or other artefacts. In Data Grid 8.2, you can use a persistent volume claim (PVC) to make custom code available to Data Grid clusters.

6.1.5. Deployment configuration templates

The deployment configuration templates, and environment variables, that were available in Data Grid 7.3 are removed in Data Grid 8.

6.2. Data Grid 8.2 on OpenShift

This topic describes details for migrating from Data Grid 8.1 to 8.2 with Data Grid Operator.

Prometheus ServiceMonitor

You no longer need to create a ServiceMonitor for Prometheus to scrape Data Grid metrics. Enable monitoring for user-defined projects on OpenShift Container Platform and Data Grid Operator automatically detects when the Prometheus Operator is installed then creates a ServiceMonitor.