Public | Automated Build

Last pushed: 2 years ago
Short Description
A sample Mesos framework written in Javascript.
Full Description


This project is a proof-of-concept implementation of a Mesos framework in JavaScript via the fabulous node-java bridge.
It will start three tobilg/docker-mini-webserver Docker images as tasks on the Mesos cluster.


This framework is for demo purposes only, and just meant to show that it's possible to write a Mesos framework in JavaScript via a JNI bridge.


Clone the Vagrant CoreOS Mesos cluster and start the cluster

git clone && cd coreos-mesos-cluster && vagrant up 

Clone the project and install dependencies

git clone && cd mesos-js-framework && npm install


You can test this via Vagrant and the tobilg/coreos-mesos-cluster project, which starts a three node CoreOS cluster with ZooKeeper 3.4.6, Mesos 0.27.0 (masters and slaves) and Marathon.

This will expose the addresses, and To connect the framework to the cluster, you can use the Mesos master URL zk://,,

Running the framework locally

Before you can test the framework, please make sure that you have at least a JDK (version 7 or 8) and Mesos 0.27.x installed. The framework needs the library to be available either on the path or via the MESOS_NATIVE_JAVA_LIBRARY environment variable.
You need to make sure that the LIBPROCESS_IP is set to a reachable IP address on you local machine, e.g. on Mac OS via

export LIBPROCESS_IP=$(ipconfig getifaddr en0)

where en0 is the respective interface.

To start the framework, use the following command:

MESOS_ZK_CONNECTION=zk://,, node mesos-js-framework.js

This framework will start three tobilg/docker-mini-webserver Docker images. Each will be reachable on port 8888 on the Mesos slaves, e.g.

You should then see the framework in the Mesos master's framework page.

Running the framework via Marathon

curl -XPOST '' -H 'Content-Type: application/json' -d '{
  "id": "mesos-js-framework",
  "env": {
      "MESOS_ZK_CONNECTION": "zk://,,",
      "LIBPROCESS_IP": ""
  "container": {
    "type": "DOCKER",
    "docker": {
      "network": "HOST",
        "image": "tobilg/mesos-js-framework",
        "forcePullImage": true
  "cpus": 0.5,
  "mem": 256,
  "instances": 1, 
  "constraints": [["hostname", "CLUSTER", ""]]
Docker Pull Command
Source Repository