Skip to main content

mesos安装

通过镜像安装

mesosphere/mesos-master

mesosphere/mesos-slave

Launch Exhibitor (Zookeeper)

Exhibitor Configuration Reference

docker run -d --net=host netflixoss/exhibitor:1.5.2

Launch Mesos-Master

Master Configuration Reference

docker run -d --net=host \ -e MESOS_PORT=5050 \ -e MESOS_ZK=zk://127.0.0.1:2181/mesos \ -e MESOS_QUORUM=1 \ -e MESOS_REGISTRY=in_memory \ -e MESOS_LOG_DIR=/var/log/mesos \ -e MESOS_WORK_DIR=/var/tmp/mesos \ -v "$(pwd)/log/mesos:/var/log/mesos" \ -v "$(pwd)/tmp/mesos:/var/tmp/mesos" \ mesosphere/mesos-master:1.4.1

MESOS_QUORUM 值的设置是N/2+1 只有1个mesos_master是1 如果有3个节点就是2

Launch Mesos-Slave

Slave Configuration Reference

docker run -d --net=host --privileged \ -e MESOS_PORT=5051 \ -e MESOS_MASTER=zk://127.0.0.1:2181/mesos \ -e MESOS_SWITCH_USER=0 \ -e MESOS_CONTAINERIZERS=docker,mesos \ -e MESOS_LOG_DIR=/var/log/mesos \ -e MESOS_WORK_DIR=/var/tmp/mesos \ -v "$(pwd)/log/mesos:/var/log/mesos" \ -v "$(pwd)/tmp/mesos:/var/tmp/mesos" \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /cgroup:/cgroup \ -v /sys:/sys \ -v /usr/local/bin/docker:/usr/local/bin/docker \ mesosphere/mesos-slave:0.28.0-2.0.16.ubuntu1404