Running Mesos 0.13 on Ubuntu 12.04
By Prabeesh Keezhathra
- 2 minutes read - 328 wordsApache Mesos is a cluster manager that abstracts CPU, memory, and storage across machines so frameworks (like Spark, Marathon, or Chronos) can run workloads without worrying about which physical node they land on. This post covers installing 0.13 on Ubuntu 12.04 and bringing up a minimal master + slave cluster.
Prerequisites
Install the build dependencies and make sure Java is available:
$ sudo apt-get install python2.7-dev g++ libcppunit-dev libunwind7-dev git libcurl4-nss-dev
You need to have Java installed, or the JAVA_HOME environment variable pointing to a Java installation.
You can download the Mesos distribution from official website. After that untar the downloaded file
$ tar xvf mesos-0.13.0.tar.gz
Building and Installing
$ cd mesos-0.13.0
$ mkdir build
$ cd build
$ sudo ../configure --prefix=/home/user/mesos
$ sudo make
$ sudo make check
$ sudo make install
You can pass the –prefix option while configuring to tell where to install. For example
, pass --prefix=/home/user/mesos. By default the prefix is /usr/local.
Once you are done with the installation, it is now time to start your mesos cluster:
Go into the directory where you built Mesos.
$ cd mesos-0.13.0/build/bin
Run the command to launch the master.
$ sh mesos-master.sh
Take note of the IP and port that the master is running on, which will look something like [IP of the machine]:5050.
URL of master: mesos://[IP of the machine]:5050. View the master’s web UI at http://[IP of the machine]:5050.
Copy mesos-0.13.0 and mesos to the same paths on all the nodes in the cluster. To launch a slave, go to below directory
$ cd mesos-0.13.0/build/src
Run the command to launch the slave.
$ sh mesos-slave --master=[IP of the mesos master machine ]:5050
The slave will show up on the mesos master’s web UI.
Mesos Client
Copy the libmesos.so from prefix folder(/home/user/mesos/lib) of the mesos master to /usr/local/lib of the client machine and install the following package
$ sudo apt-get install libunwind7-dev
Now you can run applications against the Mesos cluster from the client machine.