You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by co...@apache.org on 2015/05/02 01:23:57 UTC

[1/3] bigtop git commit: BIGTOP-1824. Tachyon master and worker daemon script does not work propertly

Repository: bigtop
Updated Branches:
  refs/heads/master 0c1ed66b5 -> f69e8f3d2


BIGTOP-1824. Tachyon master and worker daemon script does not work propertly

Signed-off-by: Konstantin Boudnik <co...@wandisco.com>


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

Branch: refs/heads/master
Commit: 61a3f67aabeea6464c9db2f6c888bfcfe20b4ae4
Parents: 0c1ed66
Author: Evans Ye <ev...@apache.org>
Authored: Sat Apr 11 08:54:04 2015 +0000
Committer: Konstantin Boudnik <co...@wandisco.com>
Committed: Fri May 1 16:13:47 2015 -0700

----------------------------------------------------------------------
 bigtop-packages/src/common/tachyon/init.d.tmpl        | 2 ++
 bigtop-packages/src/common/tachyon/install_tachyon.sh | 2 +-
 bigtop-packages/src/common/tachyon/tachyon-master.svc | 8 +++++---
 bigtop-packages/src/common/tachyon/tachyon-worker.svc | 7 +++++--
 bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec    | 2 +-
 5 files changed, 14 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/61a3f67a/bigtop-packages/src/common/tachyon/init.d.tmpl
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/tachyon/init.d.tmpl b/bigtop-packages/src/common/tachyon/init.d.tmpl
index b8de352..24b1add 100755
--- a/bigtop-packages/src/common/tachyon/init.d.tmpl
+++ b/bigtop-packages/src/common/tachyon/init.d.tmpl
@@ -29,6 +29,7 @@
 #     EXEC_PATH="path to the upstream daemon management script"
 #     SVC_USER="user to run this service as"
 #     DAEMON_FLAGS="flags to be passed to the $EXEC_PATH"
+#     KEYWORD="keyword to determine the Tachyon daemon"
 #     WORKING_DIR="working directory to cd into before starting the daemon"
 #     CONF_DIR="path to the configuration directory"
 #     PIDFILE="file holding a PID of the running daemon"
@@ -217,6 +218,7 @@ DESC="$DESC"
 EXEC_PATH="$EXEC_PATH"
 SVC_USER="$SVC_USER"
 DAEMON_FLAGS="$DAEMON_FLAGS"
+KEYWORD="$KEYWORD"
 CONF_DIR="$CONF_DIR"
 PIDFILE="$PIDFILE"
 LOCKDIR="/var/lock/subsys"

