ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sneet...@apache.org
Subject [13/15] git commit: Updated start scripts to load custom JAVA OPTS
Date Fri, 31 Oct 2014 21:03:51 GMT
Updated start scripts to load custom JAVA OPTS

Signed-off-by: Madhan Neethiraj <madhan@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-argus/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-argus/commit/6a923848
Tree: http://git-wip-us.apache.org/repos/asf/incubator-argus/tree/6a923848
Diff: http://git-wip-us.apache.org/repos/asf/incubator-argus/diff/6a923848

Branch: refs/heads/master
Commit: 6a923848d327197540a016a8bcda9b780749457f
Parents: 779c385
Author: Don Bosco Durai <bosco@apache.org>
Authored: Thu Oct 30 23:33:36 2014 -0700
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Thu Oct 30 23:46:42 2014 -0700

----------------------------------------------------------------------
 embededwebserver/scripts/start-ranger-admin.sh | 13 +++++++++----
 embededwebserver/scripts/stop-ranger-admin.sh  | 13 ++++++++-----
 unixauthservice/scripts/start.sh               |  8 +++++++-
 3 files changed, 24 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/6a923848/embededwebserver/scripts/start-ranger-admin.sh
----------------------------------------------------------------------
diff --git a/embededwebserver/scripts/start-ranger-admin.sh b/embededwebserver/scripts/start-ranger-admin.sh
index d0c7946..b560794 100755
--- a/embededwebserver/scripts/start-ranger-admin.sh
+++ b/embededwebserver/scripts/start-ranger-admin.sh
@@ -23,14 +23,19 @@ XAPOLICYMGR_EWS_DIR=${XAPOLICYMGR_DIR}/ews
 RANGER_JAAS_LIB_DIR="${XAPOLICYMGR_EWS_DIR}/ranger_jaas"
 RANGER_JAAS_CONF_DIR="${XAPOLICYMGR_EWS_DIR}/webapp/WEB-INF/classes/conf/ranger_jaas"
 
-if [ -f ${XAPOLICYMGR_DIR}/ews/webapp/WEB-INF/classes/conf/ranger_admin_env.sh ]; then
-	. ${XAPOLICYMGR_DIR}/ews/webapp/WEB-INF/classes/conf/ranger_admin_env.sh
-fi
+JAVA_OPTS=" ${JAVA_OPTS} -XX:MaxPermSize=256m -Xmx1024m -Xms1024m "
 
 #export JAVA_HOME=
 if [ -f ${XAPOLICYMGR_DIR}/ews/webapp/WEB-INF/classes/conf/java_home.sh ]; then
 	. ${XAPOLICYMGR_DIR}/ews/webapp/WEB-INF/classes/conf/java_home.sh
 fi
+
+for custom_env_script in `find ${XAPOLICYMGR_DIR}/ews/webapp/WEB-INF/classes/conf/ -name
"ranger-admin-env*"`; do
+	if [ -f $custom_env_script ]; then
+		. $custom_env_script
+	fi
+done
+
 if [ "$JAVA_HOME" != "" ]; then
 	export PATH=$JAVA_HOME/bin:$PATH
 fi
@@ -40,5 +45,5 @@ if [ ! -d logs ]
 then
 	mkdir logs
 fi
-java -Dproc_rangeradmin -Xmx1024m -Xms1024m -Dcatalina.base=${XAPOLICYMGR_EWS_DIR} -cp "${XAPOLICYMGR_EWS_DIR}/webapp/WEB-INF/classes/conf:${XAPOLICYMGR_EWS_DIR}/lib/*:${RANGER_JAAS_LIB_DIR}/*:${RANGER_JAAS_CONF_DIR}:${JAVA_HOME}/lib/*"
com.xasecure.server.tomcat.EmbededServer > logs/catalina.out 2>&1 &
+java -Dproc_rangeradmin ${JAVA_OPTS} -Dcatalina.base=${XAPOLICYMGR_EWS_DIR} -cp "${XAPOLICYMGR_EWS_DIR}/webapp/WEB-INF/classes/conf:${XAPOLICYMGR_EWS_DIR}/lib/*:${RANGER_JAAS_LIB_DIR}/*:${RANGER_JAAS_CONF_DIR}:${JAVA_HOME}/lib/*"
com.xasecure.server.tomcat.EmbededServer > logs/catalina.out 2>&1 &
 echo "Apache Ranger Admin has started"

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/6a923848/embededwebserver/scripts/stop-ranger-admin.sh
----------------------------------------------------------------------
diff --git a/embededwebserver/scripts/stop-ranger-admin.sh b/embededwebserver/scripts/stop-ranger-admin.sh
index cc35f8a..9fb9f04 100755
--- a/embededwebserver/scripts/stop-ranger-admin.sh
+++ b/embededwebserver/scripts/stop-ranger-admin.sh
@@ -24,14 +24,17 @@ XAPOLICYMGR_EWS_DIR=${XAPOLICYMGR_DIR}/ews
 RANGER_JAAS_LIB_DIR="${XAPOLICYMGR_EWS_DIR}/ranger_jaas"
 RANGER_JAAS_CONF_DIR="${XAPOLICYMGR_EWS_DIR}/webapp/WEB-INF/classes/conf/ranger_jaas"
 
