Data Grid Operator Quickstart

Red Hat Data Grid 7.3

Data Grid Documentation

Red Hat Customer Content Services

Abstract

Store and retrieve data on Data Grid clusters with the Data Grid Operator.

The Data Grid Operator provides operational intelligence and reduces management complexity for deploying Data Grid clusters on OpenShift.

Authors: Galder Zamarreño
Technologies: Data Grid, Operator, Kubernetes, OKD, Red Hat OpenShift

1. Storing and Retrieving Data on Data Grid Clusters

Prerequisites

Procedure

  1. Expose the Data Grid service for external access.

    $ oc expose svc example-rhdg
  2. Create local variables for the public route and credentials.

    1. Export the host for the public route to a local variable.

      $ export DATAGRID_HOST=$(oc get route example-rhdg -o jsonpath="{.spec.host}")
    2. Export the generated password from the secret to a local variable.

      $ export PASS=$(oc get secret example-rhdg-app-generated-secret -o jsonpath="{.data.password}" | base64 --decode)
  3. Store some data through the HTTP endpoint.

    $ curl -v \
        -X POST \
        -u developer:${PASS} \
        -H 'Content-type: text/plain' \
        -d 'test-value' \
        ${DATAGRID_HOST}/rest/default/test-key
    ...
    < HTTP/1.1 200 OK
  4. Retrieve the data from the Data Grid cluster.

    $ curl -v \
        -u developer:${PASS} \
        ${DATAGRID_HOST}/rest/default/test-key
    ...
    < HTTP/1.1 200 OK
    ...
    test-value