GridGain Developers Hub
GitHub logo GridGain iso GridGain.com
GridGain Software Documentation

On-Premises Deployment

Prerequisites

GridGain was officially tested on:

JDK

Oracle JDK 8 and later, Open JDK 8 and later, IBM JDK 8 and later

OS

Linux (any flavor), Mac OSX (10.6 and up), Windows (XP and up), Windows Server (2008 and up), Oracle Solaris, z/OS

ISA

x86, x64, SPARC, PowerPC

Network

No restrictions (10G recommended)

Installing Using ZIP Archive

GridGain is available in three editions: Community Edition (CE), Enterprise Edition (EE) and Ultimate Edition (UE). For this example, we’ll use the GridGain CE, which is distributed as binary, docker, and cloud images, and via RPM/DEB. This chapter explains how to install the GridGain CE binary distribution.

To get started with the GridGain CE binary distribution:

  1. Download the GridGain binary as a zip archive.

  2. Unzip the zip archive into the installation folder in your system.

  3. Move the ignite-rest-http folder from {gridgain}/libs/optional to {gridgain}/libs to enable the Ignite REST library for the cluster. The library is used by GridGain Web Console for cluster management and monitoring needs.

  4. (Optional) Enable required modules.

  5. (Optional) Set the IGNITE_HOME environment variable or Windows PATH to point to the installation folder and make sure there is no trailing / (or \ for Windows) in the path.

Installing Using Docker

Considerations

In-memory vs Persistent Cluster

When deploying a persistent GridGain cluster, you should always mount a persistent volume or local directory. If you do not use a persistent volume, GridGain will store the data in the container’s file system. It means that the data will be erased when you restart the container.

Networking

By default, GridGain docker image exposes the following ports: 11211 47100 47500 49112. Expose more ports as needed by adding -p <port> to the docker run command. For example, to connect a thin client to the node running inside a docker container, open port 10800:

docker run -d -p 10800 gridgain/community

Downloading GridGain Docker Image

Assuming that you already have Docker installed on your machine, you can pull and run a GridGain Docker image using the following commands.

Open a command shell and use the following command to pull a GridGain Docker image.

# Pull latest version
sudo docker pull gridgain/community

By default, the latest version is downloaded but you can download a specific version too.

# Pull specific GridGain version
sudo docker pull gridgain/community:8.7.10

For GridGain Enterprise Edition or GridGain Ultimate Edition, use gridgain/enterprise or gridgain/ultimate.

Running In-Memory Cluster

Run GridGain in a docker container using the docker run command.

# Run latest version
sudo docker run -d gridgain/community

This command will launch a single GridGain node.

To run a specific version of GridGain, use the following command:

# Run specific GridGain version
sudo docker run -d gridgain/community:8.7.10

For GridGain Enterprise Edition or GridGain Ultimate Edition, use gridgain/enterprise or gridgain/ultimate.

# Run GridGain Ultimate Edition
sudo docker run -d \
  -e "LICENCE_URL=$LICENCE_URL" \
  gridgain/ultimate:8.7.10

Running Persistent Cluster

If you use Native Persistence, GridGain will store the user data under the default work directory ({IGNITE_HOME}/work) in the file system of the container. This directory will be erased if you restart the docker container. To avoid this, you can:

  • use a persistent volume to store the data; or

  • mount a local directory.

These two options are described in the following sections.

Using Persistent Volume

To create a persistent volume, run the following command:

sudo docker volume create persistence-volume

We will mount this volume to a specific directory when running the GridGain docker image. This directory will have to be passed to GridGain. This can be done in two ways:

  • Using the IGNITE_WORK_DIR system property.

  • In the node configuration file.

The following command launches the GridGain Docker image and passes the work directory to GridGain via the system property:

docker run -d \
  -v persistence-volume:/persistence \
  -e IGNITE_WORK_DIR=/persistence \
  gridgain/community

Using Local Directory

Instead of creating a volume, you can mount a local directory to the container in which the GridGain image is running and use this directory to store persistent data. When restarting the container with the same command, GridGain will load the existing data.

mkdir ignite_work_dir

docker run -d \
  -v ${PWD}/ignite_work_dir:/persistence \
  -e IGNITE_WORK_DIR=/persistence \
  gridgain/community

The -v option mounts a local directory under the /persistence path in the container. The -e IGNITE_WORK_DIR=/persistence option tells GridGain to use this folder as the work directory.

Enabling Modules

To enable specific modules, specify their names in the "OPTION_LIBS" system variable as follows:

sudo docker run -d \
  -e "OPTION_LIBS=ignite-rest-http,ignite-aws" \
  gridgain/community

By default, GridGain Docker image starts with the following modules enabled:

  • ignite-log4j,

  • ignite-spring,

  • ignite-indexing.

Environment Variables

The following parameters can be passed as environment variables in the docker container:

Parameter Name Description Default

CONFIG_URI

URL to the GridGain configuration file (can also be relative to the META-INF folder on the class path). The downloaded config file will be saved to ./ignite-config.xml

N/A

OPTION_LIBS

A list of modules that will be enabled for the node.

ignite-log4j, ignite-spring, ignite-indexing

JVM_OPTS

JVM arguments passed to the GridGain instance.

N/A

EXTERNAL_LIBS

A list of URL’s to external libs.

N/A