bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mackror...@apache.org
Subject git commit: BIGTOP-939. Make usage of bigtop-tomcat more dynamic
Date Mon, 16 Sep 2013 16:24:49 GMT
Updated Branches:
  refs/heads/master 4f875876f -> eff304c71


BIGTOP-939. Make usage of bigtop-tomcat more dynamic


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

Branch: refs/heads/master
Commit: eff304c719902174a909fc2a69ab19fbfc2214ce
Parents: 4f87587
Author: Sean Mackrory <mackrorysd@gmail.com>
Authored: Mon Sep 16 08:55:08 2013 -0700
Committer: Sean Mackrory <mackrorysd@gmail.com>
Committed: Mon Sep 16 08:55:08 2013 -0700

----------------------------------------------------------------------
 .../src/common/hadoop/hadoop-httpfs.svc         | 21 ++++++++++++-
 .../src/common/hadoop/httpfs.default            |  2 +-
 .../src/common/hadoop/install_hadoop.sh         |  8 +++--
 .../src/common/oozie/install_oozie.sh           | 30 +++++++++---------
 bigtop-packages/src/common/oozie/oozie-env.sh   |  2 +-
 bigtop-packages/src/common/oozie/oozie.init     |  9 ++++++
 bigtop-packages/src/common/solr/install_solr.sh | 32 ++++++++++----------
 .../src/common/solr/solr-server.init.debian     | 10 ++++++
 .../src/common/sqoop/install_sqoop.sh           | 14 ++++-----
 .../src/common/sqoop/sqoop-server.sh            | 14 ++++++++-
 bigtop-packages/src/common/sqoop/sqoop.default  |  3 +-
 .../src/deb/hadoop/hadoop-httpfs.install        |  1 +
 bigtop-packages/src/deb/oozie/oozie.postinst    |  9 +++++-
 bigtop-packages/src/deb/oozie/rules             |  3 --
 bigtop-packages/src/deb/sqoop/sqoop.install     |  1 -
 .../src/rpm/hadoop/SPECS/hadoop.spec            |  2 ++
 bigtop-packages/src/rpm/oozie/SPECS/oozie.spec  | 16 +++++-----
 .../src/rpm/solr/SOURCES/solr-server.init       | 10 ++++++
 bigtop-packages/src/rpm/sqoop/SPECS/sqoop.spec  |  1 -
 19 files changed, 127 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/common/hadoop/hadoop-httpfs.svc
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hadoop/hadoop-httpfs.svc b/bigtop-packages/src/common/hadoop/hadoop-httpfs.svc
index de4d6d2..73a41e6 100644
--- a/bigtop-packages/src/common/hadoop/hadoop-httpfs.svc
+++ b/bigtop-packages/src/common/hadoop/hadoop-httpfs.svc
@@ -25,6 +25,23 @@ PIDFILE="/var/run/$DAEMON/hadoop-$SVC_USER-$HADOOP_NAME.pid"
 CHKCONFIG=${CHKCONFIG:-"2345 90 10"}
 CHKCONFIG="${CHKCONFIG%% *} 90 10"
 
