Apache Ignite

GridGain Developer Hub - Apache Ignitetm

Welcome to the Apache Ignite developer hub run by GridGain. Here you'll find comprehensive guides and documentation to help you start working with Apache Ignite as quickly as possible, as well as support if you get stuck.

 

GridGain also provides Community Edition which is a distribution of Apache Ignite made available by GridGain. It is the fastest and easiest way to get started with Apache Ignite. The Community Edition is generally more stable than the Apache Ignite release available from the Apache Ignite website and may contain extra bug fixes and features that have not made it yet into the release on the Apache website.

 

Let's jump right in!

 

Documentation     Ask a Question     Download

 

Javadoc     Scaladoc     Examples

Mesos Deployment

Deploy Ignite in Mesos cluster.

Overview

Apache Ignite Framework supports scheduling and running Apache Ignite nodes in a Mesos cluster.
Apache Mesos is a cluster manager which provides a general runtime environment providing all the essentials to deploy, run and manage distributed applications. Its resource management and isolation helps getting the most out of servers.
For information about Apache Mesos please refer to http://mesos.apache.org/

Ignite Mesos Framework

Deploying Apache Ignite cluster typically involves downloading the Apache Ignite distribution, changing configuration settings and starting the nodes. Apache Ignite Mesos Framework consists of Scheduler and Task, and allows to greatly simplify the cluster deployment.

  • Scheduler registers itself at Mesos Master on scheduler startup. Once the registration is successful, the Scheduler will begin processing resource requests from Mesos Master to utilize resources for Apache Ignite nodes. The scheduler will maintain the Ignite cluster at the desired (and available) resource level (CPU, memory, etc.).
  • Task launches an Ignite nodes on Mesos slave.

Running Ignite Mesos Framework

Running Ignite Mesos Framework requires Apache Mesos Cluster configured and running. For information on how to set up a Mesos cluster, please refer to https://docs.mesosphere.com/getting-started/datacenter/install/.

Make sure that master and slave nodes listen on correct ip addresses. Otherwise, there is no guarantee that Mesos Cluster will correctly work.

Run the Framework via Marathon

Currently, the recommended way to run the framework is to run it via Marathon.

  1. Install marathon. See https://docs.mesosphere.com/getting-started/datacenter/install/ marathon section.
  2. Download Apache Ignite and upload libs\optional\ignite-mesos\ignite-mesos-<ignite-version>-jar-with-dependencies.jar file to any cloud storage. (for example Amazon S3 storage and etc.).
  3. Copy the following application definition (in JSON format) and save to marathon.json file. Update any parameters which would like to change.
{
  "id": "ignition",
  "instances": 1,
  "cpus": 2,
  "mem": 2048,
  "ports": [0],
  "uris": [
    "http://host/ignite-mesos-<ignite-version>-jar-with-dependencies.jar"
  ],
  "env": {
    "IGNITE_NODE_COUNT": "4",
    "MESOS_MASTER_URL": "zk://localhost:2181/mesos",
    "IGNITE_RUN_CPU_PER_NODE": "2",
    "IGNITE_MEMORY_PER_NODE": "2048",
    "IGNITE_VERSION": "1.0.5",
    "MESOS_USER" : "userAAAAA",
    "MESOS_ROLE" :  "role1"
  },
  "cmd": "java -jar ignite-mesos-<ignite-version>-jar-with-dependencies.jar"
}

A role name must be a valid directory name, so it cannot:
• Be an empty string
• Be . or ..
• Start with -
• Contain any slash, backspace, or whitespace character

If there are no restrictions set on the cluster, the framework will try to occupy all the resources in Mesos cluster. See Configuration section below.

  1. Send POST request with the application definition to Marathon, using CURL or other tools.
curl -X POST -H "Content-type: application/json" --data-binary @marathon.json http://<marathon-ip>:8080/v2/apps/
  1. In order to make sure that Apache Mesos Framework is deployed correctly, do the following - Open Marathon UI at http://<marathon-ip>:8080. Make sure that an application with the name ignition exists and its status is Running.
  1. Open Mesos console at http://<master-ip>:5050. If everything works fine, then tasks with name like Ignite node N should have the state RUNNING. In this example, N is equal to 4. See example marathon.json file - "IGNITE_NODE_COUNT": "4"
  1. Mesos allows to retrieve tasks' logs from the browser. To look through Ignite logs, click on Sandbox in the Active Tasks table.
  1. Click on stdout to get stdout logs and on stderr to get stderr logs.

