Authors: Galder Zamarreno, Don Naro, Vladimir Blagojevic
Technologies: Infinispan, Red Hat Data Grid, Red Hat OpenShift
Summary: Learn about running Data Grid on OpenShift by completing these quickstart tutorials that guide you through simple "Hello World" demonstrations to more complex scenarios like cross-site replication.
Target Product: Red Hat Data Grid
Product Versions: RHDG 7.3 or later
Data Grid for OpenShift quickstart tutorials:
Quickstart Name | Shows you how to... |
---|---|
Hello World | Quickly verify cache-service and datagrid-service deployments. |
External Access | Access cache-service and datagrid-service pods outside OpenShift. |
Monitoring | Monitor Data Grid for OpenShift with Prometheus and Grafana. |
Cache Service: Creating Caches | Connect to cache-service over Hot Rod and create permanent caches. With cache-service you can create new caches only as copies of the default cache definition. |
Data Grid Service: Creating Caches | Connect to datagrid-service over Hot Rod and create permanent caches. With datagrid-service you can create multiple, different custom caches. |
Data Grid Service: Custom Configuration | Deploy Data Grid clusters with custom server configuration. |
Data Grid Service: Cross-Site Replication | Configure Data Grid clusters to replicate data between sites. |
- Java 8.0 (Java SDK 1.8) or later.
- Maven 3.0 or later. You must also configure Maven.
- A running OpenShift 3.10 or later cluster.
- An
oc
client in your$PATH
. - Red Hat customer account. You must have valid credentials to pull resources from registry.redhat.io.
NOTE: These tutorials use minishift to create local OpenShift clusters. However you can run the tutorials on OpenShift Container Platform 3.10 or later or any other OpenShift environment.
- Download and install minishift.
The Red Hat Container Development Kit includes minishift.
- Clone this repository to your host.
- Set your Red Hat customer account credentials with the
REDHAT_REGISTRY_USER
andREDHAT_REGISTRY_PASSWORD
environment variables.
$ export REDHAT_REGISTRY_USER=username@redhat.com
$ export REDHAT_REGISTRY_PASSWORD=password
- Run the following script to create a
datagrid-quickstart
profile and configure minishift (only once per host):
$ ./setup-minishift.sh
Hint: Pass the
VMDRIVER
variable to set the hypervisor that minishift uses (vm-driver
). For example, if you want to use VirtualBox embedded drivers
- Run the following script to start minishift and create a pull secret with your Red Hat credentials:
$ ./start-minishift.sh
You should now have a locally running OpenShift cluster and can start using the quickstart tutorials.
NOTE: Run the following command in any new terminal windows to ensure you use the correct oc
binary:
$ eval $(minishift oc-env)
NOTE: Steps to run the Data Grid for OpenShift quickstarts vary between tutorials. The following procedure is a high-level outline to help you get started. You should always refer to the instructions for each quickstart before you run it.
- Clone this repository and navigate to the quickstart directory, for example:
$ cd ${repoHome}/openshift/shared/hello-world
- Create a new project, for example:
$ oc new-project hello-world
- Ensure a registry.redhat.io pull secret is in the project.
$ oc get secrets
-
Create a new RHDG for OpenShift service.
- Confirm that
cache-service
ordatagrid-service
are available.
$ oc get templates -n openshift | grep 'cache-service\|datagrid-service'
See the Red Hat Data Grid for OpenShift documentation for more information.
- Deploy
cache-service
ordatagrid-service
. Substitute appropriate values for each variable in the following commands:
.
cache-service
$ oc new-app cache-service \ -p APPLICATION_USER=${user} \ -p APPLICATION_PASSWORD=${password} \ -p APPLICATION_NAME=${appName}
.
datagrid-service
$ oc new-app datagrid-service \ -p APPLICATION_USER=${user} \ -p APPLICATION_PASSWORD=${password} \ -p APPLICATION_NAME=${appName}
- Confirm that
-
Follow the procedures in the quickstart
README
to complete the tutorial.