DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Comparative Analysis of Open Source Cluster Management Systems: Kubernetes vs. Apache Mesos
  • Introduction to Container Orchestration

Trending

  • From APIs to Actions: Rethinking Back-End Design for Agents
  • Implementing the Planning Pattern With Java Enterprise and LangChain4j
  • Native SQL in Java Without JDBC Boilerplate — Meet Ujorm3
  • Why Requirements Are Becoming the Control Layer in AI-Assisted Development

Getting Started With Apache Mesos

Learn how to install Apache Mesos and monitor it by downloading the Mesos TAR file, running Mesos, and starting the slave.

By 
Mahesh Chand user avatar
Mahesh Chand
·
Jan. 30, 18 · Tutorial
Likes (4)
Comment
Save
Tweet
Share
13.8K Views

Join the DZone community and get the full member experience.

Join For Free

In our earlier article, Introduction to Apache Mesos, we talked about the basic idea of Mesos, how it works, and its basic terminology. We have discussed the theoretical concepts to get ourselves familiar with Mesos, and now, we will install Mesos and see how we can monitor it using UI.

Step 1: Download the Mesos TAR File

Download the Mesos 1.4.0 release from here and untar it using the following command on your terminal, and then go to the directory containing our extracted Mesos.

tar -zxf mesos-1.4.0.tar.gz 

Use the following instructions to install the 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 the required packages and dependencies, the next step is to build Mesos.

Change the working directory:

$ cd mesos 

Configure and build:

$ mkdir build
$ cd build
$ ../configure
$ make

Run the test suite:

$ make check 

Install (optional):

$ make install 

It will take a little time to build Mesos. After building, Mesos is ready to use now.

Step 2: Run Mesos

To run Mesos, first, start the Mesos Master.

Change into the 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 

Step 3: Start the Slave

After starting the master, start the slave.

Start slave:

./bin/mesos-slave.sh –master=127.0.0.1:5050 –work_dir=/tmp/mesos

If facing permissions issues:

./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:

$ localhost:5050

Screenshot from 2017-10-08 11-15-04

Just for testing purposes, we have run C++ and the 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 the completed framework.

Screenshot from 2017-10-08 11-19-33

We are done with the basic installation of Mesos. I hope you liked this article and want to know more about the usage of Mesos, which we will explore more in future blogs.

Please feel free to leave suggestions or comments!

References

  • Mesos documentation
Apache Mesos

Published at DZone with permission of Mahesh Chand. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Comparative Analysis of Open Source Cluster Management Systems: Kubernetes vs. Apache Mesos
  • Introduction to Container Orchestration

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook