Author: rvs Date: Wed Mar 14 21:47:13 2012 New Revision: 1300740 URL: http://svn.apache.org/viewvc?rev=1300740&view=rev Log: BIGTOP-450. repackage Oozie as a true webapp
Added: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/catalina.properties (with props) incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/context.xml (with props) Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/install_oozie.sh incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/oozie-env.sh incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/patch incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/oozie/rules incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec Added: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/catalina.properties URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/catalina.properties?rev=1300740&view=auto ============================================================================== --- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/catalina.properties (added) +++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/catalina.properties Wed Mar 14 21:47:13 2012 @@ -0,0 +1,81 @@ +# 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. + +# +# List of comma-separated packages that start with or equal this string +# will cause a security exception to be thrown when +# passed to checkPackageAccess unless the +# corresponding RuntimePermission ("accessClassInPackage."+package) has +# been granted. +package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans. +# +# List of comma-separated packages that start with or equal this string +# will cause a security exception to be thrown when +# passed to checkPackageDefinition unless the +# corresponding RuntimePermission ("defineClassInPackage."+package) has +# been granted. +# +# by default, no packages are restricted for definition, and none of +# the class loaders supplied with the JDK call checkPackageDefinition. +# +package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper. + +# +# +# List of comma-separated paths defining the contents of the "common" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. +# If left as blank,the JVM system loader will be used as Catalina's "common" +# loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +common.loader=/var/lib/oozie/hadoop-client/*.jar,/usr/lib/oozie/server-core/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar + +# +# List of comma-separated paths defining the contents of the "server" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. +# If left as blank, the "common" loader will be used as Catalina's "server" +# loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +server.loader= + +# +# List of comma-separated paths defining the contents of the "shared" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_BASE path or absolute. If left as blank, +# the "common" loader will be used as Catalina's "shared" loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +# Please note that for single jars, e.g. bar.jar, you need the URL form +# starting with file:. +shared.loader= + +# +# String cache configuration. +tomcat.util.buf.StringCache.byte.enabled=true +#tomcat.util.buf.StringCache.char.enabled=true +#tomcat.util.buf.StringCache.trainThreshold=500000 +#tomcat.util.buf.StringCache.cacheSize=5000 Propchange: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/catalina.properties ------------------------------------------------------------------------------ svn:executable = * Added: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/context.xml URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/context.xml?rev=1300740&view=auto ============================================================================== --- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/context.xml (added) +++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/context.xml Wed Mar 14 21:47:13 2012 @@ -0,0 +1,35 @@ +<?xml version='1.0' encoding='utf-8'?> +<!-- + 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. +--> +<!-- The contents of this file will be loaded for each web application --> +<Context allowLinking="true"> + + <!-- Default set of monitored resources --> + <WatchedResource>WEB-INF/web.xml</WatchedResource> + + <!-- Uncomment this to disable session persistence across Tomcat restarts --> + <!-- + <Manager pathname="" /> + --> + + <!-- Uncomment this to enable Comet connection tacking (provides events + on session expiration as well as webapp lifecycle) --> + <!-- + <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" /> + --> + +</Context> \ No newline at end of file Propchange: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/context.xml ------------------------------------------------------------------------------ svn:executable = * Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/install_oozie.sh URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/install_oozie.sh?rev=1300740&r1=1300739&r2=1300740&view=diff ============================================================================== --- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/install_oozie.sh (original) +++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/install_oozie.sh Wed Mar 14 21:47:13 2012 @@ -208,6 +208,8 @@ install -d -m 0755 ${OOZIE_CONF} failIfNotOK cp -R ${OOZIE_BUILD_DIR}/conf/* ${OOZIE_CONF} failIfNotOK +cp -R ${EXTRADIR}/oozie-env.sh ${OOZIE_CONF} +failIfNotOK if [ "${OOZIE_INITD}" != "" ]; then install -d -m 0755 ${OOZIE_INITD} failIfNotOK @@ -218,31 +220,30 @@ if [ "${OOZIE_INITD}" != "" ]; then fi cp -R ${OOZIE_BUILD_DIR}/oozie-sharelib*.tar.gz ${OOZIE_SERVER_DIR}/oozie-sharelib.tar.gz failIfNotOK -install -d -m 0755 ${OOZIE_DATA}/oozie-server -failIfNotOK -cp -R ${OOZIE_BUILD_DIR}/oozie-server/conf ${OOZIE_DATA}/oozie-server/conf -failIfNotOK cp -R ${OOZIE_BUILD_DIR}/oozie-server/webapps ${OOZIE_SERVER_DIR}/webapps failIfNotOK -cp -R ${EXTRADIR}/oozie-env.sh ${OOZIE_SERVER_DIR}/bin -failIfNotOK -chmod 755 ${OOZIE_SERVER_DIR}/bin/oozie-env.sh +ln -s -f /etc/oozie/conf/oozie-env.sh ${OOZIE_SERVER_DIR}/bin failIfNotOK # Unpack oozie.war some place reasonable OOZIE_WEBAPP=${OOZIE_SERVER_DIR}/webapps/oozie mkdir ${OOZIE_WEBAPP} +failIfNotOK unzip -d ${OOZIE_WEBAPP} ${OOZIE_BUILD_DIR}/oozie.war +failIfNotOK +mv -f ${OOZIE_WEBAPP}/WEB-INF/lib ${OOZIE_SERVER_DIR}/server-core +failIfNotOK touch ${OOZIE_SERVER_DIR}/webapps/oozie.war +failIfNotOK # Create an exploded-war oozie deployment in /var/lib/oozie -sed -i -e 's#<Context#<Context allowLinking="true"#g' ${OOZIE_DATA}/oozie-server/conf/context.xml -mkdir ${OOZIE_DATA}/oozie-server/lib -ln -s /usr/lib/oozie/webapps ${OOZIE_DATA}/oozie-server/webapps - -# Finally do a trick where all the libs go to a writable place -mv -f ${OOZIE_WEBAPP}/WEB-INF/lib ${OOZIE_DATA}/oozie-libs -ln -s /var/lib/oozie/oozie-libs ${OOZIE_WEBAPP}/WEB-INF/lib -for i in `cd ${OOZIE_SERVER_DIR} ; echo lib/* libtools/*` ; do - ln -fs /usr/lib/oozie/$i ${OOZIE_DATA}/oozie-libs/${i#*/} -done +install -d -m 0755 ${OOZIE_SERVER_DIR}/oozie-server +failIfNotOK +cp -R ${OOZIE_BUILD_DIR}/oozie-server/conf ${OOZIE_SERVER_DIR}/oozie-server/conf +failIfNotOK +cp ${EXTRADIR}/context.xml ${OOZIE_SERVER_DIR}/oozie-server/conf/ +failIfNotOK +cp ${EXTRADIR}/catalina.properties ${OOZIE_SERVER_DIR}/oozie-server/conf/ +failIfNotOK +ln -s ../webapps ${OOZIE_SERVER_DIR}/oozie-server/webapps +failIfNotOK Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/oozie-env.sh URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/oozie-env.sh?rev=1300740&r1=1300739&r2=1300740&view=diff ============================================================================== --- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/oozie-env.sh (original) +++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/oozie-env.sh Wed Mar 14 21:47:13 2012 @@ -18,7 +18,7 @@ export OOZIE_CONFIG=/etc/oozie/conf export OOZIE_DATA=/var/lib/oozie export OOZIE_LOG=/var/log/oozie -export CATALINA_BASE=${OOZIE_DATA}/oozie-server +export OOZIE_CATALINA_HOME=/usr/lib/bigtop-tomcat export CATALINA_TMPDIR=/var/tmp/oozie export CATALINA_PID=/var/run/oozie/oozie.pid - +export CATALINA_BASE=/usr/lib/oozie/oozie-server Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/patch URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/patch?rev=1300740&r1=1300739&r2=1300740&view=diff ============================================================================== --- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/patch (original) +++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/patch Wed Mar 14 21:47:13 2012 @@ -20461,3 +20461,16 @@ index 15606db..79352d8 100644 + </filter-mapping> + </web-app> +diff --git distro/src/main/bin/oozied.sh distro/src/main/bin/oozied.sh +index 15606db..79352d8 100644 +--- distro/src/main/bin/oozied.sh (revision 1300625) ++++ distro/src/main/bin/oozied.sh (working copy) +@@ -43,7 +43,7 @@ + + source ${BASEDIR}/bin/oozie-sys.sh + +-CATALINA=${BASEDIR}/oozie-server/bin/catalina.sh ++CATALINA=${OOZIE_CATALINA_HOME:-${BASEDIR}/oozie-server}/bin/catalina.sh + + setup_catalina_opts() { + # The Java System property 'oozie.http.port' it is not used by Oozie, Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/oozie/rules URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/oozie/rules?rev=1300740&r1=1300739&r2=1300740&view=diff ============================================================================== --- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/oozie/rules (original) +++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/oozie/rules Wed Mar 14 21:47:13 2012 @@ -53,8 +53,9 @@ install-indep: dh_testdir dh_testroot sh -x debian/install_oozie.sh --extra-dir=debian/ --build-dir=. --server-dir=./debian/oozie --client-dir=./debian/oozie-client --docs-dir=./debian/oozie-client/usr/share/doc/oozie --initd-dir=./debian/oozie/etc/init.d --conf-dir=./debian/oozie-client/etc/oozie/conf.dist - ln -s /usr/lib/bigtop-tomcat ./debian/oozie/usr/lib/oozie/oozie-server dh_install -i + ln -s -f /var/lib/oozie/ext-2.2 debian/oozie/usr/lib/oozie/webapps/oozie/ext-2.2 + ln -s -f /usr/share/doc/oozie debian/oozie/usr/lib/oozie/webapps/oozie/docs binary-common: dh_testdir Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec?rev=1300740&r1=1300739&r2=1300740&view=diff ============================================================================== --- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec (original) +++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec Wed Mar 14 21:47:13 2012 @@ -138,7 +138,9 @@ Requires: bigtop-utils %__rm -rf $RPM_BUILD_ROOT sh %{SOURCE2} --extra-dir=$RPM_SOURCE_DIR --build-dir=. --server-dir=$RPM_BUILD_ROOT --client-dir=$RPM_BUILD_ROOT --docs-dir=$RPM_BUILD_ROOT%{doc_oozie} --initd-dir=$RPM_BUILD_ROOT%{initd_dir} --conf-dir=$RPM_BUILD_ROOT%{conf_oozie_dist} -%__ln_s -f /usr/lib/bigtop-tomcat $RPM_BUILD_ROOT/usr/lib/oozie/oozie-server +%__ln_s -f %{data_oozie}/ext-2.2 %{lib_oozie}/webapps/oozie/ext-2.2 +%__ln_s -f %{doc_oozie} %{lib_oozie}/webapps/oozie/docs + %__install -d -m 0755 $RPM_BUILD_ROOT/usr/bin