Mesos cluster with Marathon running Docker


So for hosting docker in large scale i have tested mesos cluster.  Here is a guide for setting up 3 nodes in mesos running Centos 7. And the adding Marathon to controll the dockers running.

The network



The node also have on nic connect to the network with internet access.



For this guide stop iptables and turn selinux off

setenforce 0
systemect stop firewalld


Install deps on ALL nodes

sudo wget -O /etc/yum.repos.d/epel-apache-maven.repo



sudo yum groupinstall -y "Development Tools"
sudo yum install -y tar wget apache-maven python-devel java-1.8.0-openjdk-devel zlib-devel libcurl-devel openssl-devel cyrus-sasl-devel cyrus-sasl-md5 apr-devel subversion-devel apr-util-devel


Verify that you are running java 1.8 maven want 1.7 but marathon wants 1.8

alternatives --config java


[root@node1 mathem]# java -version
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)
[root@node1 mathem]#


Install docker


curl -sSL | sh
systemctl restart docker
systemctl enable docker

Building mesos

cd /opt
tar zxvf mesos-0.25.0.tar.gz
cd mesos-0.25.0
mkdir build
cd build/
make check
make install


Install Marthan to control docker

On master

cd opt
curl -O
tar zxvf marathon-0.11.1.tgz


Now we have all the stuff ready and here are the startup scrips



echo "Starting zookepper"
/opt/mesos-0.25.0/build/3rdparty/zookeeper-3.4.5/bin/ stop
/opt/mesos-0.25.0/build/3rdparty/zookeeper-3.4.5/bin/ start
echo "Starting mesos server"
/usr/local/sbin/mesos-master --zk=zk:// --work_dir=/var/lib/mesos --quorum=1 &
#echo "Start mesos Slave"
#/usr/local/sbin/mesos-slave --master=zk:// &
echo "Start marathon"
/opt/marathon-0.11.1/bin/start --master zk:// --zk zk://



/opt/mesos-0.25.0/build/bin/ --master= --containerizers=docker,mesos --executor_registration_timeout=5mins


Now you should have a cluster up and running verify the mesos cluster


http://{IP-TO-MASTER}:5050/#/ to se that your mesos cluster is working

Skärmbild från 2015-12-11 20-42-55

http://{IP-TO-MASTER}:8080/ui/ this is your marathon to deploy docker images from


Skärmbild från 2015-12-11 20-43-26 Skärmbild från 2015-12-11 20-43-08



Leave a Reply

%d bloggers like this: