Build Mesos on Oracle Linux

Note) This is not a bible, but is just based on my own experience! Tried with Mesos 1.2.0 on Oracle Linux 6 and Oracle Linux 7.

If your system is behind proxy, make sure to add the proxy setting to

  • /etc/yum.conf
    • add “proxy=http://your.proxy.com:80
  • /etc/wgetrc
    • use_proxy=on
    • http_proxy=http://your.proxy.com:80
    • https_proxy=http://your.proxy.com:80
    • no_proxy=”*.your.host localhost”

Update the kernel to UEK4 if it not already.

  • uname -r
    3.8.12…..

    • Then, you need to upgrade kernel!
  • cd /etc/yum.repos.d
  • Edit public-yum-ol6.repo to enable ol6_UEKR4
  • Update kernel to UEK5
  • Reboot your machine

Install dependencies described in http://mesos.apache.org/gettingstarted/

  • Edit public-yum-ol6.repo to enable ol6_addon, ol6_software_collections
  • yum install -y apache-maven python-devel python-six python-virtualenv java-1.8.0-openjdk-devel zlib-devel libcurl-devel openssl-devel cyrus-sasl-devel cyrus-sasl-md5 apr-devel subversion-devel apr-util-devel
    • Make sure to check the latest list of packages to install from Mesos page.
    • “apache-maven” is not probably available. All others should be installed.
  • yum groupinstall -y “Development Tools”

In case of Oracle Linux 6, you probably need to install devtoolset-3 if gcc version is not higher than 4.8.x

  • gcc -dumpversion
    4.4.2
  • yum install devtoolset-3-gcc-c++

Install Maven if apache-maven has not been installed.

  • Download Maven 3.5.x or higher and unzip it.
  • Set the proxy setting in settings.xml if necessary

Download Mesos

  • wget http://archive.apache.org/dist/mesos/1.2.0/mesos-1.2.0.tar.gz
    • Or different version
  • tar xzvf mesos-1.2.0.tar.gz
  • cd mesos-1.2.0
  • mkdir build
  • cd build
  • export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
  • export http_proxy=http://your.proxy.com:port
  • export https_proxy=http://your.proxy.com:port
  • export MAVEN_HOME=/…./apache-maven-3.5.0
  • ../configure
    • If there is an error in finding libjvm.so, try a different openjdk home available in /usr/lib/jvm
  • make
    • This takes time.

Run Mesos master: Assuming that you have a zookeeper cluster of 3 VMs.

  • In case of Oracle Linux 6, you need to enable devtoolset-3
    • scl enable devtoolset-3
  • ./bin/mesos-master.sh –zk=zk://zookeeper1:2181,zookeeper2:2182,zookeeper3:2181/mesos –port=5050 –log_dir=/var/log/mesos –logging_level=WARNING –quorum=2 –work_dir=/var/lib/mesos –hostname=known_host_name_of_your_mesos_master –advertise_ip=xxx.xxx.xxx.xxx –cluster=$DISPLAY_NAME
    • hostname: give the host name of your mesos master machine
    • advertise_ip: A public IP of the host
    • cluster: A display name of this cluster
  • http://hostname:5050

Run Mesos agent

  • In case of Oracle Linux 6, you need to enable devtoolset-3
    • scl enable devtoolset-3
  • ./bin/mesos-slave.sh –master=zk://zookeeper1:2181,zookeeper2:2182,zookeeper3:2181/mesos –log_dir=/var/log/mesos –logging_level=WARNING –work_dir=/var/lib/mesos –advertise_ip=xxx.xxx.xxx.xxxx –containerizers=docker,mesos –executor_registration_timeout=10mins
    • advertise_ip: A public IP of the host
    • containerizers:  Give docker if your machien has a Docker installed.
  • Your agent must be found in the master’s “Agents” section.

Simple!

 

Leave a comment