Este contenido no está disponible en el idioma seleccionado.
Chapter 2. Getting Started with Data Grid Operator
Data Grid Operator lets you create, configure, and manage Data Grid clusters.
Prerequisites
- Create a Data Grid Operator subscription.
-
Have an
occlient.
2.1. Infinispan Custom Resource (CR) Copiar enlaceEnlace copiado en el portapapeles!
Data Grid Operator adds a new Custom Resource (CR) of type Infinispan that lets you handle Data Grid clusters as complex units on OpenShift.
You configure Data Grid clusters running on OpenShift by modifying the Infinispan CR.
The minimal Infinispan CR for Data Grid clusters is as follows:
2.2. Creating Data Grid Clusters Copiar enlaceEnlace copiado en el portapapeles!
Use Data Grid Operator to create clusters of two or more Data Grid nodes.
Procedure
Specify the number of Data Grid nodes in the cluster with
spec.replicasin your Infinispan CR.For example, create a
cr_minimal.yamlfile as follows:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Apply your Infinispan CR.
oc apply -f cr_minimal.yaml
$ oc apply -f cr_minimal.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Watch Data Grid Operator create the Data Grid nodes.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Next Steps
Try changing the value of replicas: and watching Data Grid Operator scale the cluster up or down.
2.3. Verifying Data Grid Clusters Copiar enlaceEnlace copiado en el portapapeles!
Review log messages to ensure that Data Grid nodes receive clustered views.
Procedure
Do either of the following:
Retrieve the cluster view from logs.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Retrieve the Infinispan CR for Data Grid Operator.
oc get infinispan -o yaml
$ oc get infinispan -o yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow The response indicates that Data Grid pods have received clustered views:
conditions: - message: 'View: [example-rhdatagrid-0, example-rhdatagrid-1]' status: "True" type: wellFormedconditions: - message: 'View: [example-rhdatagrid-0, example-rhdatagrid-1]' status: "True" type: wellFormedCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Use oc wait with the wellFormed condition for automated scripts.
oc wait --for condition=wellFormed --timeout=240s infinispan/example-rhdatagrid
$ oc wait --for condition=wellFormed --timeout=240s infinispan/example-rhdatagrid