Skip to content

Instantly share code, notes, and snippets.

@kfrancoi
Created January 23, 2015 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kfrancoi/ee2920c28c7be6174054 to your computer and use it in GitHub Desktop.
Save kfrancoi/ee2920c28c7be6174054 to your computer and use it in GitHub Desktop.
Mesos Master Config
# Setup
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF
DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
CODENAME=$(lsb_release -cs)
# Add the repository
echo "deb http://repos.mesosphere.io/${DISTRO} ${CODENAME} main" | \
sudo tee /etc/apt/sources.list.d/mesosphere.list
sudo apt-get -y update
# Install Mesos and Marathon
# The Mesos package will automatically pull in the ZooKeeper package as a dependency.
sudo apt-get -y install mesos marathon
# Zookeeper
# =========
# 1) Set /etc/zookeeper/conf/myid to a unique integer between 1 and 255 on each node.
# 2) Append the following values to /etc/zookeeper/conf/zoo.cfg on each node, replacing the IP addresses with your own:
# server.1=1.1.1.1:2888:3888
# server.2=2.2.2.2:2888:3888
# server.3=3.3.3.3:2888:3888
# 3) Start Zookeeper
sudo service zookeeper restart
# 4) 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
# 5) Set /etc/mesos-master/quorum to "2"
# 6) If you're unable to resolve the hostname of the machine directly (e.g., if on a different network or using a VPN), set /etc/mesos-master/hostname to a value that you can resolve, for example, an externally accessible IP address or DNS hostname. This will ensure all links from the Mesos console work correctly.
# 7) Disable mesos-slave service
sudo service mesos-slave stop
sudo sh -c "echo manual > /etc/init/mesos-slave.override"
# 8) You need to bring each service up on the set of master nodes at roughly the same time. Bring up Mesos master:
sudo service mesos-master restart
# then restart marathon
sudo service marathon restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment