These instructions are derived from those in the Mesos Community Documentation.
Do the below as root
.
cat <<EOF >> /etc/apt/sources.list.d/mesosphere.list
deb http://repos.mesosphere.com/ubuntu xenial main
EOF
apt update
apt-get -y install mesos marathon
cat <<EOF >> etc/zookeeper/conf/myid
1
EOF
cat <<EOF >> /etc/zookeeper/conf/zoo.cfg
server.1=`hostname`:2888:3888
EOF
cat <<EOF >> /etc/mesos/zk
zk://`hostname`:2181/mesos
EOF
cat <<EOF >> /etc/mesos-master/quorum
1
EOF
Configure Mesos to use the Mesos containerizer with docker image support.
cat <<EOF >> /etc/mesos-slave/containerizers
mesos
EOF
cat <<EOF >> /etc/mesos-slave/image_providers
docker
EOF
cat <<EOF >> /etc/mesos-slave/isolation
filesystem/linux,docker/runtime
EOF
Some frameworks expect the JAVA_HOME variable to be set (within their tasks). Adjust the Mesos agent's configuration:
cat <<EOF >> /etc/mesos-slave/executor_environment_variables
{
"JAVA_HOME": "/usr/lib/jvm/java-8-openjdk-amd64"
}
EOF
Start the services.
sudo service zookeeper restart
sudo service mesos-master restart
sudo service mesos-slave restart
Verify that Mesos is running normally.
MASTER=$(mesos-resolve `cat /etc/mesos/zk`)
mesos-execute --master=$MASTER --name="cluster-test" --command="sleep 5"
- Mesos:
http://localhost:5050
- Marathon:
http://localhost:8080
This is almost a good guide. From the top of my head, I had to install JDK 8 and set it as default, and you forget to start+enable marathon in your steps ;) Thanks!