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
I'm unable to start marathon & I get the blow. How do I resolve this?
root@vagrant:/home/vagrant# sudo service marathon start
root@vagrant:/home/vagrant# curl http://127.0.0.1:8080
curl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused