Skip to content

Instantly share code, notes, and snippets.

@xiaods
Forked from mitchwongho/mesos-docker
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiaods/07e7f6b260858c57d123 to your computer and use it in GitHub Desktop.
Save xiaods/07e7f6b260858c57d123 to your computer and use it in GitHub Desktop.
# ZooKeeper
$ sudo docker run --net=host jplock/zookeeper:3.4.6
#Mesos-Master
## It's important to specify --ip=<ip> and --hostname=<ip> parameters
$ sudo docker run --net=host mesosphere/mesos-master:0.21.0-1.0.ubuntu1404 --ip=10.42.0.1 --hostname=10.42.0.1 --zk=zk://10.42.0.1:2181/mesos --work_dir=/opt/ --quorum=1
#Mesosphere-Marathon
$ sudo docker run --net=host mesosphere/marathon:v0.7.5 --master zk://10.42.0.1:2181/mesos --http_port 8090
#Mesos-Slave
## This 'slave' runs on the same node as the 'master' (10.42.0.1)
$ sudo docker run --net=host mesosphere/mesos-slave:0.21.0-1.0.ubuntu1404 --ip=10.42.0.1 --hostname=10.42.0.1 --master=zk://10.42.0.1:2181/mesos --port=5051 --containerizers=docker,mesos
## Notice that these slaves can run on a different nodes (10.42.0.5 + 10.0.2.15)
$ sudo docker run --net=host mesosphere/mesos-slave:0.21.0-1.0.ubuntu1404 --ip=10.42.0.5 --hostname=10.42.0.5 --master=zk://10.42.0.1:2181/mesos --port=5052 --containerizers=docker,mesos
$ sudo docker run --net=host mesosphere/mesos-slave:0.21.0-1.0.ubuntu1404 --ip=10.0.2.15 --hostname=10.0.2.15 --master=zk://10.42.0.1:2181/mesos --port=5053 --containerizers=docker,mesos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment