diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-07-16 17:30:15 -0700 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-07-16 17:30:15 -0700 |
commit | 87d586e4da63e6e1875d9cac194c6f11e1cdc653 (patch) | |
tree | 3b2ed3203b6abb94a3a853a7b95dfebaa67665a1 /make-distribution.sh | |
parent | d733527bb4dad14b276b4f56b1ff5c3ee1cb7f75 (diff) | |
parent | 4ff494de20c36151dc29a60825d67e094d14acd4 (diff) | |
download | spark-87d586e4da63e6e1875d9cac194c6f11e1cdc653.tar.gz spark-87d586e4da63e6e1875d9cac194c6f11e1cdc653.tar.bz2 spark-87d586e4da63e6e1875d9cac194c6f11e1cdc653.zip |
Merge remote-tracking branch 'old/master'
Diffstat (limited to 'make-distribution.sh')
-rwxr-xr-x | make-distribution.sh | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/make-distribution.sh b/make-distribution.sh new file mode 100755 index 0000000000..0116215163 --- /dev/null +++ b/make-distribution.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +# +# 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. +# + +# +# Script to create a binary distribution for easy deploys of Spark. +# The distribution directory defaults to dist/ but can be overridden below. +# The distribution contains fat (assembly) jars that include the Scala library, +# so it is completely self contained. +# It does not contain source or *.class files. +# +# Recommended deploy/testing procedure (standalone mode): +# 1) Rsync / deploy the dist/ dir to one host +# 2) cd to deploy dir; ./bin/start-master.sh +# 3) Verify master is up by visiting web page, ie http://master-ip:8080. Note the spark:// URL. +# 4) ./bin/start-slave.sh 1 <<spark:// URL>> +# 5) MASTER="spark://my-master-ip:7077" ./spark-shell +# + +# Figure out where the Spark framework is installed +FWDIR="$(cd `dirname $0`; pwd)" +DISTDIR="$FWDIR/dist" + +# Get version from SBT +export TERM=dumb # Prevents color codes in SBT output +VERSION=$($FWDIR/sbt/sbt "show version" | tail -1 | cut -f 2) +echo "Making distribution for Spark $VERSION in $DISTDIR..." + +# Build fat JAR +$FWDIR/sbt/sbt "repl/assembly" + +# Make directories +rm -rf "$DISTDIR" +mkdir -p "$DISTDIR/jars" +echo "$VERSION" >$DISTDIR/RELEASE + +# Copy jars +cp $FWDIR/repl/target/*.jar "$DISTDIR/jars/" + +# Copy other things +cp -r "$FWDIR/bin" "$DISTDIR" +cp -r "$FWDIR/conf" "$DISTDIR" +cp "$FWDIR/run" "$FWDIR/spark-shell" "$DISTDIR" |