felixcheung closed pull request #3279: [ZEPPELIN-3932] spark_mesos Dockerfile 
should be updated
URL: https://github.com/apache/zeppelin/pull/3279
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile 
b/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile
index 0afda575c1..0eb26ca5e8 100644
--- a/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile
+++ b/scripts/docker/spark-cluster-managers/spark_mesos/Dockerfile
@@ -12,10 +12,10 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-FROM centos:centos6
+FROM centos:centos7
 
-ENV SPARK_PROFILE 2.1
-ENV SPARK_VERSION 2.1.2
+ENV SPARK_PROFILE 2.4
+ENV SPARK_VERSION 2.4.0
 ENV HADOOP_PROFILE 2.7
 ENV HADOOP_VERSION 2.7.0
 
@@ -29,15 +29,15 @@ tar \
 curl \
 svn \
 cyrus-sasl-md5 \
-libevent2-devel \
+libevent-devel \
 && \
 yum clean all
 
 # Remove old jdk
 RUN yum remove java; yum remove jdk
 
-# install jdk7
-RUN yum install -y java-1.7.0-openjdk-devel
+# install jdk8
+RUN yum install -y java-1.8.0-openjdk-devel
 ENV JAVA_HOME /usr/lib/jvm/java
 ENV PATH $PATH:$JAVA_HOME/bin
 
@@ -45,14 +45,9 @@ ENV PATH $PATH:$JAVA_HOME/bin
 RUN curl -s 
http://www.apache.org/dist/spark/spark-$SPARK_VERSION/spark-$SPARK_VERSION-bin-hadoop$HADOOP_PROFILE.tgz
 | tar -xz -C /usr/local/
 RUN cd /usr/local && ln -s spark-$SPARK_VERSION-bin-hadoop$HADOOP_PROFILE spark
 
-# update boot script
-COPY entrypoint.sh /etc/entrypoint.sh
-RUN chown root.root /etc/entrypoint.sh
-RUN chmod 700 /etc/entrypoint.sh
-
 # install mesos
-RUN wget 
http://repos.mesosphere.com/el/6/x86_64/RPMS/mesos-1.0.0-2.0.89.centos65.x86_64.rpm
-RUN rpm -Uvh mesos-1.0.0-2.0.89.centos65.x86_64.rpm
+RUN wget 
http://repos.mesosphere.com/el/7/x86_64/RPMS/mesos-1.7.0-2.0.1.el7.x86_64.rpm
+RUN rpm -Uvh mesos-1.7.0-2.0.1.el7.x86_64.rpm
 
 #spark
 EXPOSE 8080 7077 7072 8081 8082
@@ -60,4 +55,9 @@ EXPOSE 8080 7077 7072 8081 8082
 #mesos
 EXPOSE 5050 5051
 
+# update boot script
+COPY entrypoint.sh /etc/entrypoint.sh
+RUN chown root.root /etc/entrypoint.sh
+RUN chmod 700 /etc/entrypoint.sh
+
 ENTRYPOINT ["/etc/entrypoint.sh"]
diff --git a/scripts/docker/spark-cluster-managers/spark_mesos/entrypoint.sh 
b/scripts/docker/spark-cluster-managers/spark_mesos/entrypoint.sh
index 28d76bf9a1..2f9572bbbb 100755
--- a/scripts/docker/spark-cluster-managers/spark_mesos/entrypoint.sh
+++ b/scripts/docker/spark-cluster-managers/spark_mesos/entrypoint.sh
@@ -20,6 +20,8 @@ export SPARK_MASTER_WEBUI_PORT=8080
 export SPARK_WORKER_PORT=8888
 export SPARK_WORKER_WEBUI_PORT=8081
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JAVA_HOME/jre/lib/amd64/server/
+export MASTER=mesos://127.0.1.1:5050
+export MESOS_NATIVE_JAVA_LIBRARY=/usr/lib/libmesos.so
 
 # spark configuration
 cp $SPARK_HOME/conf/spark-env.sh.template $SPARK_HOME/conf/spark-env.sh
@@ -35,7 +37,7 @@ cd $SPARK_HOME/sbin
 ./start-slave.sh spark://`hostname`:$SPARK_MASTER_PORT
 
 # start mesos
-mesos-master --ip=0.0.0.0 --work_dir=/var/lib/mesos &> 
/var/log/mesos_master.log &
+mesos-master --ip=0.0.0.0 --work_dir=/var/lib/mesos --hostname=`hostname -I | 
cut -d' ' -f1` &> /var/log/mesos_master.log &
 mesos-slave --master=0.0.0.0:5050 --work_dir=/var/lib/mesos --launcher=posix 
&> /var/log/mesos_slave.log &
 
 CMD=${1:-"exit 0"}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to