bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject bigtop git commit: BIGTOP-2122. Add zeppelin packages
Date Tue, 10 Nov 2015 02:44:56 GMT
Repository: bigtop
Updated Branches:
  refs/heads/master b1afa8f08 -> 1afdffe91


BIGTOP-2122. Add zeppelin packages


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/1afdffe9
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/1afdffe9
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/1afdffe9

Branch: refs/heads/master
Commit: 1afdffe91a7ee7eca0d8a756506d3bd8c0b92321
Parents: b1afa8f
Author: Jonathan Kelly <jonathak@amazon.com>
Authored: Mon Nov 9 18:36:08 2015 -0800
Committer: Konstantin Boudnik <cos@apache.org>
Committed: Mon Nov 9 18:44:39 2015 -0800

----------------------------------------------------------------------
 .../src/common/zeppelin/do-component-build      |  35 +++++
 .../src/common/zeppelin/install_zeppelin.sh     | 130 ++++++++++++++++++
 .../src/common/zeppelin/zeppelin-env.sh         |  24 ++++
 .../src/common/zeppelin/zeppelin.svc            |  75 +++++++++++
 bigtop-packages/src/deb/zeppelin/changelog      |   1 +
 bigtop-packages/src/deb/zeppelin/compat         |   1 +
 bigtop-packages/src/deb/zeppelin/control        |  31 +++++
 bigtop-packages/src/deb/zeppelin/copyright      |  15 +++
 bigtop-packages/src/deb/zeppelin/rules          |  42 ++++++
 bigtop-packages/src/deb/zeppelin/source/format  |   1 +
 bigtop-packages/src/deb/zeppelin/zeppelin.dirs  |   4 +
 .../src/deb/zeppelin/zeppelin.install           |   4 +
 .../src/deb/zeppelin/zeppelin.postinst          |  42 ++++++
 .../src/deb/zeppelin/zeppelin.preinst           |  62 +++++++++
 bigtop-packages/src/deb/zeppelin/zeppelin.prerm |  38 ++++++
 .../src/rpm/zeppelin/SPECS/zeppelin.spec        | 135 +++++++++++++++++++
 bigtop.bom                                      |  15 ++-
 17 files changed, 653 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/common/zeppelin/do-component-build
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/zeppelin/do-component-build b/bigtop-packages/src/common/zeppelin/do-component-build
new file mode 100644
index 0000000..4236dca
--- /dev/null
+++ b/bigtop-packages/src/common/zeppelin/do-component-build
@@ -0,0 +1,35 @@
+#!/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.
+
+set -ex
+
+. `dirname $0`/bigtop.bom
+
+BUILD_OPTS="-Divy.home=${HOME}/.ivy2 -Dsbt.ivy.home=${HOME}/.ivy2 -Duser.home=${HOME} \
+            -Drepo.maven.org=$IVY_MIRROR_PROP \
+            -Dreactor.repo=file://${HOME}/.m2/repository \
+            -Pspark-1.5 -Dspark.version=$SPARK_VERSION \
+            -Phadoop-2.6 -Dhadoop.version=$HADOOP_VERSION \
+            -Pyarn \
+            -Pbuild-distr"
+            
+if [ "$ZEPPELIN_RUN_TESTS" = "true" ]; then
+  BUILD_OPTS="$BUILD_OPTS -DskipTests=false"
+else
+  BUILD_OPTS="$BUILD_OPTS -DskipTests"
+fi
+
+mvn $BUILD_OPTS clean package

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/common/zeppelin/install_zeppelin.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/zeppelin/install_zeppelin.sh b/bigtop-packages/src/common/zeppelin/install_zeppelin.sh
new file mode 100644
index 0000000..a35b61c
--- /dev/null
+++ b/bigtop-packages/src/common/zeppelin/install_zeppelin.sh
@@ -0,0 +1,130 @@
+#!/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.
+
+set -e
+
+usage() {
+  echo "
+usage: $0 <options>
+  Required not-so-options:
+     --build-dir=DIR             path to dist.dir
+     --source-dir=DIR            path to package shared files dir
+     --prefix=PREFIX             path to install into
+
+  Optional options:
+     --doc-dir=DIR               path to install docs into [/usr/share/doc/zeppelin]
+     --lib-dir=DIR               path to install Zeppelin home [/usr/lib/zeppelin]
+     --installed-lib-dir=DIR     path where lib-dir will end up on target system
+     --bin-dir=DIR               path to install bins [/usr/bin]
+     ... [ see source for more similar options ]
+  "
+  exit 1
+}
+
+OPTS=$(getopt \
+  -n $0 \
+  -o '' \
+  -l 'prefix:' \
+  -l 'doc-dir:' \
+  -l 'lib-dir:' \
+  -l 'installed-lib-dir:' \
+  -l 'bin-dir:' \
+  -l 'source-dir:' \
+  -l 'build-dir:' -- "$@")
+
+if [ $? != 0 ] ; then
+    usage
+fi
+
+eval set -- "$OPTS"
+while true ; do
+    case "$1" in
+        --prefix)
+        PREFIX=$2 ; shift 2
+        ;;
+        --build-dir)
+        BUILD_DIR=$2 ; shift 2
+        ;;
+        --source-dir)
+        SOURCE_DIR=$2 ; shift 2
+        ;;
+        --doc-dir)
+        DOC_DIR=$2 ; shift 2
+        ;;
+        --lib-dir)
+        LIB_DIR=$2 ; shift 2
+        ;;
+        --installed-lib-dir)
+        INSTALLED_LIB_DIR=$2 ; shift 2
+        ;;
+        --bin-dir)
+        BIN_DIR=$2 ; shift 2
+        ;;
+        --)
+        shift ; break
+        ;;
+        *)
+        echo "Unknown option: $1"
+        usage
+        exit 1
+        ;;
+    esac
+done
+
+for var in PREFIX BUILD_DIR SOURCE_DIR; do
+  if [ -z "$(eval "echo \$$var")" ]; then
+    echo Missing param: $var
+    usage
+  fi
+done
+
+if [ -f "$SOURCE_DIR/bigtop.bom" ]; then
+  . $SOURCE_DIR/bigtop.bom
+fi
+
+MAN_DIR=${MAN_DIR:-/usr/share/man/man1}
+DOC_DIR=${DOC_DIR:-/usr/share/doc/zeppelin}
+LIB_DIR=${LIB_DIR:-/usr/lib/zeppelin}
+INSTALLED_LIB_DIR=${INSTALLED_LIB_DIR:-/usr/lib/zeppelin}
+BIN_DIR=${BIN_DIR:-/usr/bin}
+CONF_DIR=${CONF_DIR:-/etc/zeppelin/conf.dist}
+
+install -d -m 0755 $PREFIX/$LIB_DIR
+install -d -m 0755 $PREFIX/$LIB_DIR/bin
+install -d -m 0755 $PREFIX/$LIB_DIR/lib
+install -d -m 0755 $PREFIX/$CONF_DIR
+install -d -m 0755 $PREFIX/$DOC_DIR
+
+install -d -m 0755 $PREFIX/var/lib/zeppelin/
+install -d -m 0755 $PREFIX/var/lib/zeppelin/notebook/
+install -d -m 0755 $PREFIX/var/log/zeppelin/
+install -d -m 0755 $PREFIX/var/run/zeppelin/
+
+tar --wildcards --strip-components=1 -C $PREFIX/$LIB_DIR -zxf ${BUILD_DIR}/zeppelin-distribution/target/zeppelin-*.tar.gz
\*/bin/\*
+tar --wildcards --strip-components=1 -C $PREFIX/$LIB_DIR -zxf ${BUILD_DIR}/zeppelin-distribution/target/zeppelin-*.tar.gz
\*/interpreter/\*
+tar --wildcards --strip-components=1 -C $PREFIX/$LIB_DIR -zxf ${BUILD_DIR}/zeppelin-distribution/target/zeppelin-*.tar.gz
\*/lib/\*
+tar --wildcards --strip-components=1 -C $PREFIX/$LIB_DIR -zxf ${BUILD_DIR}/zeppelin-distribution/target/zeppelin-*.tar.gz
\*zeppelin-server\*.jar
+tar --wildcards --strip-components=1 -C $PREFIX/$LIB_DIR -zxf ${BUILD_DIR}/zeppelin-distribution/target/zeppelin-*.tar.gz
\*zeppelin-web\*.war
+tar --wildcards --strip-components=1 -C $PREFIX/var/lib/zeppelin -zxf ${BUILD_DIR}/zeppelin-distribution/target/zeppelin-*.tar.gz
\*/notebook/\*
+
+chmod 755 $PREFIX/$LIB_DIR/bin/*
+
+cp -a ${BUILD_DIR}/{LICENSE,README.md} $PREFIX/$LIB_DIR
+
+cp -a ${BUILD_DIR}/conf/* $PREFIX/$CONF_DIR
+cp -a ${SOURCE_DIR}/zeppelin-env.sh $PREFIX/$CONF_DIR
+ln -s /etc/zeppelin/conf $PREFIX/$LIB_DIR/conf

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/common/zeppelin/zeppelin-env.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/zeppelin/zeppelin-env.sh b/bigtop-packages/src/common/zeppelin/zeppelin-env.sh
new file mode 100644
index 0000000..d423f91
--- /dev/null
+++ b/bigtop-packages/src/common/zeppelin/zeppelin-env.sh
@@ -0,0 +1,24 @@
+# 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.
+
+export ZEPPELIN_INTERPRETERS="org.apache.zeppelin.spark.SparkInterpreter,org.apache.zeppelin.spark.PySparkInterpreter,org.apache.zeppelin.spark.SparkSqlInterpreter,org.apache.zeppelin.spark.DepInterpreter,org.apache.zeppelin.markdown.Markdown,org.apache.zeppelin.angular.AngularInterpreter,org.apache.zeppelin.shell.ShellInterpreter,org.apache.zeppelin.hive.HiveInterpreter"
+export ZEPPELIN_PORT=8080
+export ZEPPELIN_CONF_DIR=/etc/zeppelin/conf
+export ZEPPELIN_LOG_DIR=/var/log/zeppelin
+export ZEPPELIN_PID_DIR=/var/run/zeppelin
+export ZEPPELIN_NOTEBOOK_DIR=/var/lib/zeppelin/notebook
+export MASTER=yarn-client
+export SPARK_HOME=/usr/lib/spark
+export HADOOP_CONF_DIR=/etc/hadoop/conf

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/common/zeppelin/zeppelin.svc
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/zeppelin/zeppelin.svc b/bigtop-packages/src/common/zeppelin/zeppelin.svc
new file mode 100644
index 0000000..03587ca
--- /dev/null
+++ b/bigtop-packages/src/common/zeppelin/zeppelin.svc
@@ -0,0 +1,75 @@
+# 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.
+
+DAEMON="zeppelin"
+DESC="Zeppelin"
+EXEC_PATH="/usr/lib/zeppelin/bin/zeppelin-daemon.sh"
+SVC_USER="zeppelin"
+WORKING_DIR="/var/lib/zeppelin"
+CONF_DIR="/etc/zeppelin/conf"
+PIDFILE="/var/run/zeppelin/zeppelin-${SVC_USER}-\$(hostname).pid"
+
+generate_start_script() {
+cat <<'__EOT__'
+    su -s /bin/bash $SVC_USER -c "cd $WORKING_DIR && $EXEC_PATH --config '$CONF_DIR'
start > /dev/null 2>&1"
+
+__EOT__
+}
+
+generate_start() {
+
+cat <<'__EOT__'
+
+start() {
+  [ -x $EXEC_PATH ] || exit $ERROR_PROGRAM_NOT_INSTALLED
+  [ -d $CONF_DIR ] || exit $ERROR_PROGRAM_NOT_CONFIGURED
+
+__EOT__
+
+generate_start_script
+
+cat <<'__EOT__'
+  checkstatusofproc
+  RETVAL=$?
+
+  if [ $RETVAL -eq $STATUS_RUNNING ]; then
+    log_success_msg "Started ${DESC}: "
+  else
+    log_failure_msg "Failed to start ${DESC}. Return value: $RETVAL"
+  fi
+  return $RETVAL
+}
+__EOT__
+
+}
+
+generate_stop() {
+
+cat <<'__EOT__'
+stop() {
+  log_success_msg "Stopping $DESC): "
+  killproc -p $PIDFILE java
+  RETVAL=$?
+
+  [ $RETVAL -eq $RETVAL_SUCCESS ] && rm -f $PIDFILE
+  return $RETVAL
+}
+__EOT__
+
+}
+
+generate_prestart_script() {
+  generate_start_script
+}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/deb/zeppelin/changelog
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/zeppelin/changelog b/bigtop-packages/src/deb/zeppelin/changelog
new file mode 100644
index 0000000..547ed02
--- /dev/null
+++ b/bigtop-packages/src/deb/zeppelin/changelog
@@ -0,0 +1 @@
+--- This is auto-generated 

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/deb/zeppelin/compat
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/zeppelin/compat b/bigtop-packages/src/deb/zeppelin/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/bigtop-packages/src/deb/zeppelin/compat
@@ -0,0 +1 @@
+9

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/deb/zeppelin/control
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/zeppelin/control b/bigtop-packages/src/deb/zeppelin/control
new file mode 100644
index 0000000..4ddf6e4
--- /dev/null
+++ b/bigtop-packages/src/deb/zeppelin/control
@@ -0,0 +1,31 @@
+# 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.
+
+Source: zeppelin
+Section: misc
+Priority: extra
+Maintainer: Bigtop <dev@bigtop.apache.org>
+Build-Depends: debhelper (>= 7.0.50~)
+Standards-Version: 3.9.4
+Homepage: http://zeppelin.incubator.apache.org/
+
+Package: zeppelin
+Architecture: all
+Depends: adduser, bigtop-utils (>= 0.8), hadoop-client, spark-core (>= 1.5), spark-python
(>= 1.5)
+Description: Web-based notebook for data analysts
+ Zeppelin is a web-based notebook that enables interactive data analytics with
+ multiple data analytics projects including Apache Ignite, Apache Flink, Apache Spark,
+ Apache Kylin, Apache Hive, and others.
+ You can make beautiful data-driven, interactive and collaborative documents with SQL, Scala
and more.

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/deb/zeppelin/copyright
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/zeppelin/copyright b/bigtop-packages/src/deb/zeppelin/copyright
new file mode 100644
index 0000000..554e6c9
--- /dev/null
+++ b/bigtop-packages/src/deb/zeppelin/copyright
@@ -0,0 +1,15 @@
+Format: http://dep.debian.net/deps/dep5
+Source: http://zeppelin.incubator.apache.org/
+Upstream-Name: Apache Zeppelin (Incubating)
+
+Files: *
+Copyright: 2013-2015, The Apache Software Foundation
+License: Apache-2.0
+
+Files debian/*
+Copyright: 2011, The Apache Software Foundation
+License: Apache-2.0
+
+License: Apache-2.0
+ On Debian systems, the complete text of the Apache 2.0 license
+ can be found in "/usr/share/common-licenses/Apache-2.0".

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/deb/zeppelin/rules
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/zeppelin/rules b/bigtop-packages/src/deb/zeppelin/rules
new file mode 100644
index 0000000..6ac4cd8
--- /dev/null
+++ b/bigtop-packages/src/deb/zeppelin/rules
@@ -0,0 +1,42 @@
+#!/usr/bin/make -f
+
+# 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.
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+%:
+	dh $@
+
+override_dh_auto_build:
+	bash debian/do-component-build
+
+svcs=zeppelin
+
+$(svcs): debian/init.d.tmpl
+	bash $< debian/$@.svc deb debian/$@.init
+	touch $@
+
+override_dh_auto_install: $(svcs)
+	bash -x debian/install_zeppelin.sh \
+	--build-dir=`pwd` \
+	--doc-dir=/usr/share/doc/zeppelin \
+	--source-dir=debian \
+	--prefix=debian/tmp

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/deb/zeppelin/source/format
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/zeppelin/source/format b/bigtop-packages/src/deb/zeppelin/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/bigtop-packages/src/deb/zeppelin/source/format
@@ -0,0 +1 @@
+3.0 (quilt)

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/deb/zeppelin/zeppelin.dirs
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/zeppelin/zeppelin.dirs b/bigtop-packages/src/deb/zeppelin/zeppelin.dirs
new file mode 100644
index 0000000..a03f559
--- /dev/null
+++ b/bigtop-packages/src/deb/zeppelin/zeppelin.dirs
@@ -0,0 +1,4 @@
+/usr/bin
+/var/log/zeppelin
+/var/run/zeppelin
+/etc/default

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/deb/zeppelin/zeppelin.install
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/zeppelin/zeppelin.install b/bigtop-packages/src/deb/zeppelin/zeppelin.install
new file mode 100644
index 0000000..1883e9b
--- /dev/null
+++ b/bigtop-packages/src/deb/zeppelin/zeppelin.install
@@ -0,0 +1,4 @@
+/etc/zeppelin
+/usr/lib/zeppelin
+/var/lib/zeppelin
+/usr/share/doc/zeppelin

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/deb/zeppelin/zeppelin.postinst
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/zeppelin/zeppelin.postinst b/bigtop-packages/src/deb/zeppelin/zeppelin.postinst
new file mode 100644
index 0000000..bebbdea
--- /dev/null
+++ b/bigtop-packages/src/deb/zeppelin/zeppelin.postinst
@@ -0,0 +1,42 @@
+#!/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.
+
+pkg_name=zeppelin
+
+set -e
+
+case "$1" in
+    configure)
+        # Install config alternatives
+        update-alternatives  --install /etc/${pkg_name}/conf ${pkg_name}-conf \
+            /etc/${pkg_name}/conf.dist 30
+        chown -R zeppelin:zeppelin /var/log/${pkg_name} /var/lib/${pkg_name} \
+            /var/run/${pkg_name} /etc/${pkg_name}/conf/
+        chmod g+w /var/log/${pkg_name}
+        chmod 0755 /var/run/${pkg_name}
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/deb/zeppelin/zeppelin.preinst
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/zeppelin/zeppelin.preinst b/bigtop-packages/src/deb/zeppelin/zeppelin.preinst
new file mode 100644
index 0000000..6434c1a
--- /dev/null
+++ b/bigtop-packages/src/deb/zeppelin/zeppelin.preinst
@@ -0,0 +1,62 @@
+#!/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.
+
+# preinst script for zeppelin
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install|upgrade)
+        if ! getent passwd zeppelin >/dev/null; then
+                # Adding system user: zeppelin .
+                adduser \
+                  --system \
+                  --group \
+                  --home /var/lib/zeppelin \
+                  --gecos "Zeppelin" \
+                  --shell /bin/false \
+                  zeppelin >/dev/null
+        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/deb/zeppelin/zeppelin.prerm
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/zeppelin/zeppelin.prerm b/bigtop-packages/src/deb/zeppelin/zeppelin.prerm
new file mode 100644
index 0000000..98e5c01
--- /dev/null
+++ b/bigtop-packages/src/deb/zeppelin/zeppelin.prerm
@@ -0,0 +1,38 @@
+#!/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.
+
+set -e
+
+case "$1" in
+    remove|upgrade|deconfigure)
+      update-alternatives --remove zeppelin-conf /etc/zeppelin/conf.dist || :
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop-packages/src/rpm/zeppelin/SPECS/zeppelin.spec
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/zeppelin/SPECS/zeppelin.spec b/bigtop-packages/src/rpm/zeppelin/SPECS/zeppelin.spec
new file mode 100644
index 0000000..e168496
--- /dev/null
+++ b/bigtop-packages/src/rpm/zeppelin/SPECS/zeppelin.spec
@@ -0,0 +1,135 @@
+# 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.
+
+%define lib_zeppelin /usr/lib/%{name}
+%define var_lib_zeppelin /var/lib/%{name}
+%define var_run_zeppelin /var/run/%{name}
+%define var_log_zeppelin /var/log/%{name}
+%define bin_zeppelin /usr/lib/%{name}/bin
+%define etc_zeppelin /etc/%{name}
+%define config_zeppelin %{etc_zeppelin}/conf
+%define bin /usr/bin
+%define man_dir /usr/share/man
+
+%if  %{?suse_version:1}0
+%define doc_zeppelin %{_docdir}/%{name}
+%define alternatives_cmd update-alternatives
+%else
+%define doc_zeppelin %{_docdir}/%{name}-%{zeppelin_version}
+%define alternatives_cmd alternatives
+%endif
+
+# disable repacking jars
+%define __os_install_post %{nil}
+
+Name: zeppelin
+Version: %{zeppelin_version}
+Release: %{zeppelin_release}
+Summary: Web-based notebook for Apache Spark
+URL: http://zeppelin.incubator.apache.org/
+Group: Applications/Engineering
+BuildArch: noarch
+Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+License: ASL 2.0
+Source0: %{name}-%{zeppelin_base_version}.tar.gz
+Source1: bigtop.bom
+Source2: do-component-build
+Source3: init.d.tmpl
+Source4: install_zeppelin.sh
+Source5: zeppelin-env.sh
+Source6: zeppelin.svc
+Requires: bigtop-utils >= 0.7, hadoop-client, spark-core >= 1.5, spark-python >=
1.5
+Requires(preun): /sbin/service
+
+%global initd_dir %{_sysconfdir}/init.d
+
+%if  %{?suse_version:1}0
+# Required for init scripts
+Requires: insserv
+%global initd_dir %{_sysconfdir}/rc.d
+
+%else
+# Required for init scripts
+Requires: /lib/lsb/init-functions
+
+%global initd_dir %{_sysconfdir}/rc.d/init.d
+
+%endif
+
+%description 
+Zeppelin is a web-based notebook that enables interactive data analytics with Apache Spark.
+You can make beautiful data-driven, interactive and collaborative documents with SQL, Scala
and more.
+
+%prep
+%setup -n %{name}-%{zeppelin_base_version}
+
+%build
+bash $RPM_SOURCE_DIR/do-component-build
+
+%install
+%__rm -rf $RPM_BUILD_ROOT
+
+# Init.d scripts directory
+%__install -d -m 0755 $RPM_BUILD_ROOT/%{initd_dir}/
+
+bash $RPM_SOURCE_DIR/install_zeppelin.sh \
+  --build-dir=`pwd`         \
+  --source-dir=$RPM_SOURCE_DIR \
+  --prefix=$RPM_BUILD_ROOT  \
+  --doc-dir=%{doc_zeppelin}
+
+# Install init script
+initd_script=$RPM_BUILD_ROOT/%{initd_dir}/%{name}
+bash %{SOURCE3} $RPM_SOURCE_DIR/%{name}.svc rpm $initd_script
+
+%pre
+getent group zeppelin >/dev/null || groupadd -r zeppelin
+getent passwd zeppelin >/dev/null || useradd -c "Zeppelin" -s /sbin/nologin -g zeppelin
-r -d %{var_lib_zeppelin} zeppelin 2> /dev/null || :
+
+%post
+%{alternatives_cmd} --install %{config_zeppelin} %{name}-conf %{config_zeppelin}.dist 30
+chkconfig --add %{name}
+
+%preun
+if [ "$1" = 0 ]; then
+  %{alternatives_cmd} --remove %{name}-conf %{config_zeppelin}.dist || :
+fi
+
+/sbin/service %{name} status > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+  service %{name} stop > /dev/null 2>&1
+fi
+chkconfig --del %{name}
+
+#######################
+#### FILES SECTION ####
+#######################
+%files
+%defattr(-,root,root,755)
+%config(noreplace) %{config_zeppelin}.dist
+%doc %{doc_zeppelin}
+%{lib_zeppelin}/LICENSE
+%{lib_zeppelin}/README.md
+%{lib_zeppelin}/*.jar
+%{lib_zeppelin}/*.war
+%{lib_zeppelin}/bin
+%{lib_zeppelin}/conf
+%{lib_zeppelin}/interpreter
+%{lib_zeppelin}/lib
+%attr(0755,zeppelin,zeppelin) %{etc_zeppelin}
+%attr(0755,zeppelin,zeppelin) %{var_lib_zeppelin}
+%attr(0755,zeppelin,zeppelin) %{var_run_zeppelin}
+%attr(0755,zeppelin,zeppelin) %{var_log_zeppelin}
+%attr(0755,root,root)/%{initd_dir}/%{name}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1afdffe9/bigtop.bom
----------------------------------------------------------------------
diff --git a/bigtop.bom b/bigtop.bom
index ec27685..04290bc 100644
--- a/bigtop.bom
+++ b/bigtop.bom
@@ -90,11 +90,12 @@ bigtop {
     zookeeper:['hadoop', 'hbase'],
     hadoop:['ignite', 'hbase', 'crunch', 'pig', 'hive', 'tez', 'sqoop', 'sqoop2',
       'oozie', 'mahout', 'flume', 'giraph', 'solr', 'crunch', 'spark',
-      'phoenix', 'tachyon', 'kafka', 'ycsb', 'kite', 'hama'
+      'phoenix', 'tachyon', 'kafka', 'ycsb', 'kite', 'hama', 'zeppelin'
     ],
     hbase:['phoenix','giraph','ycsb'],
     pig:['datafu', 'oozie'],
-    hive:['oozie', 'pig']
+    hive:['oozie', 'pig'],
+    spark:['zeppelin']
   ]
 
   components {
@@ -389,5 +390,15 @@ bigtop {
                 site = "${apache.APACHE_MIRROR}/${download_path}"
                 archive = "${apache.APACHE_ARCHIVE}/${download_path}" }
     }
+    'zeppelin' {
+      name    = 'zeppelin'
+      relNotes = 'Apache Zeppelin (incubating)'
+      version { base = '0.5.5'; pkg = base; release = 1 }
+      tarball { source      = "branch-${version.base}.zip"
+                destination = "$name-${version.base}.tar.gz" }
+      url     { download_path = "apache/incubator-zeppelin/archive"
+                site = "https://github.com/${download_path}"
+                archive = site }
+    }
   }
 }


Mime
View raw message