Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added nimbus-admin script which calls into java.

Copy native jars, setup socket dir at install.
Added junixsocket system property to run-services.sh
Fixed AdminClient log configuration.
  • Loading branch information...
commit fb48fffe2ac588870ab7e4f04a645f0ea03d3b61 1 parent 7287cb8
@labisso labisso authored
View
30 home/bin/nimbus-admin
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+NIMBUS_HOME_REL="`dirname $0`/.."
+NIMBUS_HOME=`cd $NIMBUS_HOME_REL; pwd`
+export NIMBUS_HOME
+
+JAVALIB_DIR="$NIMBUS_HOME/services/lib"
+NATIVELIB_DIR="$NIMBUS_HOME/services/lib-native"
+CONF="$NIMBUS_HOME/services/etc/nimbus/workspace-service/admin.conf"
+
+EXEC="org.globus.workspace.remoting.admin.client.AdminClient"
+JAVA_OPTIONS="-Dorg.newsclub.net.unix.library.path=${NATIVELIB_DIR}"
+CMD_OPTIONS="--conf ${CONF}"
+
+JARS="nimbus-workspace-service.jar nimbus-service-api.jar gson-1.4.jar \
+junixsocket-1.3.jar junixsocket-rmi-1.3.jar commons-cli-2.0.jar \
+log4j-1.2.15.jar commons-logging.jar"
+
+CLASSPATH=""
+for JAR in $JARS; do
+ CLASSPATH="${CLASSPATH}${JAVALIB_DIR}/${JAR}:"
+done
+
+if [ "X$JAVA_HOME" = "X" ] ; then
+ JAVA=java
+else
+ JAVA="$JAVA_HOME"/bin/java
+fi
+
+exec ${JAVA} ${JAVA_OPTIONS} ${OPTIONS} -classpath "${CLASSPATH}" ${EXEC} ${CMD_OPTIONS} "$@"
View
2  home/libexec/run-services.sh
@@ -14,4 +14,6 @@ PORT="8443"
cd $GLOBUS_LOCATION
+export GLOBUS_OPTIONS="$GLOBUS_OPTIONS -Dorg.newsclub.net.unix.library.path=$NIMBUS_HOME/services/lib-native"
+
exec $NIMBUS_HOME/services/bin/globus-start-container -p $PORT >> $LOGFILE 2>&1
View
26 libexec/create-nimbus-home
@@ -139,4 +139,30 @@ if [ $? -ne 0 ]; then
exit 1
fi
+# add in native libraries
+LIBNATIVE="$CONTAINER_DIR/lib-native"
+mkdir -p $LIBNATIVE
+if [ $? -ne 0 ]; then
+ echo "Creation of $LIBNATIVE directory failed"
+ exit 1
+fi
+cp $NIMBUS_SRC/lib/native/* $LIBNATIVE/
+if [ $? -ne 0 ]; then
+ echo "Deployment of native libs failed"
+ exit 1
+fi
+
+# create domain sockets privileged directory
+PRIVILEGED="$NIMBUS_HOME/var/run/privileged"
+mkdir -p $PRIVILEGED
+if [ $? -ne 0 ]; then
+ echo "Creation of privileged domain sockets directory failed: $PRIVILEGED"
+ exit 1
+fi
+chmod 700 $PRIVILEGED
+if [ $? -ne 0 ]; then
+ echo "chmod of privileged domain sockets directory failed: $PRIVILEGED"
+ exit 1
+fi
+
echo ""
View
12 service/service/java/source/src/org/globus/workspace/remoting/admin/client/AdminClient.java
@@ -20,6 +20,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.log4j.*;
+import org.apache.log4j.varia.NullAppender;
import org.globus.workspace.remoting.RemotingClient;
import org.globus.workspace.remoting.admin.NodeReport;
import org.globus.workspace.remoting.admin.VmmNode;
@@ -100,16 +101,13 @@ public static void main(String args[]) {
if (isDebug) {
- //TODO uggggh something is configuring log4j first
- // fine to do this for now, but if AdminClient is ever called directly
- // within another JVM, this will blow away their logging config
- // and everyone will say wtf
- BasicConfigurator.resetConfiguration();
-
final PatternLayout layout = new PatternLayout("%C{1}:%L - %m%n");
- BasicConfigurator.configure(new ConsoleAppender(layout));
+ final ConsoleAppender consoleAppender = new ConsoleAppender(layout, "System.err");
+ BasicConfigurator.configure(consoleAppender);
logger.info("Debug mode enabled");
+ } else {
+ BasicConfigurator.configure(new NullAppender());
}
Throwable anyError = null;
Please sign in to comment.
Something went wrong with that request. Please try again.