Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 2. Getting Started with Data Grid Operator
Data Grid Operator lets you create, configure, and manage Data Grid clusters.
Prerequisites
- Install Data Grid Operator.
-
Have an
occlient.
2.1. Infinispan Custom Resource (CR) Link kopierenLink in die Zwischenablage kopiert!
Data Grid Operator adds a new Custom Resource (CR) of type Infinispan that lets you handle Data Grid clusters as complex units on OpenShift.
Data Grid Operator watches for Infinispan Custom Resources (CR) that you use to instantiate and configure Data Grid clusters and manage OpenShift resources, such as StatefulSets and Services. In this way, the Infinispan CR is your primary interface to Data Grid on OpenShift.
The minimal Infinispan CR is as follows:
2.2. Creating Data Grid Clusters Link kopierenLink in die Zwischenablage kopiert!
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 yourInfinispanCR.For example, create a
cr_minimal.yamlfile as follows:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Apply your
InfinispanCR.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 Link kopierenLink in die Zwischenablage kopiert!
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
InfinispanCR 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-infinispan-0, example-infinispan-1]' status: "True" type: wellFormedconditions: - message: 'View: [example-infinispan-0, example-infinispan-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-infinispan
$ oc wait --for condition=wellFormed --timeout=240s infinispan/example-infinispan