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 Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

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.

Mahesh Chand user avatar by
Mahesh Chand
·
Jan. 30, 18 · Tutorial
Like (4)
Save
Tweet
Share
12.84K 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, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Educating the Next Generation of Cloud Engineers With Google Cloud
  • Do Not Forget About Testing!
  • How To Convert HTML to PNG in Java
  • Mr. Over, the Engineer [Comic]

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: