このコンテンツは選択した言語では利用できません。
Running the Data Grid Operator
Data Grid Documentation
Abstract
Preface リンクのコピーリンクがクリップボードにコピーされました!
The Data Grid Operator provides operational intelligence and reduces management complexity for deploying Data Grid on OpenShift clusters.
Chapter 1. Technology Preview リンクのコピーリンクがクリップボードにコピーされました!
The Data Grid Operator is currently a Technology Preview.
Technology Preview features or capabilities are not supported with Red Hat production service-level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them for production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information see Red Hat Technology Preview Features Support Scope.
Chapter 2. Spinning Up Data Grid Clusters リンクのコピーリンクがクリップボードにコピーされました!
You create Data Grid clusters from custom resource definitions.
Prerequisites
Install the Data Grid Operator from the OperatorHub.
2.1. Creating Minimal Data Grid Clusters リンクのコピーリンクがクリップボードにコピーされました!
Quickly spin up a Data Grid cluster with two nodes and let the Data Grid Operator generate credentials. You can retrieve the credentials from the pods after you create the Data Grid cluster. However, because Data Grid clusters require authentication, you cannot connect to the pods without the credentials.
Procedure
Create a custom resource
yamlfor the minimal cluster.Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
replicasspecifies the number of nodes in the Data Grid cluster.
-
Apply the custom resource
yaml.oc apply -f cr_minimal.yaml
$ oc apply -f cr_minimal.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the Data Grid Operator creates the pods.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2. Creating Data Grid Clusters with Credentials リンクのコピーリンクがクリップボードにコピーされました!
Create secrets that contain credentials so application users can authenticate to Data Grid nodes. You can then specify the name of the secret in a custom resource yaml and spin up clusters with the Data Grid Operator.
Procedure
Create a secret that contains credentials for the application user.
Add an authentication secret
yaml, for example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow The secret must:
-
Be
type: Opaque. Have
usernameandpasswordfields.ImportantThe preceding authentication secret contains sample values for the
usernameandpasswordfields. You should replace these values with credentials that conform to your organization’s security requirements.
-
Be
Apply the authentication secret
yaml.oc apply -f connect_secret.yaml
$ oc apply -f connect_secret.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Create a custom resource
yamlfor the cluster that includes the name of the secret that contains your credentials.Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
replicasspecifies the number of nodes in the Data Grid cluster. -
connectorconfigures how users connect to Data Grid nodes to store and retrieve data.
-
Apply the custom resource
yaml.oc apply -f cr_minimal_with_auth.yaml
$ oc apply -f cr_minimal_with_auth.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the Data Grid Operator creates the pods.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3. Verifying Data Grid Clusters リンクのコピーリンクがクリップボードにコピーされました!
Review log messages to verify that the Data Grid Operator has successfully created a Data Grid cluster.
Procedure
Verify that the Data Grid nodes can discover each other, for example:
oc logs example-rhdg-0 | grep DNS_PING INFO Configuring JGroups discovery protocol to openshift.DNS_PING INFO [org.jgroups.protocols.openshift.DNS_PING] (MSC service thread 1-2) serviceName [my-namespace] set; clustering enabled
$ oc logs example-rhdg-0 | grep DNS_PING INFO Configuring JGroups discovery protocol to openshift.DNS_PING INFO [org.jgroups.protocols.openshift.DNS_PING] (MSC service thread 1-2) serviceName [my-namespace] set; clustering enabledCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the nodes have received a clustered view. Do either of the following:
Retrieve the cluster view from the pod log files.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Retrieve the custom resource type for the Data Grid Operator.
oc get infinispan -o yaml
$ oc get infinispan -o yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow The output of the preceding command contains the following message to indicate that the Data Grid nodes have received a clustered view:
conditions: - message: 'View: [example-rhdg-0, example-rhdg-1]' status: "True" type: wellFormedconditions: - message: 'View: [example-rhdg-0, example-rhdg-1]' status: "True" type: wellFormedCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 3. Managing Cluster Credentials リンクのコピーリンクがクリップボードにコピーされました!
Perform tasks to manage authentication for Data Grid clusters.
Prerequisites
-
An
occlient in your$PATH.
3.1. Retrieving Cluster Credentials リンクのコピーリンクがクリップボードにコピーされました!
You can retrieve credentials for your Data Grid clusters as base64-encoded strings from secrets in your cluster namespace.
If you do not create secrets and credentials when you create clusters, the Data Grid Operator automatically generates them with the following defaults:
- Default usernames
-
Management user is
admin. -
Application user is
developer.
-
Management user is
- Default credentials secrets
-
example-rhdg-mgmt-generated-secretcontains credentials for the management user. -
example-rhdg-app-generated-secretcontains credentials for the application user.
-
Procedure
Get the credentials from the secret. For example, to get the password for the application user from the default secret:
oc get secret example-rhdg-app-generated-secret \ -n my_namespace -o jsonpath="{.data.password}" | base64 --decode$ oc get secret example-rhdg-app-generated-secret \ -n my_namespace -o jsonpath="{.data.password}" | base64 --decodeCopy to Clipboard Copied! Toggle word wrap Toggle overflow TipUse the
jpJSON processor to retrieve credentials as follows:Copy to Clipboard Copied! Toggle word wrap Toggle overflow