Downloading artifacts for JGroups cloud discovery protocols for RHDG server

Solution Verified - Updated

Environment

  • Red Hat Data Grid (RHDG)

Issue

  • How to discover RHDG instances in an environment outside of OpenShift and Kubernetes?
  • What is needed to install S3PING discovery fow AWS?
  • If the S3PING configuration is used there is an Exception when starting the server
Caused by: java.lang.ClassNotFoundException: com.amazonaws.services.s3.model.S3ObjectInputStream
  • Which discovery protocol can be used outside of OCP/K8s?
  • How can I add Google-PING as discovery?
  • How can I add Azure-PING as discovery?

Resolution

To use NATIVE_S3_PING, GOOGLE_PING2, or AZURE_PING with Red Hat Data Grid Server the artifacts from Maven Central repository must be used and added to the server installation.
The JAR file for each discovery protocol is needed as well as all dependencies.

Before downloading the dependencies, the correct artifact version for the version of Data Grid Server are needed.
The versions can be found in the Server Guide.
Alternatively the versions in the corresponding JGroups default configuration file in the infinispan-core-*.jar file in the $RHDG_HOME/lib directory.
Open the JAR file with any archive manager and locate the default-configs/default-jgroups-*.xml file that matches the cloud provider which should be used.

NATIVE_S3_PING

  • git clone git@github.com:jgroups-extras/native-s3-ping.git
  • cd native-s3-ping
  • git checkout <version> # example version : native-s3-ping-2.0.0.Final
  • mvn dependency:copy -Dartifact=org.jgroups.aws.s3:native-s3-ping:1.0.0.Final -DoutputDirectory=$RHDG_HOME/server/lib
  • mvn dependency:copy-dependencies -DoutputDirectory=$RHDG_HOME/server/lib -DincludeScope=runtime -DexcludeGroupIds=org.jgroups,com.fasterxml.jackson.core,com.fasterxml.jackson.dataformat,org.apache.logging.log4j

Note that -DexcludeGroupIds=org.jgroups,com.fasterxml.jackson.core,com.fasterxml.jackson.dataformat ignores the dependencies that are shipped with Data Grid Server.

GOOGLE_PING2

  • git clone git@github.com:jgroups-extras/jgroups-google.git
  • cd jgroups-google
  • git checkout <version> # example version : jgroups-google-2.0.0.Final
  • mvn dependency:copy -Dartifact=org.jgroups.google:jgroups-google:1.0.0.Final -DoutputDirectory=$RHDG_HOME/server/lib
  • mvn dependency:copy-dependencies -DoutputDirectory=$RHDG_HOME/server/lib -DincludeScope=runtime -DexcludeGroupIds=org.jgroups,com.fasterxml.jackson.core,com.fasterxml.jackson.dataformat,org.apache.logging.log4j

AZURE_PING

  • git clone git@github.com:jgroups-extras/jgroups-azure.git
  • cd jgroups-azure
  • git checkout <version> # example version : 2.0.1.Final
  • mvn dependency:copy -Dartifact=org.jgroups.azure:jgroups-azure:1.3.0.Final -DoutputDirectory=$RHDG_HOME/server/lib
  • mvn dependency:copy-dependencies -pl azure -DoutputDirectory=$RHDG_HOME/server/lib -DincludeScope=runtime -DexcludeGroupIds=org.jgroups,com.fasterxml.jackson.core,com.fasterxml.jackson.dataformat,org.apache.logging.log4j,org.slf4j

Root Cause

Discovery protocols might not be supported and are not shipped with the Red Hat DataGrid distribution for different reasons.
Because of this it will be part of the custom installation.

Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.