Installing Mesos and Marathon on Ubuntu

11/23/2013

Mesos is a distributed task framework. Marathon runs long-running tasks on Mesos. Here’s how you can install the latest versions.

#### Dependencies: Java & Zookeeper
sudo apt-get install -y default-jdk zookeeper-bin zookeeperd
#### Install Mesos
ubuntu_version="12.04"
curl -fL "http://downloads.mesosphere.io/master/ubuntu/${ubuntu_version}/mesos_0.14.2_amd64.deb" --output mesos.deb
sudo dpkg -i mesos.deb
rm mesos.deb
#### Install Marathon
sudo mkdir -p /opt/marathon
sudo curl -fL "http://downloads.mesosphere.io/maven/mesosphere/marathon/0.2.1/marathon-0.2.1-jar-with-dependencies.jar" --output /opt/marathon/marathon.jar
sudo chmod ug+rx /opt/marathon/marathon.jar
sudo curl -fL "http://downloads.mesosphere.io/marathon/marathon.conf" --output /etc/init/marathon.conf

You should be able to start all services at this point either by rebooting or manually:

sudo initctl reload-configuration
sudo start zookeeper
sudo start mesos-master
sudo start mesos-slave
sudo start marathon

If it worked you’ll be able to load the marathon administration page at http://localhost:8080/.

I ran into a problem where I was getting the error messages mesos-master: error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory and java.lang.UnsatisfiedLinkError: no mesos in java.library.path. I had installed OpenJDK via the package openjdk-7-jdk. Installing default-jdk fixes this by symlinking libjvm.so in /usr/lib.

Be Sociable, Share!