Skip to content

Instantly share code, notes, and snippets.

@diegopacheco
Last active May 30, 2022 15:42
Show Gist options
  • Save diegopacheco/8539fbc872b73c653f29c69d0287f36a to your computer and use it in GitHub Desktop.
Save diegopacheco/8539fbc872b73c653f29c69d0287f36a to your computer and use it in GitHub Desktop.
How to Install Mesos / Chronos on Ubuntu Linux 16.04 LTS?
#
# Install Java 8
#
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz"
tar -xzvf jdk-8u45-linux-x64.tar.gz
rm -rf jdk-8u45-linux-x64.tar.gz

#
# Install Maven 3
#
wget http://supergsego.com/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
tar -xzvf apache-maven-3.3.9-bin.tar.gz
rm -rf apache-maven-3.3.9-bin.tar.gz
sudo vim ~/.bashrc
  export M2_HOME=~/apache-maven-3.3.9
  export PATH=$PATH:$M2_HOME/bin
source ~/.bashrc
mvn -version

#
# Install Zookeper
#
wget http://ftp.unicamp.br/pub/apache/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar.gz
tar -xzvf zookeeper-3.4.9.tar.gz
rm -rf zookeeper-3.4.9.tar.gz
cd zookeeper-3.4.9/
cp zoo_sample.cfg  zoo.cfg

#
# Run Zookeper
#
cd zookeeper-3.4.9/
sudo -E bin/zkServer.sh start

#
# Install Mesos
#
sudo apt-get install -y autoconf libtool libcurl4-nss-dev libsasl2-dev libsasl2-modules libapr1-dev libsvn-dev
sudo wget https://bitbucket.org/pypa/setuptools/raw/0.7.8/ez_setup.py -O - | sudo python
wget http://www.apache.org/dist/mesos/0.28.2/mesos-0.28.2.tar.gz
tar -xzvf mesos-0.28.2.tar.gz
rm -rf mesos-0.28.2.tar.gz
cd mesos-0.28.2/
mkdir build
cd build
../configure
make
make install

#
# Run Mesos
#
sudo -E ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
# GOTO http://127.0.0.1:5050

# ./src/examples/java/test-framework 127.0.0.1:5050
# ./bin/mesos-agent.sh --master=127.0.0.1:5050 --work_dir=/var/lib/mesos

#
# Install Chronos
#
export MESOS_NATIVE_LIBRARY=/usr/local/lib/libmesos.so
git clone https://github.com/mesos/chronos.git
cd chronos
mvn package -DskipTests

#
# Run Chronos
#
java -cp target/chronos*.jar org.apache.mesos.chronos.scheduler.Main --master zk://localhost:2181/mesos --zk_hosts localhost:2181
# GOTO: http://localhost:8080/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment