Ever since the VMware Photon Technical Preview was made available, I have wanted to install Apache Mesos on a node. The Photon OS is a very minimal Linux installation and so my initial attempts to work through the process led me down the old-fashioned rabbit hole of manually compiling packages. It was very reminiscent of the later 1990’s and using Debian installed via floppy disk. I finally found the time to work my way down and back out of the rabbit hole and have been able to successfully get Mesos to install and run on Photon! This is a good first step towards building a Photon template to be used inside Big Data Extensions for deploying Cloud Native Apps with Mesos|Marathon|Chronos or Kubernetes.
The lab environment I used is running vSphere 5.5 and consists of a small set of nested ESXi hypervisors. I am not going to cover install Photon on a VM, but just be sure you have one that was installed with the full OS — not the minimal installation. After the Photon VM is configured to communicate with the Internet, you can follow these instructions to get Apache Mesos installed. The end result of the guide will be a working Mesos node running on Photon that can launch Docker containers.
Be sure to follow it in the order listed as the ordering of the packages is important. Also have a Photon VM with at least 3GB of Memory allocated to it for the compile processes.
Missing prerequisites APR Library # wget http://apache.claz.org//apr/apr-1.5.2.tar.gz # tar zxvf apr-1.5.2.tar.gz # cd apr-1.5.2 # ./configure —prefix=/usr/local/lib/apr # make # make test # make install APR-UTIL Library # wget http://apache.claz.org//apr/apr-util-1.5.4.tar.gz # tar zxvf apr-util-1.5.4.tar.gz # cd apr-util-1.5.4 # ./configure —prefix=/usr/local/lib/apr —with-apr=/usr/local/lib/apr # make # make install Subversion # wget http://apache.osuosl.org/subversion/subversion-1.8.13.tar.gz # tar zxvf subversion-1.8.13.tar.gz # cd subversion-1.8.13 # ./configure —prefix=/usr/local/lib/subversion —with-apr=/usr/local/lib/apr —with-apr-util=/usr/local/lib/apr # make # make install OpenJDK Java Download the Java JDK source tarball from the Oracle website (http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz) # tar zxvf jdk-7u79-linux-x64.tar.gz # mv jdk1.7.0_79 /usr/local/java # echo JAVA_HOME=/usr/local/java >> /etc/environment # source /etc/environment Apache Maven Library # wget http://apache.mirrors.ionfish.org//ant/binaries/apache-ant-1.9.5-bin.tar.gz # tar zxvf apache-ant-1.9.5-bin.tar.gz # mv apache-ant-1.9.5 /usr/local # ln -s /usr/local/apache-ant-1.9.5 /usr/local/apache-ant # wget http://apache.cs.utah.edu/maven/maven-3/3.3.3/source/apache-maven-3.3.3-src.tar.gz # tar zxvf apache-maven-3.3.3-src.tar.gz # cd apache-maven-3.3.3 # /usr/local/apache-ant/bin/ant -Dmaven.home=“/usr/local/maven-3.3.3" # echo MAVEN_HOME=/usr/local/maven-3.3.3 >> /etc/environment # export /etc/environment Install Apache Mesos # wget http://www.apache.org/dist/mesos/0.22.1/mesos-0.22.1.tar.gz # tar zxvf mesos-0.22.1.tar.gz # cd mesos-0.22.1 # mkdir build # cd build # ../configure --prefix=/usr/local/mesos —with-apr=/usr/local/lib/apr —with-svn=/usr/local/lib/subversion # make # make check # make install
# /usr/local/mesos/bin/mesos-master.sh —ip=127.0.0.1 —work_dir=/var/lib/mesos # /usr/local/mesos/bin/mesos-slave.sh —master=127.0.0.1:5050