Mesos Installation in CentOS 7.0

facebooktwittergoogle_plusredditpinterestlinkedinmail

This post will walk through setting up a cluster which includes Apache Mesos.

Highly-available clusters will typically have multiple master nodes and any number of slave nodes. Each master node runs Apache Mesos and ZooKeeper (to provide leader election). Running three ZooKeeper nodes will allow one to fail and for the service to still be available (see ZooKeeper reliability for more information). We recommend running at least three master nodes for a highly-available configuration. Run the steps below on each master node.

Master Node Setup:

The easiest way to install Mesos is via the GitHub repositories. Alternatively, you can download the latest deb or rpm directly from the Mesosphere downloads page and install it manually.

Mesosphere has official package repositories which connect directly to the native package management tools of your favorite Linux distribution — namely apt-get and yum — to install Mesos on top of the most common Linux distributions (RedHat, CentOS, Ubuntu and Debian).

Step 1: Install mesos and zookeeper in master machines:

# Add the repository

$sudo rpm -Uvh http://repos.mesosphere.io/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm
$sudo yum -y install mesos marathon
$sudo yum -y install mesosphere-zookeeper

Step 2: Configuration
ZooKeeper

Set /var/lib/zookeeper/myid to a unique integer between 1 and 255 on each node.

$sudo nano /var/lib/zookeeper/myid
#set 1

 

Start Zookeeper

$sudo systemctl start zookeeper

 

Step 3: Set mesos master  address in mesos zookeeper setting:

On each node, replacing the IP addresses below with each master’s IP address, set/etc/mesos/zk to:

$sudo nano /etc/mesos/zk
zk://1.1.1.1:2181,2.2.2.2:2181,3.3.3.3:2181/mesos

Step 4: Disable mesos-slave service on each master servers.

$sudo systemctl stop mesos-slave.service
$sudo systemctl disable mesos-slave.service

Step 5:  Restart all the master node using following cmd.

$sudo systemctl restart mesos-master

 

Master Slave Setup:

Step 6: Install mesos in all other nodes:  Repeat step 1, add the repository

sudo rpm -Uvh http://repos.mesosphere.io/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm
sudo yum -y install mesos

Step 7:  On each node, replacing the IP addresses below with each master’s IP address, set /etc/mesos/zk to: zk://1.1.1.1:2181,2.2.2.2:2181,3.3.3.3:2181/mesos

sudo nano /etc/mesos/zk
zk://1.1.1.1:2181,2.2.2.2:2181,3.3.3.3:2181/mesos

Step 8: Disable mesos-master on each slave nodes:

sudo systemctl stop mesos-master.service
sudo systemctl disable mesos-master.service

Step 9: Restart all the slave nodes

sudo systemctl restart mesos-slave

 

Verifying Installation

If the packages were installed and configured correctly, you should be able to access the Mesos console at http://<master-ip>:5050

For example access Mesos through web interface:

http://1.1.1.1:5050

Summary

In this first post of a series detailing the expansion of a Mesos environment for multi-node.

 

References:

[1] http://open.mesosphere.com/getting-started/datacenter/install/

[2] http://frankhinek.com/setup-mesos-multi-node-cluster-on-ubuntu/

facebooktwittergoogle_plusredditpinterestlinkedinmail

2 thoughts on “Mesos Installation in CentOS 7.0

  1. You are so interesting! I do not suppose I’ve truly read anything like this before.
    So good to discover somebody with unique thoughts
    on this subject. Really.. thanks for starting this up.
    This website is something that is required on the web, someone with
    a little originality!

Leave a Reply

Your email address will not be published. Required fields are marked *