+generate_functions() {
+
+cat <<'__EOT__'
+tomcat_deployment() {
+  DEPLOYMENT_SOURCE=/etc/hadoop-httpfs/conf/tomcat-deployment
+  DEPLOYMENT_TARGET=/var/lib/hadoop-httpfs/tomcat-deployment
+
+  rm -r ${DEPLOYMENT_TARGET}
+  cp -r ${DEPLOYMENT_SOURCE} ${DEPLOYMENT_TARGET}
+  ln -s /usr/lib/hadoop-httpfs/webapps ${DEPLOYMENT_TARGET}/
+  chown -R ${SVC_USER}:${SVC_USER} ${DEPLOYMENT_TARGET}
+  chmod -R 755 ${DEPLOYMENT_TARGET}
+}
+__EOT__
+
+}
+
 generate_start() {
 
 cat <<'__EOT__'
@@ -38,10 +55,12 @@ start() {
   export HTTPFS_LOG=${HTTPFS_LOG:-"/var/log/hadoop-httpfs/"}
   export HTTPFS_TEMP="$(dirname $PIDFILE)"
   export HTTPFS_SLEEP_TIME="$SLEEP_TIME"
-  export CATALINA_BASE=${CATALINA_BASE:-"/usr/lib/hadoop-httpfs"}
+  export CATALINA_BASE=${CATALINA_BASE:-"/var/lib/hadoop-httpfs/tomcat-deployment"}
   export CATALINA_PID="$PIDFILE"
   export CATALINA_TMPDIR="$HTTPFS_TEMP"
 
+  tomcat_deployment
+
   su -s /bin/bash -c "${EXEC_PATH} start $DAEMON_FLAGS" $HTTPFS_USER
 
   for second in {5..0}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/common/hadoop/httpfs.default
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hadoop/httpfs.default b/bigtop-packages/src/common/hadoop/httpfs.default
index e48e608..86822c2 100644
--- a/bigtop-packages/src/common/hadoop/httpfs.default
+++ b/bigtop-packages/src/common/hadoop/httpfs.default
@@ -18,7 +18,7 @@ export HTTPFS_LOG=/var/log/hadoop-httpfs/
 export HTTPFS_TEMP=/var/run/hadoop-httpfs/
 export HTTPFS_CATALINA_HOME=/usr/lib/bigtop-tomcat
 export CATALINA_PID=/var/run/hadoop-httpfs/hadoop-httpfs-httpfs.pid
-export CATALINA_BASE=/usr/lib/hadoop-httpfs
+export CATALINA_BASE=/var/lib/hadoop-httpfs/tomcat-deployment
 export CATALINA_TMPDIR=/var/run/hadoop-httpfs/
 # HTTPFS_HTTP_PORT
 # HTTPFS_ADMIN_PORT

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/common/hadoop/install_hadoop.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hadoop/install_hadoop.sh b/bigtop-packages/src/common/hadoop/install_hadoop.sh
index 7196564..8e2a07d 100755
--- a/bigtop-packages/src/common/hadoop/install_hadoop.sh
+++ b/bigtop-packages/src/common/hadoop/install_hadoop.sh
@@ -311,10 +311,12 @@ chmod 644 $MAN_DIR/man1/hadoop.1.gz
 # HTTPFS
 install -d -m 0755 ${HTTPFS_DIR}/sbin
 cp ${BUILD_DIR}/sbin/httpfs.sh ${HTTPFS_DIR}/sbin/
-cp -r ${BUILD_DIR}/share/hadoop/httpfs/tomcat/webapps ${HTTPFS_DIR}/
-cp -r ${BUILD_DIR}/share/hadoop/httpfs/tomcat/conf ${HTTPFS_DIR}/
-chmod 644 ${HTTPFS_DIR}/conf/*
+cp -r ${BUILD_DIR}/share/hadoop/httpfs/tomcat/webapps ${HTTPFS_DIR}/webapps
+install -d -m 0755 ${PREFIX}/var/lib/hadoop-httpfs
 install -d -m 0755 $HTTPFS_ETC_DIR/conf.empty
+install -d -m 0755 $HTTPFS_ETC_DIR/conf.empty/tomcat-deployment
+cp -r ${BUILD_DIR}/share/hadoop/httpfs/tomcat/conf $HTTPFS_ETC_DIR/conf.empty/tomcat-deployment/
+chmod 644 $HTTPFS_ETC_DIR/conf.empty/tomcat-deployment/conf/*
 mv $HADOOP_ETC_DIR/conf.empty/httpfs* $HTTPFS_ETC_DIR/conf.empty
 sed -i -e '/<\/configuration>/i\
   <!-- HUE proxy user setting -->\

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/common/oozie/install_oozie.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/oozie/install_oozie.sh b/bigtop-packages/src/common/oozie/install_oozie.sh
index 3d99cfe..8ccdc43 100755
--- a/bigtop-packages/src/common/oozie/install_oozie.sh
+++ b/bigtop-packages/src/common/oozie/install_oozie.sh
@@ -170,9 +170,10 @@ if [ "${INITD_DIR}" != "" ]; then
   chmod 755 ${INITD_DIR}/oozie
 fi
 cp -R ${BUILD_DIR}/oozie-sharelib*.tar.gz ${SERVER_LIB_DIR}/oozie-sharelib.tar.gz
-cp -R ${BUILD_DIR}/oozie-server/webapps ${SERVER_LIB_DIR}/webapps
 ln -s -f /etc/oozie/conf/oozie-env.sh ${SERVER_LIB_DIR}/bin
 
+cp -R ${BUILD_DIR}/oozie-server/webapps ${SERVER_LIB_DIR}/webapps
+
 # Unpack oozie.war some place reasonable
 WEBAPP_DIR=${SERVER_LIB_DIR}/webapps/oozie
 mkdir ${WEBAPP_DIR}
@@ -180,6 +181,18 @@ mkdir ${WEBAPP_DIR}
 mv -f ${WEBAPP_DIR}/WEB-INF/lib ${SERVER_LIB_DIR}/libserver
 touch ${SERVER_LIB_DIR}/webapps/oozie.war
 
+DEFAULT_DIRECTORY=${CONF_DIR}/tomcat-deployment.default
+install -d -m 0755 ${DEFAULT_DIRECTORY}
+cp -R ${BUILD_DIR}/oozie-server/conf ${DEFAULT_DIRECTORY}/conf
+cp ${EXTRA_DIR}/context.xml ${DEFAULT_DIRECTORY}/conf/
+cp ${EXTRA_DIR}/catalina.properties ${DEFAULT_DIRECTORY}/conf/
+mv ${SERVER_LIB_DIR}/webapps/oozie/WEB-INF ${DEFAULT_DIRECTORY}/WEB-INF
+
+SECURE_DIRECTORY=${CONF_DIR}/tomcat-deployment.secure
+cp -r ${DEFAULT_DIRECTORY} ${SECURE_DIRECTORY}
+cp ${SECURE_DIRECTORY}/conf/ssl/ssl-server.xml ${SECURE_DIRECTORY}/conf/server.xml
+cp ${BUILD_DIR}/oozie-server/conf/ssl/ssl-web.xml ${SECURE_DIRECTORY}/WEB-INF/web.xml
+
 # Create all the jars needed for tools execution
 install -d -m 0755 ${SERVER_LIB_DIR}/libtools
 for i in `cd ${BUILD_DIR}/libtools ; ls *` ; do
@@ -190,21 +203,6 @@ for i in `cd ${BUILD_DIR}/libtools ; ls *` ; do
   fi
 done
 
-# Create an exploded-war oozie deployment in /usr/lib/oozie
-install -d -m 0755 ${SERVER_LIB_DIR}/oozie-server
-cp -R ${BUILD_DIR}/oozie-server/conf ${SERVER_LIB_DIR}/oozie-server/conf
-cp ${EXTRA_DIR}/context.xml ${SERVER_LIB_DIR}/oozie-server/conf/
-cp ${EXTRA_DIR}/catalina.properties ${SERVER_LIB_DIR}/oozie-server/conf/
-ln -s ../webapps ${SERVER_LIB_DIR}/oozie-server/webapps
-
 # Provide a convenience symlink to be more consistent with tarball deployment
 ln -s ${DATA_DIR#${SERVER_PREFIX}} ${SERVER_LIB_DIR}/libext
 
-# Create an exploded-war oozie deployment in /usr/lib/oozie/oozie-server-ssl for SSL
-cp -r ${SERVER_LIB_DIR}/oozie-server ${SERVER_LIB_DIR}/oozie-server-ssl
-cp -r ${SERVER_LIB_DIR}/webapps ${SERVER_LIB_DIR}/webapps-ssl
-rm -r ${SERVER_LIB_DIR}/oozie-server-ssl/webapps
-ln -s ../webapps-ssl ${SERVER_LIB_DIR}/oozie-server-ssl/webapps
-cp ${BUILD_DIR}/oozie-server/conf/ssl/ssl-server.xml ${SERVER_LIB_DIR}/oozie-server-ssl/conf/server.xml
-cp ${BUILD_DIR}/oozie-server/conf/ssl/ssl-web.xml ${SERVER_LIB_DIR}/webapps-ssl/oozie/WEB-INF/web.xml
-

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/common/oozie/oozie-env.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/oozie/oozie-env.sh b/bigtop-packages/src/common/oozie/oozie-env.sh
index dd051f7..f6f5dad 100755
--- a/bigtop-packages/src/common/oozie/oozie-env.sh
+++ b/bigtop-packages/src/common/oozie/oozie-env.sh
@@ -21,4 +21,4 @@ export OOZIE_LOG=/var/log/oozie
 export OOZIE_CATALINA_HOME=/usr/lib/bigtop-tomcat
 export CATALINA_TMPDIR=/var/lib/oozie
 export CATALINA_PID=/var/run/oozie/oozie.pid
-export CATALINA_BASE=/usr/lib/oozie/oozie-server
+export CATALINA_BASE=/var/lib/oozie/tomcat-deployment

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/common/oozie/oozie.init
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/oozie/oozie.init b/bigtop-packages/src/common/oozie/oozie.init
index 5cab7a3..fd1bd78 100644
--- a/bigtop-packages/src/common/oozie/oozie.init
+++ b/bigtop-packages/src/common/oozie/oozie.init
@@ -47,7 +47,16 @@ is_oozie_alive() {
   fi
 }
 
+tomcat_deployment() {
+  DEPLOYMENT_SOURCE=/etc/oozie/conf/tomcat-deployment
+  DEPLOYMENT_TARGET=/var/lib/oozie/tomcat-deployment
+
+  rm -rf ${DEPLOYMENT_TARGET}
+  cp -r ${DEPLOYMENT_SOURCE} ${DEPLOYMENT_TARGET}
+}
+
 start_oozie() {
+  tomcat_deployment
   install -d -o oozie -g oozie /var/run/oozie
   install -d -o oozie -g oozie /var/log/oozie
   install -d -o oozie -g oozie /var/tmp/oozie

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/common/solr/install_solr.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/solr/install_solr.sh b/bigtop-packages/src/common/solr/install_solr.sh
index 9ff6046..732e820 100644
--- a/bigtop-packages/src/common/solr/install_solr.sh
+++ b/bigtop-packages/src/common/solr/install_solr.sh
@@ -115,18 +115,25 @@ cp -ra ${BUILD_DIR}/dist/solrj-lib $PREFIX/$LIB_DIR/lib
 install -d -m 0755 $PREFIX/$LIB_DIR/contrib
 cp -ra ${BUILD_DIR}/contrib/velocity $PREFIX/$LIB_DIR/contrib
 
-install -d -m 0755 $PREFIX/$LIB_DIR/server/webapps/solr
-(cd $PREFIX/$LIB_DIR/server/webapps/solr ; jar xf ../../../*.war)
+# Copy in the configuration files
+install -d -m 0755 $PREFIX/$DEFAULT_DIR
+cp $DISTRO_DIR/solr.default $PREFIX/$DEFAULT_DIR/solr
+
+install -d -m 0755 $PREFIX/${CONF_DIR}.dist
+cp -ra ${BUILD_DIR}/example/solr/* $PREFIX/${CONF_DIR}.dist
+
+install -d -m 0755 $PREFIX/$LIB_DIR/webapps/solr
+(cd $PREFIX/$LIB_DIR/webapps/solr ; jar xf ../../*.war)
 
-install -d -m 0755 $PREFIX/$LIB_DIR/server/webapps/ROOT
-cat > $PREFIX/$LIB_DIR/server/webapps/ROOT/index.html <<__EOT__
+install -d -m 0755 $PREFIX/$LIB_DIR/webapps/ROOT
+cat > $PREFIX/$LIB_DIR/webapps/ROOT/index.html <<__EOT__
 <html><head><meta http-equiv="refresh" content="0;url=./solr"></head><body><a
href="/solr">Solr Console</a></body></html>
 __EOT__
 
-install -d -m 0755 $PREFIX/$LIB_DIR/server/conf
-cp $DISTRO_DIR/web.xml $PREFIX/$LIB_DIR/server/conf
-cp $DISTRO_DIR/server.xml $PREFIX/$LIB_DIR/server/conf
-cp $DISTRO_DIR/logging.properties $PREFIX/$LIB_DIR/server/conf
+install -d -m 0755 $PREFIX/${CONF_DIR}.dist/tomcat-deployment/conf
+cp $DISTRO_DIR/web.xml $PREFIX/${CONF_DIR}.dist/tomcat-deployment/conf
+cp $DISTRO_DIR/server.xml $PREFIX/${CONF_DIR}.dist/tomcat-deployment/conf
+cp $DISTRO_DIR/logging.properties $PREFIX/${CONF_DIR}.dist/tomcat-deployment/conf
 
 cp -ra ${BUILD_DIR}/dist/*.*ar $PREFIX/$LIB_DIR
 cp -ra ${BUILD_DIR}/dist/solrj-lib $PREFIX/$LIB_DIR/lib
@@ -139,13 +146,6 @@ cp -a  ${BUILD_DIR}/*.txt $PREFIX/$DOC_DIR
 cp -ra ${BUILD_DIR}/docs/* $PREFIX/$DOC_DIR
 cp -ra ${BUILD_DIR}/example/ $PREFIX/$DOC_DIR/
 
-# Copy in the configuration files
-install -d -m 0755 $PREFIX/$DEFAULT_DIR
-cp $DISTRO_DIR/solr.default $PREFIX/$DEFAULT_DIR/solr
-
-install -d -m 0755 $PREFIX/${CONF_DIR}.dist
-cp -ra ${BUILD_DIR}/example/solr/* $PREFIX/${CONF_DIR}.dist
-
 # Copy in the wrapper
 cat > $PREFIX/$LIB_DIR/bin/solrd <<EOF
 #!/bin/bash
@@ -157,7 +157,7 @@ BIGTOP_DEFAULTS_DIR=${BIGTOP_DEFAULTS_DIR-/etc/default}
 . /usr/lib/bigtop-utils/bigtop-detect-javahome
 
 export CATALINA_HOME=$LIB_DIR/../bigtop-tomcat
-export CATALINA_BASE=$LIB_DIR/server
+export CATALINA_BASE=/var/lib/solr/tomcat-deployment
 
 export CATALINA_TMPDIR=\${SOLR_DATA:-/var/lib/solr/}temp
 export CATALINA_PID=\${SOLR_RUN:-/var/run/solr/}solr.pid

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/common/solr/solr-server.init.debian
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/solr/solr-server.init.debian b/bigtop-packages/src/common/solr/solr-server.init.debian
index 5b8b862..6671e19 100644
--- a/bigtop-packages/src/common/solr/solr-server.init.debian
+++ b/bigtop-packages/src/common/solr/solr-server.init.debian
@@ -59,6 +59,15 @@ done
 
 SOLR_SHUTDOWN_TIMEOUT=${SOLR_SHUTDOWN_TIMEOUT:-60}
 
+tomcat_deployment() {
+  DEPLOYMENT_SOURCE=/etc/solr/conf/tomcat-deployment
+  DEPLOYMENT_TARGET=/var/lib/solr/tomcat-deployment
+
+  rm -r ${DEPLOYMENT_TARGET}
+  cp -r ${DEPLOYMENT_SOURCE} ${DEPLOYMENT_TARGET}
+  ln -s ${SOLR_HOME}/webapps ${DEPLOYMENT_TARGET}/
+}
+
 start() {
   [ -x $exec ] || exit $ERROR_PROGRAM_NOT_INSTALLED
 
@@ -69,6 +78,7 @@ start() {
   fi
 
   log_success_msg "Starting $desc: "
+  tomcat_deployment
   /bin/su -s /bin/bash -c "${EXEC_PATH} start" $SOLR_USER
   RETVAL=$?
   [ $RETVAL -eq 0 ] && touch $LOCKFILE

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/common/sqoop/install_sqoop.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/sqoop/install_sqoop.sh b/bigtop-packages/src/common/sqoop/install_sqoop.sh
index c7a9e98..ba79156 100755
--- a/bigtop-packages/src/common/sqoop/install_sqoop.sh
+++ b/bigtop-packages/src/common/sqoop/install_sqoop.sh
@@ -118,7 +118,6 @@ BIN_DIR=${BIN_DIR:-/usr/lib/sqoop/bin}
 ETC_DIR=${ETC_DIR:-/etc/sqoop}
 MAN_DIR=${MAN_DIR:-/usr/share/man/man1}
 CONF_DIR=${CONF_DIR:-${ETC_DIR}/conf.dist}
-WEB_DIR=${WEB_DIR:-/usr/lib/sqoop/sqoop-server}
 INITD_DIR=${INITD_DIR:-/etc/init.d}
 DIST_DIR=${DIST_DIR:-dist/target/sqoop-*}
 
@@ -147,16 +146,15 @@ cp -r ${DIST_DIR}/server/webapps $SQOOP_WEBAPPS
 unzip -d $SQOOP_WEBAPPS/sqoop $SQOOP_WEBAPPS/sqoop.war
 
 # Create MR2 configuration
-install -d -m 0755 ${PREFIX}/${LIB_DIR}/sqoop-server/conf
+DEPLOYMENT_DIR=/etc/sqoop/conf.dist/tomcat-deployment
+install -d -m 0755 ${PREFIX}/${DEPLOYMENT_DIR}/conf
 for conf in web.xml tomcat-users.xml server.xml logging.properties context.xml catalina.policy
 do
-    install -m 0644 ${DIST_DIR}/server/conf/$conf ${PREFIX}/${LIB_DIR}/sqoop-server/conf/
+    install -m 0644 ${DIST_DIR}/server/conf/$conf ${PREFIX}/${DEPLOYMENT_DIR}/conf/
 done
-sed -i -e "s|<Host |<Host workDir=\"/var/tmp/sqoop\" |" ${PREFIX}/${LIB_DIR}/sqoop-server/conf/server.xml
-sed -i -e "s|\${catalina\.base}/logs|/var/log/sqoop|"   ${PREFIX}/${LIB_DIR}/sqoop-server/conf/logging.properties
-cp -f ${EXTRA_DIR}/catalina.properties ${PREFIX}/${LIB_DIR}/sqoop-server/conf/catalina.properties
-ln -s ../webapps ${PREFIX}/${LIB_DIR}/sqoop-server/webapps
-ln -s ../bin ${PREFIX}/${LIB_DIR}/sqoop-server/bin
+sed -i -e "s|<Host |<Host workDir=\"/var/tmp/sqoop\" |" ${PREFIX}/${DEPLOYMENT_DIR}/conf/server.xml
+sed -i -e "s|\${catalina\.base}/logs|/var/log/sqoop|"   ${PREFIX}/${DEPLOYMENT_DIR}/conf/logging.properties
+cp -f ${EXTRA_DIR}/catalina.properties ${PREFIX}/${DEPLOYMENT_DIR}/conf/catalina.properties
 
 # Create wrapper scripts for the client and server
 client_wrapper=$PREFIX/usr/bin/sqoop

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/common/sqoop/sqoop-server.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/sqoop/sqoop-server.sh b/bigtop-packages/src/common/sqoop/sqoop-server.sh
index dc3b6aa..ec825b2 100644
--- a/bigtop-packages/src/common/sqoop/sqoop-server.sh
+++ b/bigtop-packages/src/common/sqoop/sqoop-server.sh
@@ -15,6 +15,16 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+tomcat_deployment() {
+  DEPLOYMENT_SOURCE=/etc/sqoop/conf/tomcat-deployment
+  DEPLOYMENT_TARGET=/var/lib/sqoop/tomcat-deployment
+
+  rm -rf ${DEPLOYMENT_TARGET}
+  cp -r ${DEPLOYMENT_SOURCE} ${DEPLOYMENT_TARGET}
+  ln -s ${SQOOP_HOME}/webapps ${DEPLOYMENT_TARGET}/
+  ln -s ${SQOOP_HOME}/bin ${DEPLOYMENT_TARGET}/
+}
+
 # Autodetect JAVA_HOME if not defined
 . /usr/lib/bigtop-utils/bigtop-detect-javahome
 
@@ -23,8 +33,10 @@ LIB_DIR=${LIB_DIR:-/usr/lib}
 SQOOP_HOME=${LIB_DIR}/sqoop
 TOMCAT_HOME=${LIB_DIR}/bigtop-tomcat
 
+tomcat_deployment
+
 export CATALINA_BIN=${CATALINA_BIN:-${TOMCAT_HOME}/bin}
-export CATALINA_BASE=${CATALINA_BASE:-${SQOOP_HOME}/sqoop-server}
+export CATALINA_BASE=${CATALINA_BASE:-${DEPLOYMENT_TARGET}}
 export CATALINA_OPTS=${CATALINA_OPTS:--Xmx1024m}
 export CATALINA_OUT=${CATALINE_OUT:-/var/log/sqoop/sqoop-tomcat.log}
 

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/common/sqoop/sqoop.default
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/sqoop/sqoop.default b/bigtop-packages/src/common/sqoop/sqoop.default
index cdec81c..e05da14 100644
--- a/bigtop-packages/src/common/sqoop/sqoop.default
+++ b/bigtop-packages/src/common/sqoop/sqoop.default
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-CATALINA_BASE=/usr/lib/sqoop/sqoop-server
+CATALINA_BASE=/var/lib/sqoop/tomcat-deployment
 SQOOP_USER=sqoop
 SQOOP_CONFIG=/etc/sqoop/conf
 SQOOP_LOG=/var/log/sqoop
@@ -23,3 +23,4 @@ CATALINA_BIN=/usr/lib/bigtop-tomcat/bin
 CATALINA_TMPDIR=/var/tmp/sqoop
 CATALINA_OPTS=-Xmx1024m
 CATALINA_OUT=/var/log/sqoop/sqoop-tomcat.log
+#AUX_CLASSPATH=

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/deb/hadoop/hadoop-httpfs.install
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hadoop/hadoop-httpfs.install b/bigtop-packages/src/deb/hadoop/hadoop-httpfs.install
index fe1a462..a594bc0 100644
--- a/bigtop-packages/src/deb/hadoop/hadoop-httpfs.install
+++ b/bigtop-packages/src/deb/hadoop/hadoop-httpfs.install
@@ -2,3 +2,4 @@
 /etc/hadoop-httpfs
 /usr/lib/hadoop/libexec/httpfs-config.sh
 /usr/lib/hadoop-httpfs
+/var/lib/hadoop-httpfs

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/deb/oozie/oozie.postinst
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/oozie/oozie.postinst b/bigtop-packages/src/deb/oozie/oozie.postinst
index 571d7a1..11be70b 100644
--- a/bigtop-packages/src/deb/oozie/oozie.postinst
+++ b/bigtop-packages/src/deb/oozie/oozie.postinst
@@ -39,7 +39,14 @@ case "$1" in
         chown -R oozie:oozie /var/lib/oozie /var/log/oozie
         update-rc.d oozie defaults >/dev/null || exit 1
 
-        update-alternatives  --install /etc/oozie/conf oozie-conf /etc/oozie/conf.dist 30
+        update-alternatives --install /etc/oozie/conf oozie-conf /etc/oozie/conf.dist 30
+
+        conf_tomcat=/etc/oozie/conf/tomcat-deployment
+        ln -s /usr/lib/oozie/webapps ${conf_tomcat}.default/
+        ln -s /usr/lib/oozie/webapps ${conf_tomcat}.secure/
+        update-alternatives --install ${conf_tomcat} oozie-tomcat-conf ${conf_tomcat}.default
30
+        update-alternatives --install ${conf_tomcat} oozie-tomcat-conf ${conf_tomcat}.secure
20
+        ln -s /var/lib/oozie/tomcat-deployment/WEB-INF /usr/lib/oozie/webapps/oozie/WEB-INF
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/deb/oozie/rules
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/oozie/rules b/bigtop-packages/src/deb/oozie/rules
index bb1e6c0..531aeb2 100755
--- a/bigtop-packages/src/deb/oozie/rules
+++ b/bigtop-packages/src/deb/oozie/rules
@@ -40,6 +40,3 @@ override_dh_auto_install:
 	ln -s -f /var/lib/oozie/ext-2.2 debian/oozie/usr/lib/oozie/webapps/oozie/ext-2.2
 	rm -rf                        debian/oozie/usr/lib/oozie/webapps/oozie/docs
 	ln -s -f /usr/share/doc/oozie debian/oozie/usr/lib/oozie/webapps/oozie/docs
-	ln -s -f /var/lib/oozie/ext-2.2 debian/oozie/usr/lib/oozie/webapps-ssl/oozie/ext-2.2
-	rm -rf                        debian/oozie/usr/lib/oozie/webapps-ssl/oozie/docs
-	ln -s -f /usr/share/doc/oozie debian/oozie/usr/lib/oozie/webapps-ssl/oozie/docs

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/deb/sqoop/sqoop.install
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/sqoop/sqoop.install b/bigtop-packages/src/deb/sqoop/sqoop.install
index 0386c7a..1bd82b3 100644
--- a/bigtop-packages/src/deb/sqoop/sqoop.install
+++ b/bigtop-packages/src/deb/sqoop/sqoop.install
@@ -2,6 +2,5 @@
 /etc/sqoop/conf.dist
 /etc/default/sqoop-server
 /usr/lib/sqoop/bin/setenv.sh
-/usr/lib/sqoop/sqoop-server
 /usr/lib/sqoop/webapps
 /var/lib/sqoop

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec b/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
index f2fdd4d..377456e 100644
--- a/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
+++ b/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
@@ -51,6 +51,7 @@
 %define state_yarn %{state_hadoop_dirname}/%{name}-yarn
 %define state_hdfs %{state_hadoop_dirname}/%{name}-hdfs
 %define state_mapreduce %{state_hadoop_dirname}/%{name}-mapreduce
+%define state_httpfs %{state_hadoop_dirname}/%{name}-httpfs
 %define bin_hadoop %{_bindir}
 %define man_hadoop %{_mandir}
 %define doc_hadoop %{_docdir}/%{name}-%{hadoop_version}
@@ -648,6 +649,7 @@ fi
 %{lib_httpfs}
 %attr(0775,httpfs,httpfs) %{run_httpfs}
 %attr(0775,httpfs,httpfs) %{log_httpfs}
+%attr(0775,httpfs,httpfs) %{state_httpfs}
 
 # Service file management RPMs
 %define service_macro() \

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec b/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec
index cc4223c..a546eb7 100644
--- a/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec
+++ b/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec
@@ -17,6 +17,7 @@
 %define man_dir /usr/share/man
 %define conf_oozie %{_sysconfdir}/%{name}/conf
 %define conf_oozie_dist %{conf_oozie}.dist
+%define conf_tomcat %{conf_oozie}/tomcat-deployment
 %define data_oozie /var/lib/oozie
 
 %if  %{!?suse_version:1}0
@@ -142,10 +143,6 @@ Requires: bigtop-utils >= 0.7
 %__ln_s -f %{data_oozie}/ext-2.2 $RPM_BUILD_ROOT/%{lib_oozie}/webapps/oozie/ext-2.2
 %__rm  -rf              $RPM_BUILD_ROOT/%{lib_oozie}/webapps/oozie/docs
 %__ln_s -f %{doc_oozie} $RPM_BUILD_ROOT/%{lib_oozie}/webapps/oozie/docs
-%__ln_s -f %{data_oozie}/ext-2.2 $RPM_BUILD_ROOT/%{lib_oozie}/webapps-ssl/oozie/ext-2.2
-%__rm  -rf              $RPM_BUILD_ROOT/%{lib_oozie}/webapps-ssl/oozie/docs
-%__ln_s -f %{doc_oozie} $RPM_BUILD_ROOT/%{lib_oozie}/webapps-ssl/oozie/docs
-
 
 %__install -d -m 0755 $RPM_BUILD_ROOT/usr/bin
 
@@ -158,10 +155,18 @@ getent passwd oozie >/dev/null || /usr/sbin/useradd --comment "Oozie
User" --she
 
 %post 
 %{alternatives_cmd} --install %{conf_oozie} %{name}-conf %{conf_oozie_dist} 30
+
+ln -s /usr/lib/oozie/webapps %{conf_tomcat}.default/
+ln -s /usr/lib/oozie/webapps %{conf_tomcat}.secure/
+%{alternatives_cmd} --install %{conf_tomcat} %{name}-tomcat-conf %{conf_tomcat}.default 30
+%{alternatives_cmd} --install %{conf_tomcat} %{name}-tomcat-conf %{conf_tomcat}.secure 20
+ln -s /var/lib/oozie/tomcat-deployment/WEB-INF %{lib_oozie}/webapps/oozie/WEB-INF
+
 /sbin/chkconfig --add oozie 
 
 %preun
 if [ "$1" = 0 ]; then
+  rm /etc/oozie/conf/tomcat-deployment
   /sbin/service oozie stop > /dev/null
   /sbin/chkconfig --del oozie
   %{alternatives_cmd} --remove %{name}-conf %{conf_oozie_dist} || :
@@ -180,12 +185,9 @@ fi
 %{lib_oozie}/bin/oozied.sh
 %{lib_oozie}/bin/ooziedb.sh
 %{lib_oozie}/webapps
-%{lib_oozie}/webapps-ssl
 %{lib_oozie}/libtools
 %{lib_oozie}/libserver
 %{lib_oozie}/oozie-sharelib.tar.gz
-%{lib_oozie}/oozie-server
-%{lib_oozie}/oozie-server-ssl
 %{lib_oozie}/libext
 %{initd_dir}/oozie
 %defattr(-, oozie, oozie)

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/rpm/solr/SOURCES/solr-server.init
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/solr/SOURCES/solr-server.init b/bigtop-packages/src/rpm/solr/SOURCES/solr-server.init
index 6d1a035..f2cd481 100644
--- a/bigtop-packages/src/rpm/solr/SOURCES/solr-server.init
+++ b/bigtop-packages/src/rpm/solr/SOURCES/solr-server.init
@@ -59,6 +59,15 @@ done
 
 SOLR_SHUTDOWN_TIMEOUT=${SOLR_SHUTDOWN_TIMEOUT:-60}
 
+tomcat_deployment() {
+  DEPLOYMENT_SOURCE=/etc/solr/conf/tomcat-deployment
+  DEPLOYMENT_TARGET=/var/lib/solr/tomcat-deployment
+
+  rm -r ${DEPLOYMENT_TARGET}
+  cp -r ${DEPLOYMENT_SOURCE} ${DEPLOYMENT_TARGET}
+  ln -s ${SOLR_HOME}/webapps ${DEPLOYMENT_TARGET}/
+}
+
 start() {
   [ -x $exec ] || exit $ERROR_PROGRAM_NOT_INSTALLED
 
@@ -69,6 +78,7 @@ start() {
   fi
 
   log_success_msg "Starting $desc: "
+  tomcat_deployment
   /bin/su -s /bin/bash -c "${EXEC_PATH} start" $SOLR_USER
   RETVAL=$?
   [ $RETVAL -eq 0 ] && touch $LOCKFILE

http://git-wip-us.apache.org/repos/asf/bigtop/blob/eff304c7/bigtop-packages/src/rpm/sqoop/SPECS/sqoop.spec
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/sqoop/SPECS/sqoop.spec b/bigtop-packages/src/rpm/sqoop/SPECS/sqoop.spec
index 2d1b6aa..0abe0ae 100644
--- a/bigtop-packages/src/rpm/sqoop/SPECS/sqoop.spec
+++ b/bigtop-packages/src/rpm/sqoop/SPECS/sqoop.spec
@@ -169,7 +169,6 @@ fi
 /usr/bin/sqoop-server
 %config(noreplace) /etc/sqoop/conf.dist
 %config(noreplace) /etc/default/sqoop-server
-%{lib_sqoop}/sqoop-server
 %{lib_sqoop}/webapps
 %{lib_sqoop}/bin/setenv.sh
 %defattr(0755,sqoop,sqoop)


Mime
View raw message