In our earlier blog Introduction to Mesos , we have talked about basic idea of Mesos. And How it works and its basic terminology.
Till now we have discussed the theoretical concepts to get ourselves familiar with Mesos and now we will be going to install the mesos and see how we can monitor mesos using UI, So let’s get onto it.
Step1: Download Mesos Tar File
Download the Mesos 1.4.0 release from here and untar it using the following command on your terminal, and then move to the directory containing our extracted Mesos.
tar -zxf mesos-1.4.0.tar.gz
Follow the following instructions to install required packages and other Mesos dependencies.
# Update the packages.
$ sudo apt-get update
# Install a few utility tools.
$ sudo apt-get install -y tar wget git
# Install the latest OpenJDK.
$ sudo apt-get install -y openjdk-8-jdk
# Install other Mesos dependencies.
$ sudo apt-get -y install build-essential python-dev python-six python-virtualenv libcurl4-nss-dev libsasl2-dev libsasl2-modules maven libapr1-dev libsvn-dev zlib1g-dev
After downloading Mesos and installing required packages and dependencies. Next step is to build Mesos.
# Change working directory.
$ cd mesos
# Configure and build.
$ mkdir build
$ cd build
# Run test suite.
$ make check
# Install (optional)
$ make install
It will take little time to build mesos. After building, mesos is ready to use now.
Step2: To run Mesos, first start the Mesos Master
# Change into build directory.
$ cd build
# Start Mesos master (ensure work directory exists and has proper permissions).
$ ./bin/mesos-master.sh –ip=127.0.0.1 –work_dir=/var/lib/mesos
Step3: After starting master, start slave
./bin/mesos-slave.sh –master=127.0.0.1:5050 –work_dir=/tmp/mesos
#If facing permission issue
./bin/mesos-slave.sh –master=127.0.0.1:5050 –work_dir=/tmp/mesos –no-systemd_enable_support
Mesos is running now, to monitor it visit the Mesos Webpage
Just for test purpose, we have run c++ and java framework.
$ cd build
# 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
We can see them in completed framework.
So, we are done with basic installation of Mesos. I hope you liked it and wanted to know more about usage of Mesos, which we will explore more in future blogs.
Please feel free to suggest or comment!