Mesos Deployment
Deploy Ignite in Mesos cluster.
This is a legacy Apache Ignite documentationThe new documentation is hosted here: https://ignite.apache.org/docs/latest/
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 used to deploy, run and manage distributed applications. Its resource management and isolation helps in getting the most out of servers.
For information about Apache Mesos please refer to http://mesos.apache.org/.
Ignite Mesos Framework
Deploying an 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 greatly simplifies cluster deployment.
Schedulerregisters itself at Mesos Master on scheduler initialization. Once the registration is successful, theSchedulerwill 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.).Tasklaunches 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 function correctly.
Run the Framework via Marathon
Currently, the recommended way to run the framework is to run it via Marathon.
- Install marathon. See https://mesosphere.github.io/marathon/docs/.
- Download Apache Ignite and upload the
libs\optional\ignite-mesos\ignite-mesos-<ignite-version>.jarfile to any cloud storage (for example Amazon S3 storage, etc.). - Copy the following application definition (in JSON format) and save to
marathon.jsonfile. Update any parameters which you would like to change.
{
"id": "ignition",
"instances": 1,
"cpus": 2,
"mem": 2048,
"ports": [0],
"uris": [
"http://host/ignite-mesos-<ignite-version>.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"
}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 the Mesos cluster. See the Configuration section below.
- Send POST request with the application definition to Marathon, using CURL or your preferred method.
curl -X POST -H "Content-type: application/json" --data-binary @marathon.json http://<marathon-ip>:8080/v2/apps/- To make sure that Apache Mesos Framework is deployed correctly: open the Marathon UI at
http://<marathon-ip>:8080. Make sure that an application with the nameignitionexists and its status isRunning.
- Open Mesos console at
http://<master-ip>:5050. If everything works fine, then tasks with names likeIgnite node Nshould have the stateRUNNING. In this example, N is equal to 4. See examplemarathon.jsonfile - "IGNITE_NODE_COUNT": "4"
- Mesos supports retrieving tasks' logs from the browser. To look through Ignite logs, click on
Sandboxin the Active Tasks table.
- Click on
stdoutto get stdout logs and onstderrto get stderr logs.
Run the Framework via JAR file
- Download Ignite package and go to the
libs\optional\ignite-mesos\folder. - Run the framework using the following command:
java -jar ignite-mesos-<ignite-version>.jaror
java -jar ignite-mesos-<ignite-version>.jar properties.propwhere 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- In order to make sure that Apache Mesos Framework is deployed correctly: open the Mesos console at
http://<master-ip>:5050. If everything works fine, the tasks with names likeIgnite node Nshould have the stateRUNNING. In this example, N is equal to 1. See exampleproperties.propfile - "IGNITE_NODE_COUNT": "1"
- Mesos supports retrieving tasks' logs from browser. To look through Ignite logs, click on
Sandbox.
- Click on
stdoutto get stdout logs and onstderrto 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 the property file. The following configuration parameters can be optionally configured.
Name | Description | Default | Example |
|---|---|---|---|
| The number of CPU Cores for each Apache Ignite node. |
|
|
| The number of Megabytes of RAM for each Apache Ignite node. |
|
|
| The number of Megabytes of Disk for each Apache Ignite node. |
|
|
| The number of nodes in the cluster. |
|
|
| The number of CPU Cores for Ignite cluster. |
|
|
| The number of Megabytes of RAM for Ignite cluster. |
|
|
| The number of Megabytes of Disk for each Apache Ignite cluster. |
|
|
| The minimum number of CPU cores required to run an Apache Ignite node. |
|
|
| The minimum number of Megabytes of RAM cores required to run an Apache Ignite node. |
|
|
| The version ignite which will be run on nodes. |
|
|
| The directory which will be used for saving Apache Ignite distributives. |
|
|
| The path to the Apache Ignite config file. |
|
|
| The URL of Apache Ingite config file. |
|
|
| The path to libs which will be added to classpath. |
|
|
| Comma separated list of URLs to libs which will be added to classpath. |
|
|
| Mesos ZooKeeper URL to locate leading master. |
|
|
| URL to Apache Ignite archive. This parameter can be used instead of the IGNITE_VERSION parameter. |
|
|
| Path to Apache Ignite archive. This parameter may be useful when internet access is limited. |
|
|
| Sets the maximum Idle time (milliseconds) for an 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, etc. |
|
|
Updated 9 months ago
