Chapter 1. Installing Data Grid Operator
Install Data Grid Operator into a OpenShift namespace to create and manage Data Grid clusters.
1.1. Installing Data Grid Operator on Red Hat OpenShift
Create subscriptions to Data Grid Operator on OpenShift so you can install different Data Grid versions and receive automatic updates.
Automatic updates apply to Data Grid Operator first and then for each Data Grid node. Data Grid Operator updates clusters one node at a time, gracefully shutting down each node and then bringing it back online with the updated version before going on to the next node.
Prerequisites
- Access to OperatorHub running on OpenShift. Some OpenShift environments, such as OpenShift Container Platform, can require administrator credentials.
- Have an OpenShift project for Data Grid Operator if you plan to install it into a specific namespace.
Procedure
- Log in to the OpenShift Web Console.
- Navigate to OperatorHub.
- Find and select Data Grid Operator.
- Select Install and continue to Create Operator Subscription.
Specify options for your subscription.
- Installation Mode
- You can install Data Grid Operator into a Specific namespace or All namespaces.
- Update Channel
- Get updates for Data Grid Operator 8.1.x.
- Approval Strategies
- Automatically install updates from the 8.1.x channel or require approval before installation.
- Select Subscribe to install Data Grid Operator.
- Navigate to Installed Operators to verify the Data Grid Operator installation.
1.2. Installing Data Grid Operator from the Command Line
As an alternative to installing Data Grid Operator through the OperatorHub on OpenShift, use the oc
client to create subscriptions.
Prerequisites
-
Have an
oc
client.
Procedure
Set up projects.
- Create a project for Data Grid Operator.
If you want Data Grid Operator to control a specific Data Grid cluster only, create a project for that cluster.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc new-project ${INSTALL_NAMESPACE} oc new-project ${WATCH_NAMESPACE}
$ oc new-project ${INSTALL_NAMESPACE}
1 $ oc new-project ${WATCH_NAMESPACE}
2
Create an
OperatorGroup
resource.Control all Data Grid clusters
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc apply -f - << EOF apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: datagrid namespace: ${INSTALL_NAMESPACE} EOF
$ oc apply -f - << EOF apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: datagrid namespace: ${INSTALL_NAMESPACE} EOF
Control a specific Data Grid cluster
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc apply -f - << EOF apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: datagrid namespace: ${INSTALL_NAMESPACE} spec: targetNamespaces: - ${WATCH_NAMESPACE} EOF
$ oc apply -f - << EOF apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: datagrid namespace: ${INSTALL_NAMESPACE} spec: targetNamespaces: - ${WATCH_NAMESPACE} EOF
Create a subscription for Data Grid Operator.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc apply -f - << EOF apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: datagrid-operator namespace: ${INSTALL_NAMESPACE} spec: channel: 8.1.x installPlanApproval: Automatic name: datagrid source: redhat-operators sourceNamespace: openshift-marketplace EOF
$ oc apply -f - << EOF apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: datagrid-operator namespace: ${INSTALL_NAMESPACE} spec: channel: 8.1.x installPlanApproval: Automatic
1 name: datagrid source: redhat-operators sourceNamespace: openshift-marketplace EOF
- 1
- Specify
Manual
if you want to manually approve updates from the 8.1.x channel.
Verify the installation.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc get pods -n ${INSTALL_NAMESPACE}
$ oc get pods -n ${INSTALL_NAMESPACE} NAME READY STATUS infinispan-operator-<id> 1/1 Running