-if [ -f ${XAPOLICYMGR_DIR}/ews/webapp/WEB-INF/classes/conf/ranger_admin_env.sh ]; then
-	. ${XAPOLICYMGR_DIR}/ews/webapp/WEB-INF/classes/conf/ranger_admin_env.sh
-fi
-
 #export JAVA_HOME=
 if [ -f ${XAPOLICYMGR_DIR}/ews/webapp/WEB-INF/classes/conf/java_home.sh ]; then
 	. ${XAPOLICYMGR_DIR}/ews/webapp/WEB-INF/classes/conf/java_home.sh
 fi
+
+for custom_env_script in `find ${XAPOLICYMGR_DIR}/ews/webapp/WEB-INF/classes/conf/ -name
"ranger-admin-env*"`; do
+	if [ -f $custom_env_script ]; then
+		. $custom_env_script
+	fi	
+done
+
 if [ "$JAVA_HOME" != "" ]; then
 	export PATH=$JAVA_HOME/bin:$PATH
 fi
@@ -41,5 +44,5 @@ if [ ! -d logs ]
 then
 	mkdir logs
 fi
-java -Dcatalina.base=${XAPOLICYMGR_EWS_DIR} -cp "${XAPOLICYMGR_EWS_DIR}/webapp/WEB-INF/classes/conf:${XAPOLICYMGR_EWS_DIR}/lib/*:${RANGER_JAAS_LIB_DIR}/*:${RANGER_JAAS_CONF_DIR}"
com.xasecure.server.tomcat.StopEmbededServer > logs/catalina.out 2>&1
+java ${JAVA_OPTS} -Dcatalina.base=${XAPOLICYMGR_EWS_DIR} -cp "${XAPOLICYMGR_EWS_DIR}/webapp/WEB-INF/classes/conf:${XAPOLICYMGR_EWS_DIR}/lib/*:${RANGER_JAAS_LIB_DIR}/*:${RANGER_JAAS_CONF_DIR}"
com.xasecure.server.tomcat.StopEmbededServer > logs/catalina.out 2>&1
 echo "Apache Ranger Admin has been stopped."

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/6a923848/unixauthservice/scripts/start.sh
----------------------------------------------------------------------
diff --git a/unixauthservice/scripts/start.sh b/unixauthservice/scripts/start.sh
index 96b507f..07b0315 100755
--- a/unixauthservice/scripts/start.sh
+++ b/unixauthservice/scripts/start.sh
@@ -25,6 +25,12 @@ echo "Starting UnixAuthenticationService"
 #export JAVA_HOME=
 . ${cdir}/conf/java_home.sh
 
+for custom_env_script in `find ${cdir}/conf/ -name "ranger-usersync-env*"`; do
+	if [ -f $custom_env_script ]; then
+		. $custom_env_script
+	fi
+done
+
 if [ "$JAVA_HOME" != "" ]; then
 	export PATH=$JAVA_HOME/bin:$PATH
 fi
@@ -42,7 +48,7 @@ cp="${cdir}/dist/*:${cdir}/lib/*:${cdir}/conf"
 ${cdir}/stop.sh
 cd ${cdir}
 umask 0077
-nohup java -Dproc_rangerusersync -Dlogdir="${logdir}" -cp "${cp}" com.xasecure.authentication.UnixAuthenticationService
> ${logdir}/auth.log 2>&1 &
+nohup java -Dproc_rangerusersync ${JAVA_OPTS} -Dlogdir="${logdir}" -cp "${cp}" com.xasecure.authentication.UnixAuthenticationService
> ${logdir}/auth.log 2>&1 &
 echo $! >  ${pidf}
 sleep 5
 port=`grep  '^[ ]*authServicePort' ${cdir}/conf/unixauthservice.properties | awk -F= '{ print
$2 }' | awk '{ print $1 }'`


Mime
View raw message