Skip to content

Instantly share code, notes, and snippets.

@ardyantohermawan
Last active July 4, 2017 10:07
Show Gist options
  • Save ardyantohermawan/488d391018b2fbcf0760ba5e39ba33d8 to your computer and use it in GitHub Desktop.
Save ardyantohermawan/488d391018b2fbcf0760ba5e39ba33d8 to your computer and use it in GitHub Desktop.
Setting mesos-slave
#!/bin/bash
# install java 8
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get -y update
sudo apt-get install -y openjdk-8-jdk
# install zookeper, mesos, marathon, chronos
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E56151BF
DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
CODENAME=$(lsb_release -cs)
# Add the repository
echo "deb http://repos.mesosphere.com/${DISTRO} ${CODENAME} main" | \
sudo tee /etc/apt/sources.list.d/mesosphere.list
sudo apt-get -y update
sudo apt-get -y install mesosphere
# set zookeeper addresses (comma separated) to mesos
sudo sh -c "echo zk://192.168.200.60:2181/mesos > /etc/mesos/zk"
# set ip
sudo sh -c "echo 192.168.200.100 > /etc/mesos-master/ip"
# set hostname
sudo sh -c "echo 192.168.200.100 > /etc/mesos-master/hostname"
# disable zookeeper
sudo service zookeeper stop
sudo sh -c "echo manual > /etc/init/zookeeper.override"
# disable mesos-master
sudo service mesos-master stop
sudo sh -c "echo manual > /etc/init/mesos-master.override"
# disable chronos
sudo service chronos stop
sudo sh -c "echo manual > /etc/init/chronos.override"
# disable marathon
sudo service marathon stop
sudo sh -c "echo manual > /etc/init/marathon.override"
#enable docker container
sudo echo 'docker,mesos' | sudo tee /etc/mesos-slave/containerizers
# restart mesos-slave
sudo service mesos-slave restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment