Search code examples
docker-composemesosmarathon

Sample Mesos marathon setup


I am trying to setup one single mesos master, mesos slave and a marathon instance using docker compose. Mesos master and slave starts up without any issues but it's throwing error at marathon start up:

marathon:
image: mesosphere/marathon:v1.1.2
network_mode: host
environment:
MESOS_MASTER: zk://127.0.0.1:2181/mesos
depends_on:
- zookeeper

In startup I am seeing the below error:

mesos_mesos_slave_one_1 exited with code 1 marathon_1

[2017-08-25 01:50:28,344] INFO Starting Marathon 1.1.2 with (mesosphere.marathon.Main$:main) marathon_1 | [scallop] Error: Required option 'master' not found mesos_marathon_1. exited with code 1

Thanks in advance.

docker compose file:

version: '2'
services:
    zookeeper:
      image: zookeeper
      network_mode: host
    mesos_master:
     image: mesosphere/mesos-master:1.0.1-2.0.93.ubuntu1404
     network_mode: host
     environment:
      - MESOS_ZK=zk://127.0.0.1:2181/mesos
      - MESOS_HOSTNAME=127.17.0.4
     depends_on:
     - zookeeper
    mesos_slave_one:
     image: mesosphere/mesos-slave:1.0.1-2.0.93.ubuntu1404
     network_mode: host
     environment:
      - MESOS_MASTER=zk://127.0.0.1:2181/mesos
      - MESOS_WORK_DIR= /tmp
      - MESOS_CONTAINERIZERS=docker
      - MESOS_HOSTNAME=127.17.0.4
      - MESOS_PORT=5051
     volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup
      - /var/run/docker.sock:/var/run/docker.sock
      - /usr/bin/docker:/usr/bin/docker:ro
     depends_on:
     - zookeeper
    marathon:
     image: mesosphere/marathon:v1.1.2
     network_mode: host
     environment:
      - MESOS_MASTER=zk://127.0.0.1:2181/mesos
      - master=local
     depends_on:
     - zookeeper

Solution

  • My bad I defined MESOS_MASTER instead of marathon master in my docker compose file.

    MARATHON_MASTER: zk://127.0.0.1:2181/mesos