Thursday, March 13, 2014

Mesos on Ubuntu 13.10 Part 1

This is my experiment to get mesos setup on Ubuntu.  Think of mesos as an layer running on top of your native OS that manages the machine's resources.  You can then request and allocate resources as needed.  This is just a blog post where I went through the steps and got master setup to run on an Ubuntu Server.

Install instructions come from:  http://mesos.apache.org/gettingstarted/

Install Dependencies.


sudo apt-get update
sudo apt-get install build-essential openjdk-7-jdk python-dev python-boto libcurl4-nss-dev libsasl2-dev autoconf libtool 

Build Mesos

    # Change working directory.
    $ cd mesos

    # Bootstrap (***Skip this if you are not building from git repo***).
    $ ./bootstrap

    # Configure and build.
    $ mkdir build
    $ cd build
    $ ../configure
    $ make -j

    # Run test suite.
    $ make -j check

    # Install (***Optional***).
    $ make install

Examples

 
# Change into build directory.
 $ cd build

 # Start mesos master.
 $ ./bin/mesos-master.sh --ip=127.0.0.1

 # Start mesos slave.
 $ ./bin/mesos-slave.sh --master=127.0.0.1:5050

 # Visit the mesos web page.
 $ http://127.0.0.1:5050

 # Run C++ framework (***Exits after successfully running some tasks.***).
 $ ./src/test-framework --master=127.0.0.1:5050

 # Run Java framework (***Exits after successfully running some tasks.***).
 $ ./src/examples/java/test-framework 127.0.0.1:5050

 # Run Python framework (***Exits after successfully running some tasks.***).
 $ ./src/examples/python/test-framework 127.0.0.1:5050