Home

Awesome

Deploying presto with docker/marathon/mesos

Requirements

(working)

Software used

Howto

Setup

docker pull sheepkiller/presto-marathon

Then, create a tarball containing your catalog properties files, located in a directory called "catalog", and put it in a place where curl can grab it. Here's an example for jmx

mkdir catalog
echo "connector.name=jmx" > catalog/jmx.properties
tar zcvf catalog.tar.gz catalog
scp catalog.tar.gz my.server:

Let's play !

Please see examples/deploy_presto.json... As you can see, there's 4 mandatory environment variable to set:

  1. CATALOGS_URL : where to find catalog.tar.gz
  2. MARATHON_APPNAME : application name which must match args in your json
  3. MARATHON_APPGROUP : applications group which must match group in id
  4. MARATHON_URL : which must match your marathon master URL

You can also set JVM options via environment variables

Or some presto configuration

Or UUID (uuid is generated at runtime)

If you need more tuning, modify confd files (presto-marathon-docker/docker/presto/confd)

Start cluster

curl -i -H 'Content-Type: application/json' -d @deploy_presto.json http://my.marathon.master:8080/v2/groups

Destroy cluster

 curl -X DELETE http://my.marathon.master/v2/groups/presto

presto CLI

$ docker exec -it <container id> /bin/bash
[container]# ./bin/presto  \
              --server \
              $(curl -sSfLk -m 10 -H \
                'Accept: text/plain' ${MARATHON_URL}/v2/tasks | \
                 egrep ^${MARATHON_APPGROUP}_meta_coordinator | \
                 awk 'NF == 3 {printf("http://%s"), $NF}')
sh connect.sh

Has been tested on bridged networks.

Limitations

ToDo's