Run the Framework via JAR file

  1. Download Ignite package and go to libs\optional\ignite-mesos\ folder.
  2. Run the framework using the following command
java -jar ignite-mesos-<ignite-version>-jar-with-dependencies.jar

or

java -jar ignite-mesos-<ignite-version>-jar-with-dependencies.jar properties.prop

where properties.prop is a property file. If the file is not provided, the framework will try to occupy all resources in the Mesos cluster. Here is an example property file:

# The number of nodes in the cluster.
IGNITE_NODE_COUNT=1

# Mesos ZooKeeper URL to locate leading master.
MESOS_MASTER_URL=zk://localhost:2181/mesos

# The number of CPU Cores for each Apache Ignite node.
IGNITE_RUN_CPU_PER_NODE=4

# The number of Megabytes of RAM for each Apache Ignite node.
IGNITE_MEMORY_PER_NODE=4096

# The version ignite which will be run on nodes.
IGNITE_VERSION=1.0.5
  1. In order to make sure that Apache Mesos Framework is deployed correctly, do the following - Open Mesos console at http://<master-ip>:5050. If everything works fine, the tasks with name like Ignite node N should have the state RUNNING. In this example, N is equal to 1. See example properties.prop file - "IGNITE_NODE_COUNT": "1"
  1. Mesos allows to retrieve tasks' logs from browser. To look through Ignite logs, click on Sandbox.
  1. Click on stdout to get stdout logs and on stderr to get stderr logs.

Configuration

All configurations are handled through environment variables (this lends itself well to being easy to configure marathon to run the framework) or property file. Following configuration parameters can be optionally configured.

Name
Description
Default
Example

IGNITE_RUN_CPU_PER_NODE

The number of CPU Cores for each Apache Ignite node.

UNLIMITED

2

IGNITE_MEMORY_PER_NODE

The number of Megabytes of RAM for each Apache Ignite node.

UNLIMITED

1024

IGNITE_DISK_SPACE_PER_NODE

The number of Megabytes of Disk for each Apache Ignite node.

1024

2048

IGNITE_NODE_COUNT

The number of nodes in the cluster.

5

10

IGNITE_TOTAL_CPU

The number of CPU Cores for Ignite cluster.

UNLIMITED

5

IGNITE_TOTAL_MEMORY

The number of Megabytes of RAM for Ignite cluster.

UNLIMITED

16384

IGNITE_TOTAL_DISK_SPACE

The number of Megabytes of Disk for each Apache Ignite cluster.

UNLIMITED

5120

IGNITE_MIN_CPU_PER_NODE

The minimum number of CPU cores required to run Apache Ignite node.

1

4

IGNITE_MIN_MEMORY_PER_NODE

The minimum number of Megabytes of RAM cores required to run Apache Ignite node.

256

1024

IGNITE_VERSION

The version ignite which will be run on nodes.

latest

1.0.5

IGNITE_WORK_DIR

The directory which will be used for saving Apache Ignite distributives.

ignite-release

/opt/ignite/

IGNITE_XML_CONFIG

The path to Apache Ignite config file.

N/A

/opt/ignite/ignite-config.xml

IGNITE_CONFIG_XML_URL

The url to Apache Ingite config file.

N/A

https://example.com/default-config.xml

IGNITE_USERS_LIBS

The path to libs which will be added to classpath.

N/A

/opt/libs/

IGNITE_USERS_LIBS_URL

Comma separated list of ulrs to libs which will be added to classpath.

N/A

https://example.com/lib.zip,
https://example.com/lib1.zip

MESOS_MASTER_URL

Mesos ZooKeeper URL to locate leading master.

zk://localhost:2181/mesos

zk://176.0.1.45:2181/mesos
or
176.0.1.45:2181

IGNITE_PACKAGE_URL

URL to Apache Ignite archive. This parameter could be used instead of the IGNITE_VERSION parameter.

N/A

http://apache-mirror.rbc.ru/pub/apache//ignite/1.7.0/apache-ignite-1.7.0-src.zip

IGNITE_PACKAGE_PATH

Path to Apache Ignite archive. This parameter may be useful when access to internet is limited.

N/A

/opt/ignite/apache-ignite-fabric-1.5.0.final-bin.zip

IGNITE_HTTP_SERVER_IDLE_TIMEOUT

Sets the maximum Idle time (milliseconds) for a http connection, which will be used for jetty server. The server provides resources for ignite mesos framework such as ignite archive, user's libs, configurations and etc.

30000

300000

Mesos Deployment

Deploy Ignite in Mesos cluster.