You did not indicate the errors that you experienced.
This is the documentation for the image used:
Mesos Docker database using Mesosphere packages from https://mesosphere.io/downloads/ . Do not run Mesos, please use the Meso-Master and Meso-Slave Dockers.
What really bothered me about these images was that they were unreliable and no source was immediately available.
So, I created your example again using gisub mesosphere as inspiration:
Updated example
Example updated to include chronos infrastructure
├── build.sh ├── fig.yml ├── mesos │ └── Dockerfile ├── mesos-chronos │ └── Dockerfile ├── mesos-master │ └── Dockerfile └── mesos-slave └── Dockerfile
Create a base image (only need to be done once)
./build.sh
Run fig to start an instance of each service:
$ fig up -d Creating mesos_zk_1... Creating mesos_master_1... Creating mesos_slave_1... Creating mesos_chronos_1...
One useful thing about figs is that you can scale slaves
$ fig scale slave=5 Starting mesos_slave_2... Starting mesos_slave_3... Starting mesos_slave_4... Starting mesos_slave_5...
The mesos master console should display 5 slave hosts
http://localhost:15050/
And the chronos infrastructure needs to be up and running to start tasks
http:
fig.yml
zk: image: mesos command: /usr/share/zookeeper/bin/zkServer.sh start-foreground master: build: mesos-master ports: - "15050:5050" links: - "zk:zookeeper" slave: build: mesos-slave links: - "zk:zookeeper" chronos: build: mesos-chronos ports: - "14400:4400" links: - "zk:zookeeper"
Notes:
- For this example, only one zookeeper instance is needed.
build.sh
docker build --rm=true --tag=mesos mesos
Mesos / dockerfile
FROM ubuntu:14.04 MAINTAINER Mark O'Connor <mark@myspotontheweb.com> RUN echo "deb http://repos.mesosphere.io/ubuntu/ trusty main" > /etc/apt/sources.list.d/mesosphere.list RUN apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF RUN apt-get -y update RUN apt-get -y install mesos marathon chronos
Mesos Wizard / Dockerfile
FROM mesos MAINTAINER Mark O'Connor <mark@myspotontheweb.com> EXPOSE 5050 CMD ["--zk=zk://zookeeper:2181/mesos", "--work_dir=/var/lib/mesos", "--quorum=1"] ENTRYPOINT ["mesos-master"]
Mesos Slave / Dockerfile
FROM mesos MAINTAINER Mark O'Connor <mark@myspotontheweb.com> CMD ["--master=zk://zookeeper:2181/mesos"] ENTRYPOINT ["mesos-slave"]
Mesos-Chronos / Dockerfile
FROM mesos MAINTAINER Mark O'Connor <mark@myspotontheweb.com> RUN echo "zk://zookeeper:2181/mesos" > /etc/mesos/zk EXPOSE 4400 CMD ["chronos"]
Notes:
- The chronos command line is configured using files.