Mesos 马拉松设置示例

Sample Mesos marathon setup

我正在尝试使用 docker compose 设置一个 mesos master、mesos slave 和一个 marathon 实例。 Mesos master 和 slave 启动时没有任何问题,但它在马拉松启动时抛出错误:

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

在启动时我看到以下错误:

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

提前致谢。

docker 撰写文件:

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

糟糕,我在 docker 撰写文件中定义了 MESOS_MASTER 而不是 marathon master。

MARATHON_MASTER: zk://127.0.0.1:2181/mesos