Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description


This is a DCOS demo app, a simple event counter that watches out for a topic on Twitter as well.


In all scenarios below, we will use Marathon to deploy the ntil app. Also note that I'm using HTTPie here in the example, but you can achieve similar results using curl. All deployments are based on the Docker image mhausenblas/ntil.

In order for the Twitter watch part to work you'll need to supply your Twitter credentials. You can obtain those from creating a Twitter application via

Playa Mesos

Ramp up your playa-mesos sandbox, log in and get the ntil app:

$ vagrant up
$ vagrant ssh
$ git clone
$ cd ntil

If you do a Docker deployment on Marathon the first time, now would be a good time to read Running Docker Containers on Marathon. In a nutshell: make sure Docker is installed and containerizer enabled.

You can test ntil in Docker directly, inside the Playa sandbox, using docker run -d mhausenblas/ntil:latest and once the container is launched—you may want to check with docker ps (and docker kill/docker rm respectively afterwards)—you should be able to access the app through pointing your browser to http://localhost:9889/ where the UI is or via the following API commands:

$ http http://localhost:9889/service/target
$ http http://localhost:9889/service/topic

Now you're ready to deploy ntil via the Marathon HTTP API, again using the same Docker image from above:

$ http POST < ntil-app-playa.json
$ http GET
$ http DELETE

Note that in order for the Twitter watch integration to work, you will have to provide your own Twitter credentials by editing ntil-app-playa.json:

$ cat ntil-app-playa.json
    "id": "ntil",
    "instances": 1,
    "cpus": 1,
    "mem": 100,
    "container": {
        "type": "DOCKER",
        "docker": {
            "image": "mhausenblas/ntil:latest"
    "args": ["-e", "2015-04-28T17:00:00", "-t", "mesos", "-k", "10ad9...", "-s", "a2cd...", "-a", "0ghs...", "-o", "hf95..." ]

Using the following parameters from your app definition at

  • -k ... Consumer Key (API Key)
  • -s ... Consumer Secret (API Secret)
  • -a ... Access Token
  • -o ... Access Token Secret

Another note concerning the build process (which should not effect you in normal operation): I sometimes had issues (cache? GC? timeout?) with the Docker image not being up-to-date. The following helped (inside the Playa sandbox):

$ docker pull
$ sudo stop mesos-slave
$ sudo start mesos-slave


I assume that you have the DCOS EA or PB version installed, which comes with Marathon pre-installed.

So now it's time to log into a cluster instance and install and deploy ntil:

$ ssh -i ~/.ssh/mesosphere.pem
$ git clone
$ cd ntil
$ alias http='docker run -i --rm --net=host clue/httpie'
$ cp ntil-app-aws.json my-ntil-app-aws.json
$ vi my-ntil-app-aws.json # edit to include your Twitter credentials
$ http POST < my-ntil-app-aws.json

Now, have a look in the Marathon UI:

In my case, Mesos has placed the app on instance (ignore the randomly assigned port 10000).
Use the FQDN you find here and replace the port with 9889 (ntils default service port) and you're done:

Docker Pull Command
Source Repository