http://git-wip-us.apache.org/repos/asf/bigtop/blob/61a3f67a/bigtop-packages/src/common/tachyon/install_tachyon.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/tachyon/install_tachyon.sh b/bigtop-packages/src/common/tachyon/install_tachyon.sh
index 2bf1bcc..ef0e102 100644
--- a/bigtop-packages/src/common/tachyon/install_tachyon.sh
+++ b/bigtop-packages/src/common/tachyon/install_tachyon.sh
@@ -115,7 +115,7 @@ cp -a libexec/* $PREFIX/${LIB_DIR}/libexec
 cp -rf core/src/main/webapp $PREFIX/$VAR_DIR/lib/tachyon/core/src/main
 
 # Copy in the configuration files
-install -m 0644 conf/log4j.properties conf/slaves  $PREFIX/etc/tachyon
+install -m 0644 conf/log4j.properties conf/workers $PREFIX/etc/tachyon
 cp conf/tachyon-env.sh.template  $PREFIX/etc/tachyon/tachyon-env.sh
 
 # Copy in the /usr/bin/tachyon wrapper

http://git-wip-us.apache.org/repos/asf/bigtop/blob/61a3f67a/bigtop-packages/src/common/tachyon/tachyon-master.svc
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/tachyon/tachyon-master.svc b/bigtop-packages/src/common/tachyon/tachyon-master.svc
index e5b8fdd..00fb14c 100644
--- a/bigtop-packages/src/common/tachyon/tachyon-master.svc
+++ b/bigtop-packages/src/common/tachyon/tachyon-master.svc
@@ -19,6 +19,7 @@ DESC="Tachyon ${TYPE}"
 EXEC_PATH="/usr/lib/tachyon/bin/tachyon-start.sh"
 WORKING_DIR="/var/lib/tachyon"
 DAEMON_FLAGS="master Mount"
+KEYWORD="tachyon.master.TachyonMaster"
 CONF_DIR="/etc/tachyon/conf"
 PIDFILE="/var/run/tachyon/${DAEMON}.pid"
 
@@ -40,10 +41,12 @@ start() {
 
     /bin/bash -c "nohup nice -n 0 \
         ${EXEC_PATH} ${DAEMON_FLAGS} \
-        > $LOG_FILE 2>&1 & "'echo $!' > "$PIDFILE"
+        > $LOG_FILE 2>&1 & "
 
     sleep 3
 
+    echo `ps -A -o pid,command | grep -i "[j]ava" | grep $KEYWORD | awk '{print $1}'` > $PIDFILE
+
     checkstatusofproc
     RETVAL=$?
     [ $RETVAL -eq $STATUS_RUNNING ] && touch $LOCKFILE
@@ -58,9 +61,8 @@ generate_stop() {
 cat <<'__EOT__'
 stop() {
     log_success_msg "Stopping $DESC (${DAEMON}): "
-    killproc -p $PIDFILE java
+    /usr/lib/tachyon/bin/tachyon-stop.sh master 2>&1 > /dev/null
     RETVAL=$?
-    /usr/lib/tachyon/bin/tachyon-stop.sh 2>&1 > /dev/null
 
     [ $RETVAL -eq $RETVAL_SUCCESS ] && rm -f $LOCKFILE $PIDFILE
     return $RETVAL

http://git-wip-us.apache.org/repos/asf/bigtop/blob/61a3f67a/bigtop-packages/src/common/tachyon/tachyon-worker.svc
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/tachyon/tachyon-worker.svc b/bigtop-packages/src/common/tachyon/tachyon-worker.svc
index 2183926..ec78943 100644
--- a/bigtop-packages/src/common/tachyon/tachyon-worker.svc
+++ b/bigtop-packages/src/common/tachyon/tachyon-worker.svc
@@ -19,6 +19,7 @@ DESC="Tachyon ${TYPE}"
 EXEC_PATH="/usr/lib/tachyon/bin/tachyon-start.sh"
 WORKING_DIR="/var/lib/tachyon"
 DAEMON_FLAGS="worker Mount"
+KEYWORD="tachyon.worker.TachyonWorker"
 CONF_DIR="/etc/tachyon/conf"
 PIDFILE="/var/run/tachyon/${DAEMON}.pid"
 
@@ -44,10 +45,12 @@ start() {
 
     /bin/bash -c "nohup nice -n 0 \
         ${EXEC_PATH} ${DAEMON_FLAGS} \
-        > $LOG_FILE 2>&1 & "'echo $!' > "$PIDFILE"
+        > $LOG_FILE 2>&1 & "
 
     sleep 3
 
+    echo `ps -A -o pid,command | grep -i "[j]ava" | grep $KEYWORD | awk '{print $1}'` > $PIDFILE
+
     checkstatusofproc
     RETVAL=$?
     [ $RETVAL -eq $STATUS_RUNNING ] && touch $LOCKFILE
@@ -62,7 +65,7 @@ generate_stop() {
 cat <<'__EOT__'
 stop() {
     log_success_msg "Stopping $DESC (${DAEMON}): "
-    killproc -p $PIDFILE java
+    /usr/lib/tachyon/bin/tachyon-stop.sh worker 2>&1 > /dev/null
     RETVAL=$?
 
     [ $RETVAL -eq $RETVAL_SUCCESS ] && rm -f $LOCKFILE $PIDFILE

http://git-wip-us.apache.org/repos/asf/bigtop/blob/61a3f67a/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec b/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec
index d251df0..3b9bc8b 100644
--- a/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec
+++ b/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec
@@ -106,7 +106,7 @@ done
 %doc LICENSE README.md
 %dir %{_sysconfdir}/%{name}
 %config(noreplace) %{_sysconfdir}/%{name}/log4j.properties
-%config(noreplace) %{_sysconfdir}/%{name}/slaves
+%config(noreplace) %{_sysconfdir}/%{name}/workers
 %config(noreplace) %{initd_dir}/%{name}-master
 %config(noreplace) %{initd_dir}/%{name}-worker
 %config(noreplace) %{_sysconfdir}/%{name}/tachyon-env.sh


[3/3] bigtop git commit: BIGTOP-1827. Tachyon package name conflict on Debian/Ubuntu

Posted by co...@apache.org.
BIGTOP-1827. Tachyon package name conflict on Debian/Ubuntu

Signed-off-by: Konstantin Boudnik <co...@wandisco.com>


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

Branch: refs/heads/master
Commit: f69e8f3d2b2972e7501f6b78275d8b07c20ef425
Parents: 8239a3a
Author: Evans Ye <ev...@apache.org>
Authored: Thu Apr 30 20:07:28 2015 +0000
Committer: Konstantin Boudnik <co...@wandisco.com>
Committed: Fri May 1 16:14:36 2015 -0700

----------------------------------------------------------------------
 .../puppet/modules/tachyon/manifests/init.pp    | 12 +++----
 bigtop-packages/src/deb/tachyon/control         |  4 +--
 bigtop-packages/src/deb/tachyon/rules           |  3 ++
 .../src/deb/tachyon/tachyon-tfs.dirs            |  4 +++
 .../src/deb/tachyon/tachyon-tfs.install         |  3 ++
 .../src/deb/tachyon/tachyon-tfs.postinst        | 32 +++++++++++++++++
 .../src/deb/tachyon/tachyon-tfs.prerm           | 37 ++++++++++++++++++++
 bigtop-packages/src/deb/tachyon/tachyon.dirs    |  3 --
 bigtop-packages/src/deb/tachyon/tachyon.install |  3 --
 .../src/deb/tachyon/tachyon.postinst            | 32 -----------------
 bigtop-packages/src/deb/tachyon/tachyon.prerm   | 37 --------------------
 .../src/rpm/tachyon/SPECS/tachyon.spec          | 35 +++++++++---------
 bigtop.mk                                       |  4 +--
 13 files changed, 107 insertions(+), 102 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/f69e8f3d/bigtop-deploy/puppet/modules/tachyon/manifests/init.pp
----------------------------------------------------------------------
diff --git a/bigtop-deploy/puppet/modules/tachyon/manifests/init.pp b/bigtop-deploy/puppet/modules/tachyon/manifests/init.pp
index 2e525fe..8d53b25 100644
--- a/bigtop-deploy/puppet/modules/tachyon/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/tachyon/manifests/init.pp
@@ -11,7 +11,7 @@
 # limitations under the License.
 class tachyon {
   class common ($master_host){
-    package { "tachyon":
+    package { "tachyon-tfs":
       ensure => latest,
     }
 
@@ -19,13 +19,13 @@ class tachyon {
     file {
         "/etc/tachyon/conf/log4j.properties":
         content => template("tachyon/log4j.properties"),
-        require => [Package["tachyon"]]
+        require => [Package["tachyon-tfs"]]
     }
 
     # add tachyon-env.sh to point to tachyon master
     file { "/etc/tachyon/conf/tachyon-env.sh":
         content => template("tachyon/tachyon-env.sh"),
-        require => [Package["tachyon"]]
+        require => [Package["tachyon-tfs"]]
     }
   }
 
@@ -35,13 +35,13 @@ class tachyon {
    exec {
         "tachyon formatting":
            command => "/usr/lib/tachyon/bin/tachyon format",
-           require => [ Package["tachyon"], File["/etc/tachyon/conf/log4j.properties"], File["/etc/tachyon/conf/tachyon-env.sh"] ]
+           require => [ Package["tachyon-tfs"], File["/etc/tachyon/conf/log4j.properties"], File["/etc/tachyon/conf/tachyon-env.sh"] ]
     }
 
     if ( $fqdn == $tachyon::common::master_host ) {
       service { "tachyon-master":
         ensure => running,
-        require => [ Package["tachyon"], Exec["tachyon formatting"] ],
+        require => [ Package["tachyon-tfs"], Exec["tachyon formatting"] ],
         hasrestart => true,
         hasstatus => true,
       }
@@ -60,7 +60,7 @@ class tachyon {
 
     service { "tachyon-worker":
       ensure => running,
-      require => [ Package["tachyon"], File["/etc/tachyon/conf/log4j.properties"], File["/etc/tachyon/conf/tachyon-env.sh"] ],
+      require => [ Package["tachyon-tfs"], File["/etc/tachyon/conf/log4j.properties"], File["/etc/tachyon/conf/tachyon-env.sh"] ],
       hasrestart => true,
       hasstatus => true,
     }

http://git-wip-us.apache.org/repos/asf/bigtop/blob/f69e8f3d/bigtop-packages/src/deb/tachyon/control
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/tachyon/control b/bigtop-packages/src/deb/tachyon/control
index 38a5198..061239b 100644
--- a/bigtop-packages/src/deb/tachyon/control
+++ b/bigtop-packages/src/deb/tachyon/control
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-Source: tachyon
+Source: tachyon-tfs
 Section: misc
 Priority: extra
 Maintainer: Huamin Chen <hc...@redhat.com>
@@ -21,7 +21,7 @@ Build-Depends: debhelper (>= 7.0.50~)
 Standards-Version: 3.9.4
 Homepage: http://tachyon-project.org
 
-Package:  tachyon
+Package:  tachyon-tfs
 Architecture: all
 Depends: bigtop-utils (>= 0.7)
 Description: Reliable file sharing at memory speed across cluster frameworks

http://git-wip-us.apache.org/repos/asf/bigtop/blob/f69e8f3d/bigtop-packages/src/deb/tachyon/rules
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/tachyon/rules b/bigtop-packages/src/deb/tachyon/rules
index 2b0cb04..6611f7d 100755
--- a/bigtop-packages/src/deb/tachyon/rules
+++ b/bigtop-packages/src/deb/tachyon/rules
@@ -38,3 +38,6 @@ override_dh_auto_install:
     --libexec-dir=/usr/lib/tachyon/libexec \
     --var-dir= /var/ \
     --prefix=debian/tmp
+	mkdir -p debian/tachyon-tfs/etc/init.d/
+	bash debian/init.d.tmpl debian/tachyon-master.svc deb debian/tachyon-tfs/etc/init.d/tachyon-master
+	bash debian/init.d.tmpl debian/tachyon-worker.svc deb debian/tachyon-tfs/etc/init.d/tachyon-worker

http://git-wip-us.apache.org/repos/asf/bigtop/blob/f69e8f3d/bigtop-packages/src/deb/tachyon/tachyon-tfs.dirs
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/tachyon/tachyon-tfs.dirs b/bigtop-packages/src/deb/tachyon/tachyon-tfs.dirs
new file mode 100644
index 0000000..b05374b
--- /dev/null
+++ b/bigtop-packages/src/deb/tachyon/tachyon-tfs.dirs
@@ -0,0 +1,4 @@
+/etc/tachyon/conf
+/usr/lib/tachyon
+/usr/bin
+/var/run/tachyon

http://git-wip-us.apache.org/repos/asf/bigtop/blob/f69e8f3d/bigtop-packages/src/deb/tachyon/tachyon-tfs.install
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/tachyon/tachyon-tfs.install b/bigtop-packages/src/deb/tachyon/tachyon-tfs.install
new file mode 100644
index 0000000..473e2f5
--- /dev/null
+++ b/bigtop-packages/src/deb/tachyon/tachyon-tfs.install
@@ -0,0 +1,3 @@
+/etc/tachyon/conf
+/usr/lib/tachyon
+/usr/bin/tachyon

http://git-wip-us.apache.org/repos/asf/bigtop/blob/f69e8f3d/bigtop-packages/src/deb/tachyon/tachyon-tfs.postinst
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/tachyon/tachyon-tfs.postinst b/bigtop-packages/src/deb/tachyon/tachyon-tfs.postinst
new file mode 100644
index 0000000..a2078db
--- /dev/null
+++ b/bigtop-packages/src/deb/tachyon/tachyon-tfs.postinst
@@ -0,0 +1,32 @@
+#!/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
+    configure)
+    ;;
+
+    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/f69e8f3d/bigtop-packages/src/deb/tachyon/tachyon-tfs.prerm
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/tachyon/tachyon-tfs.prerm b/bigtop-packages/src/deb/tachyon/tachyon-tfs.prerm
new file mode 100644
index 0000000..4ba1a94
--- /dev/null
+++ b/bigtop-packages/src/deb/tachyon/tachyon-tfs.prerm
@@ -0,0 +1,37 @@
+#!/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)
+    ;;
+
+    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/f69e8f3d/bigtop-packages/src/deb/tachyon/tachyon.dirs
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/tachyon/tachyon.dirs b/bigtop-packages/src/deb/tachyon/tachyon.dirs
deleted file mode 100644
index fc644d3..0000000
--- a/bigtop-packages/src/deb/tachyon/tachyon.dirs
+++ /dev/null
@@ -1,3 +0,0 @@
-/etc/tachyon/conf
-/usr/lib/tachyon
-/usr/bin

http://git-wip-us.apache.org/repos/asf/bigtop/blob/f69e8f3d/bigtop-packages/src/deb/tachyon/tachyon.install
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/tachyon/tachyon.install b/bigtop-packages/src/deb/tachyon/tachyon.install
deleted file mode 100644
index 473e2f5..0000000
--- a/bigtop-packages/src/deb/tachyon/tachyon.install
+++ /dev/null
@@ -1,3 +0,0 @@
-/etc/tachyon/conf
-/usr/lib/tachyon
-/usr/bin/tachyon

http://git-wip-us.apache.org/repos/asf/bigtop/blob/f69e8f3d/bigtop-packages/src/deb/tachyon/tachyon.postinst
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/tachyon/tachyon.postinst b/bigtop-packages/src/deb/tachyon/tachyon.postinst
deleted file mode 100644
index a2078db..0000000
--- a/bigtop-packages/src/deb/tachyon/tachyon.postinst
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/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
-    configure)
-    ;;
-
-    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/f69e8f3d/bigtop-packages/src/deb/tachyon/tachyon.prerm
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/tachyon/tachyon.prerm b/bigtop-packages/src/deb/tachyon/tachyon.prerm
deleted file mode 100644
index 4ba1a94..0000000
--- a/bigtop-packages/src/deb/tachyon/tachyon.prerm
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/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)
-    ;;
-
-    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/f69e8f3d/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec b/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec
index 5878f93..f5ee435 100644
--- a/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec
+++ b/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-Name:           tachyon
+Name:           tachyon-tfs
 Version:        %{tachyon_version}
 Release:        %{tachyon_release}
 Summary:       Reliable file sharing at memory speed across cluster frameworks
@@ -22,17 +22,18 @@ URL:           http://tachyon-project.org/
 Group:         Development/Libraries
 BuildArch:     noarch
 
-Source0:       %{name}-%{tachyon_base_version}.tar.gz
+Source0:       %{tachyon_name}-%{tachyon_base_version}.tar.gz
 Source1:       do-component-build
 Source2:       install_tachyon.sh
 Source3:       init.d.tmpl
 Source4:       tachyon-master.svc
 Source5:       tachyon-worker.svc
-%define        tachyon_home /usr/lib/%{name}
+%define        tachyon_name tachyon
+%define        tachyon_home /usr/lib/%{tachyon_name}
 %define        tachyon_services master worker
-%define        var_lib /var/lib/%{name}
-%define        var_run /var/run/%{name}
-%define        var_log /var/log/%{name}
+%define        var_lib /var/lib/%{tachyon_name}
+%define        var_run /var/run/%{tachyon_name}
+%define        var_log /var/log/%{tachyon_name}
 
 %global        initd_dir %{_sysconfdir}/init.d
 
@@ -67,7 +68,7 @@ avoids going to disk to load data-sets that
 are frequently read.
 
 %prep
-%setup -n %{name}-%{tachyon_base_version}
+%setup -n %{tachyon_name}-%{tachyon_base_version}
 
 %build
 bash $RPM_SOURCE_DIR/do-component-build
@@ -88,15 +89,15 @@ bash %{SOURCE2} \
 for service in %{tachyon_services}
 do
     # Install init script
-    init_file=$RPM_BUILD_ROOT/%{initd_dir}/%{name}-${service}
+    init_file=$RPM_BUILD_ROOT/%{initd_dir}/%{tachyon_name}-${service}
     bash $RPM_SOURCE_DIR/init.d.tmpl $RPM_SOURCE_DIR/tachyon-${service}.svc rpm $init_file
 done
 
 %preun
 for service in %{tachyon_services}; do
-  /sbin/service %{name}-${service} status > /dev/null 2>&1
+  /sbin/service %{tachyon_name}-${service} status > /dev/null 2>&1
   if [ $? -eq 0 ]; then
-    /sbin/service %{name}-${service} stop > /dev/null 2>&1
+    /sbin/service %{tachyon_name}-${service} stop > /dev/null 2>&1
   fi
 done
 
@@ -104,12 +105,12 @@ done
 %files
 %defattr(-,root,root,-)
 %doc LICENSE README.md
-%dir %{_sysconfdir}/%{name}
-%config(noreplace) %{_sysconfdir}/%{name}/conf/log4j.properties
-%config(noreplace) %{_sysconfdir}/%{name}/conf/workers
-%config(noreplace) %{initd_dir}/%{name}-master
-%config(noreplace) %{initd_dir}/%{name}-worker
-%config(noreplace) %{_sysconfdir}/%{name}/conf/tachyon-env.sh
+%dir %{_sysconfdir}/%{tachyon_name}
+%config(noreplace) %{_sysconfdir}/%{tachyon_name}/conf/log4j.properties
+%config(noreplace) %{_sysconfdir}/%{tachyon_name}/conf/workers
+%config(noreplace) %{initd_dir}/%{tachyon_name}-master
+%config(noreplace) %{initd_dir}/%{tachyon_name}-worker
+%config(noreplace) %{_sysconfdir}/%{tachyon_name}/conf/tachyon-env.sh
 %config(noreplace) %{tachyon_home}/libexec/tachyon-layout.sh
 %attr(0755,root,root) %{var_lib}
 %attr(0755,root,root) %{var_run}
@@ -117,7 +118,7 @@ done
 %{tachyon_home}/tachyon*
 %{tachyon_home}/bin/tachyon*
 %{tachyon_home}/libexec/tachyon*
-%{_datadir}/%{name}
+%{_datadir}/%{tachyon_name}
 /usr/bin/tachyon
 %{tachyon_home}/share
 

http://git-wip-us.apache.org/repos/asf/bigtop/blob/f69e8f3d/bigtop.mk
----------------------------------------------------------------------
diff --git a/bigtop.mk b/bigtop.mk
index 870d8f6..8866a05 100644
--- a/bigtop.mk
+++ b/bigtop.mk
@@ -336,9 +336,9 @@ BIGTOP_TOMCAT_ARCHIVE=$(APACHE_ARCHIVE)/tomcat/tomcat-6/v$(BIGTOP_TOMCAT_BASE_VE
 $(eval $(call PACKAGE,bigtop-tomcat,BIGTOP_TOMCAT))
 
 # Tachyon
-TACHYON_NAME=tachyon
+TACHYON_NAME=tachyon-tfs
 TACHYON_RELNOTES_NAME=Tachyon: a memory-centric distributed file system
-TACHYON_PKG_NAME=tachyon
+TACHYON_PKG_NAME=tachyon-tfs
 TACHYON_BASE_VERSION=0.6.0
 TACHYON_PKG_VERSION=0.6.0
 TACHYON_RELEASE_VERSION=1


[2/3] bigtop git commit: BIGTOP-1829. Tachyon configuration files should reside in /etc/tachyon/conf instead of /etc/tachyon

Posted by co...@apache.org.
BIGTOP-1829. Tachyon configuration files should reside in /etc/tachyon/conf instead of /etc/tachyon

Signed-off-by: Konstantin Boudnik <co...@wandisco.com>


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

Branch: refs/heads/master
Commit: 8239a3af0873fdd4e10426f499a7002029e55b25
Parents: 61a3f67
Author: Evans Ye <ev...@apache.org>
Authored: Mon Apr 13 16:14:21 2015 +0000
Committer: Konstantin Boudnik <co...@wandisco.com>
Committed: Fri May 1 16:14:23 2015 -0700

----------------------------------------------------------------------
 bigtop-deploy/puppet/modules/tachyon/manifests/init.pp | 4 ++--
 bigtop-packages/src/common/tachyon/install_tachyon.sh  | 7 ++++---
 bigtop-packages/src/deb/tachyon/tachyon.dirs           | 2 +-
 bigtop-packages/src/deb/tachyon/tachyon.install        | 2 +-
 bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec     | 6 +++---
 5 files changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/8239a3af/bigtop-deploy/puppet/modules/tachyon/manifests/init.pp
----------------------------------------------------------------------
diff --git a/bigtop-deploy/puppet/modules/tachyon/manifests/init.pp b/bigtop-deploy/puppet/modules/tachyon/manifests/init.pp
index 557b05e..2e525fe 100644
--- a/bigtop-deploy/puppet/modules/tachyon/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/tachyon/manifests/init.pp
@@ -17,13 +17,13 @@ class tachyon {
 
     # add logging into /var/log/..
     file {
-        "/etc/tachyon/log4j.properties":
+        "/etc/tachyon/conf/log4j.properties":
         content => template("tachyon/log4j.properties"),
         require => [Package["tachyon"]]
     }
 
     # add tachyon-env.sh to point to tachyon master
-    file { "/etc/tachyon/tachyon-env.sh":
+    file { "/etc/tachyon/conf/tachyon-env.sh":
         content => template("tachyon/tachyon-env.sh"),
         require => [Package["tachyon"]]
     }

http://git-wip-us.apache.org/repos/asf/bigtop/blob/8239a3af/bigtop-packages/src/common/tachyon/install_tachyon.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/tachyon/install_tachyon.sh b/bigtop-packages/src/common/tachyon/install_tachyon.sh
index ef0e102..e9efe37 100644
--- a/bigtop-packages/src/common/tachyon/install_tachyon.sh
+++ b/bigtop-packages/src/common/tachyon/install_tachyon.sh
@@ -102,6 +102,7 @@ install -d -m 0755 $PREFIX/$DATA_DIR
 install -d -m 0755 $PREFIX/$DATA_DIR/tachyon
 install -d -m 0755 $PREFIX/etc
 install -d -m 0755 $PREFIX/etc/tachyon
+install -d -m 0755 $PREFIX/etc/tachyon/conf
 install -d -m 0755 $PREFIX/$VAR_DIR/log/tachyon
 install -d -m 0755 $PREFIX/$VAR_DIR/lib/tachyon/journal
 install -d -m 0755 $PREFIX/$VAR_DIR/lib/tachyon/core/src/main/webapp
@@ -115,8 +116,8 @@ cp -a libexec/* $PREFIX/${LIB_DIR}/libexec
 cp -rf core/src/main/webapp $PREFIX/$VAR_DIR/lib/tachyon/core/src/main
 
 # Copy in the configuration files
-install -m 0644 conf/log4j.properties conf/workers $PREFIX/etc/tachyon
-cp conf/tachyon-env.sh.template  $PREFIX/etc/tachyon/tachyon-env.sh
+install -m 0644 conf/log4j.properties conf/workers $PREFIX/etc/tachyon/conf
+cp conf/tachyon-env.sh.template $PREFIX/etc/tachyon/conf/tachyon-env.sh
 
 # Copy in the /usr/bin/tachyon wrapper
 install -d -m 0755 $PREFIX/$BIN_DIR
@@ -143,7 +144,7 @@ cat >$PREFIX/$LIB_DIR/libexec/tachyon-layout.sh <<EOF
 export TACHYON_SYSTEM_INSTALLATION="TRUE"
 export TACHYON_PREFIX="$LIB_DIR"
 export TACHYON_HOME="/var/lib/tachyon"
-export TACHYON_CONF_DIR="/etc/tachyon"
+export TACHYON_CONF_DIR="/etc/tachyon/conf"
 export TACHYON_LOGS_DIR="/var/log/tachyon"
 export TACHYON_DATA_DIR="/var/run/tachyon"
 export TACHYON_JAR="\`find $LIB_DIR/ -name tachyon*dependencies.jar|grep -v client\`"

http://git-wip-us.apache.org/repos/asf/bigtop/blob/8239a3af/bigtop-packages/src/deb/tachyon/tachyon.dirs
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/tachyon/tachyon.dirs b/bigtop-packages/src/deb/tachyon/tachyon.dirs
index 1216d18..fc644d3 100644
--- a/bigtop-packages/src/deb/tachyon/tachyon.dirs
+++ b/bigtop-packages/src/deb/tachyon/tachyon.dirs
@@ -1,3 +1,3 @@
-/etc/tachyon/
+/etc/tachyon/conf
 /usr/lib/tachyon
 /usr/bin

http://git-wip-us.apache.org/repos/asf/bigtop/blob/8239a3af/bigtop-packages/src/deb/tachyon/tachyon.install
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/tachyon/tachyon.install b/bigtop-packages/src/deb/tachyon/tachyon.install
index 9ee1e55..473e2f5 100644
--- a/bigtop-packages/src/deb/tachyon/tachyon.install
+++ b/bigtop-packages/src/deb/tachyon/tachyon.install
@@ -1,3 +1,3 @@
-/etc/tachyon/
+/etc/tachyon/conf
 /usr/lib/tachyon
 /usr/bin/tachyon

http://git-wip-us.apache.org/repos/asf/bigtop/blob/8239a3af/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec b/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec
index 3b9bc8b..5878f93 100644
--- a/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec
+++ b/bigtop-packages/src/rpm/tachyon/SPECS/tachyon.spec
@@ -105,11 +105,11 @@ done
 %defattr(-,root,root,-)
 %doc LICENSE README.md
 %dir %{_sysconfdir}/%{name}
-%config(noreplace) %{_sysconfdir}/%{name}/log4j.properties
-%config(noreplace) %{_sysconfdir}/%{name}/workers
+%config(noreplace) %{_sysconfdir}/%{name}/conf/log4j.properties
+%config(noreplace) %{_sysconfdir}/%{name}/conf/workers
 %config(noreplace) %{initd_dir}/%{name}-master
 %config(noreplace) %{initd_dir}/%{name}-worker
-%config(noreplace) %{_sysconfdir}/%{name}/tachyon-env.sh
+%config(noreplace) %{_sysconfdir}/%{name}/conf/tachyon-env.sh
 %config(noreplace) %{tachyon_home}/libexec/tachyon-layout.sh
 %attr(0755,root,root) %{var_lib}
 %attr(0755,root,root) %{var_run}