You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@toree.apache.org by ma...@apache.org on 2016/11/07 14:29:36 UTC

[13/15] incubator-toree git commit: Simplified Makefile for system-test task

Simplified Makefile for system-test task


Project: http://git-wip-us.apache.org/repos/asf/incubator-toree/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-toree/commit/9ccf1784
Tree: http://git-wip-us.apache.org/repos/asf/incubator-toree/tree/9ccf1784
Diff: http://git-wip-us.apache.org/repos/asf/incubator-toree/diff/9ccf1784

Branch: refs/heads/master
Commit: 9ccf1784e1c6dc0eda8c9e3ec44c32ef12fb6b8d
Parents: bb4bf47
Author: Marius van Niekerk <ma...@gmail.com>
Authored: Wed Nov 2 00:22:24 2016 -0400
Committer: Marius van Niekerk <ma...@gmail.com>
Committed: Wed Nov 2 00:22:24 2016 -0400

----------------------------------------------------------------------
 Dockerfile.system-test | 50 +++++++++++++++++++++++++++++++++++++++++++++
 Makefile               | 27 ++----------------------
 2 files changed, 52 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/9ccf1784/Dockerfile.system-test
----------------------------------------------------------------------
diff --git a/Dockerfile.system-test b/Dockerfile.system-test
new file mode 100644
index 0000000..85426bf
--- /dev/null
+++ b/Dockerfile.system-test
@@ -0,0 +1,50 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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
+#
+# This is a dockerfile used to construct the spark environment used for the 
+# integration test suite.
+
+FROM jupyter/all-spark-notebook:07a7c4d6d447
+
+# User escalation
+USER root
+
+# Spark dependencies
+ENV APACHE_SPARK_VERSION 2.0.0
+
+# Temporarily add jessie backports to get openjdk 8, but then remove that source
+RUN echo 'deb http://ftp.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/jessie-backports.list && \
+    apt-get -y update && \
+    apt-get install -y --no-install-recommends openjdk-8-jre-headless && \
+    rm /etc/apt/sources.list.d/jessie-backports.list && \
+    apt-get clean && \
+    rm -rf /var/lib/apt/lists/* && \
+    rm -rf /var/lib/apt/lists/* && \
+    update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
+
+
+# Installing Spark2
+RUN cd /tmp && \
+        wget -q http://d3kbcqa49mib13.cloudfront.net/spark-${APACHE_SPARK_VERSION}-bin-hadoop2.6.tgz && \
+        echo "e17d9da4b3ac463ea3ce42289f2a71cefb479d154b1ffd00310c7d7ab207aa2c *spark-${APACHE_SPARK_VERSION}-bin-hadoop2.6.tgz" | sha256sum -c - && \
+        tar xzf spark-${APACHE_SPARK_VERSION}-bin-hadoop2.6.tgz -C /usr/local && \
+        rm spark-${APACHE_SPARK_VERSION}-bin-hadoop2.6.tgz
+
+# Overwrite symlink
+RUN cd /usr/local && \
+    rm spark && \
+    ln -s spark-${APACHE_SPARK_VERSION}-bin-hadoop2.6 spark
+

http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/9ccf1784/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index 85aed4d..79d3440 100644
--- a/Makefile
+++ b/Makefile
@@ -90,31 +90,8 @@ clean: clean-dist
 	touch $@
 
 .system-test-image:
-	@-docker rm -f system_test_image
-	@docker run -t --user root --name system_test_image \
-		$(IMAGE) bash -c "cd /tmp && \
-			wget http://apache.claz.org/spark/spark-$(APACHE_SPARK_VERSION)/spark-$(APACHE_SPARK_VERSION)-bin-hadoop2.6.tgz && \
-			tar xzf spark-$(APACHE_SPARK_VERSION)-bin-hadoop2.6.tgz -C /usr/local && \
-			rm spark-$(APACHE_SPARK_VERSION)-bin-hadoop2.6.tgz && \
-			cd /usr/local && \
-			rm spark && \
-			ln -s spark-$(APACHE_SPARK_VERSION)-bin-hadoop2.6 spark && \
-			echo /usr/local/spark/RELEASE && \
-			\
-			echo \"===> add webupd8 repository...\"	&& \
-			echo \"deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main\" | tee /etc/apt/sources.list.d/webupd8team-java.list	&& \
-			echo \"deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main\" | tee -a /etc/apt/sources.list.d/webupd8team-java.list	&& \
-			apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886	&& \
-			apt-get update && \
-			\
-			echo \"===> install Java\"	&& \
-			echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections	&& \
-			echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections	&& \
-			DEBIAN_FRONTEND=noninteractive	apt-get install -y --force-yes oracle-java8-installer oracle-java8-set-default && \
-			apt-get clean && \
-			update-java-alternatives -s java-8-oracle"
-	@docker commit system_test_image $(SYSTEM_TEST_IMAGE)
-	@-docker rm -f system_test_image
+	@-docker rm -f $(SYSTEM_TEST_IMAGE)
+	@docker build -t $(SYSTEM_TEST_IMAGE) -f Dockerfile.system-test .
 	touch $@
 
 .binder-image: