From: <gv...@hy...> - 2008-05-13 22:39:57
|
Author: gviedma Date: 2008-05-13 15:39:53 -0700 (Tue, 13 May 2008) New Revision: 9503 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=9503 Modified: trunk/bin/hq-agent-wrapper.bat trunk/bin/hq-agent-wrapper.sh trunk/bin/hq-agent.sh trunk/etc/wrapper.conf trunk/src/org/hyperic/hq/agent/AgentConfig.java Log: Moved agent data directory from bundle to top level Modified: trunk/bin/hq-agent-wrapper.bat =================================================================== --- trunk/bin/hq-agent-wrapper.bat 2008-05-13 22:23:45 UTC (rev 9502) +++ trunk/bin/hq-agent-wrapper.bat 2008-05-13 22:39:53 UTC (rev 9503) @@ -114,15 +114,15 @@ rem :ping -"%JAVA_HOME%\bin\java" -Djava.compiler=NONE -Djava.security.auth.login.config=jaas.config -Dagent.mode=thread -Xmx256M -Xrs -Xmx128m -Djava.net.preferIPv4Stack=true -Djava.library.path="lib" -Dagent.propFile="../../conf/agent.properties" -Dagent.logDir="../../log" -classpath "lib\AgentClient.jar;lib\AgentServer.jar;lib\lather.jar;pdk\lib\activation.jar;pdk\lib\ant.jar;pdk\lib\backport-util-concurrent.jar;pdk\lib\commons-beanutils.jar;pdk\lib\commons-codec-1.3.jar;pdk\lib\commons-collections.jar;pdk\lib\commons-httpclient-3.1.jar;pdk\lib\commons-logging.jar;pdk\lib\dnsjava-2.0.3.jar;pdk\lib\getopt.jar;pdk\lib\hq-product.jar;pdk\lib\hyperic-util.jar;pdk\lib\jakarta-oro-2.0.7.jar;pdk\lib\jdom_b8.jar;pdk\lib\jsch-0.1.34.jar;pdk\lib\json.jar;pdk\lib\junit.jar;pdk\lib\jxla.jar;pdk\lib\log4j-1.2.14.jar;pdk\lib\sigar.jar;pdk\lib\snmp4j.jar;pdk\lib\tomcat-jk.jar;pdk\lib\ws-commons-util-1.0.2.jar;pdk\lib\xalan.jar;pdk\lib\xml-apis.jar;pdk\lib\xmlrpc-client-3.1.jar;pdk\lib\xmlrpc-commo n-3.1.jar;pdk\lib\xpp3_min-1.1.3.4.O.jar;pdk\lib\xstream-1.2.1.jar" org.hyperic.hq.bizapp.agent.client.AgentClient ping +"%JAVA_HOME%\bin\java" -Djava.compiler=NONE -Djava.security.auth.login.config=jaas.config -Dagent.mode=thread -Xmx256M -Xrs -Xmx128m -Djava.net.preferIPv4Stack=true -Djava.library.path="lib" -Dagent.propFile="../../conf/agent.properties" -Dagent.logDir="../../log" -Dagent.dataDir="../../data" -classpath "lib\AgentClient.jar;lib\AgentServer.jar;lib\lather.jar;pdk\lib\activation.jar;pdk\lib\ant.jar;pdk\lib\backport-util-concurrent.jar;pdk\lib\commons-beanutils.jar;pdk\lib\commons-codec-1.3.jar;pdk\lib\commons-collections.jar;pdk\lib\commons-httpclient-3.1.jar;pdk\lib\commons-logging.jar;pdk\lib\dnsjava-2.0.3.jar;pdk\lib\getopt.jar;pdk\lib\hq-product.jar;pdk\lib\hyperic-util.jar;pdk\lib\jakarta-oro-2.0.7.jar;pdk\lib\jdom_b8.jar;pdk\lib\jsch-0.1.34.jar;pdk\lib\json.jar;pdk\lib\junit.jar;pdk\lib\jxla.jar;pdk\lib\log4j-1.2.14.jar;pdk\lib\sigar.jar;pdk\lib\snmp4j.jar;pdk\lib\tomcat-jk.jar;pdk\lib\ws-commons-util-1.0.2.jar;pdk\lib\xalan.jar;pdk\lib\xml-apis.jar;pdk\lib\xmlrpc-client -3.1.jar;pdk\lib\xmlrpc-common-3.1.jar;pdk\lib\xpp3_min-1.1.3.4.O.jar;pdk\lib\xstream-1.2.1.jar" org.hyperic.hq.bizapp.agent.client.AgentClient ping IF %ERRORLEVEL% NEQ 0 (echo Ping failed!) else echo Ping success! goto :eof :setup -"%JAVA_HOME%\bin\java" -Djava.compiler=NONE -Djava.security.auth.login.config=jaas.config -Dagent.mode=thread -Xmx256M -Xrs -Xmx128m -Djava.net.preferIPv4Stack=true -Djava.library.path="lib" -Dagent.propFile="../../conf/agent.properties" -Dagent.logDir="../../log" -classpath "lib\AgentClient.jar;lib\AgentServer.jar;lib\lather.jar;pdk\lib\activation.jar;pdk\lib\ant.jar;pdk\lib\backport-util-concurrent.jar;pdk\lib\commons-beanutils.jar;pdk\lib\commons-codec-1.3.jar;pdk\lib\commons-collections.jar;pdk\lib\commons-httpclient-3.1.jar;pdk\lib\commons-logging.jar;pdk\lib\dnsjava-2.0.3.jar;pdk\lib\getopt.jar;pdk\lib\hq-product.jar;pdk\lib\hyperic-util.jar;pdk\lib\jakarta-oro-2.0.7.jar;pdk\lib\jdom_b8.jar;pdk\lib\jsch-0.1.34.jar;pdk\lib\json.jar;pdk\lib\junit.jar;pdk\lib\jxla.jar;pdk\lib\log4j-1.2.14.jar;pdk\lib\sigar.jar;pdk\lib\snmp4j.jar;pdk\lib\tomcat-jk.jar;pdk\lib\ws-commons-util-1.0.2.jar;pdk\lib\xalan.jar;pdk\lib\xml-apis.jar;pdk\lib\xmlrpc-client-3.1.jar;pdk\lib\xmlrpc-commo n-3.1.jar;pdk\lib\xpp3_min-1.1.3.4.O.jar;pdk\lib\xstream-1.2.1.jar" org.hyperic.hq.bizapp.agent.client.AgentClient setup +"%JAVA_HOME%\bin\java" -Djava.compiler=NONE -Djava.security.auth.login.config=jaas.config -Dagent.mode=thread -Xmx256M -Xrs -Xmx128m -Djava.net.preferIPv4Stack=true -Djava.library.path="lib" -Dagent.propFile="../../conf/agent.properties" -Dagent.logDir="../../log" -Dagent.dataDir="../../data" -classpath "lib\AgentClient.jar;lib\AgentServer.jar;lib\lather.jar;pdk\lib\activation.jar;pdk\lib\ant.jar;pdk\lib\backport-util-concurrent.jar;pdk\lib\commons-beanutils.jar;pdk\lib\commons-codec-1.3.jar;pdk\lib\commons-collections.jar;pdk\lib\commons-httpclient-3.1.jar;pdk\lib\commons-logging.jar;pdk\lib\dnsjava-2.0.3.jar;pdk\lib\getopt.jar;pdk\lib\hq-product.jar;pdk\lib\hyperic-util.jar;pdk\lib\jakarta-oro-2.0.7.jar;pdk\lib\jdom_b8.jar;pdk\lib\jsch-0.1.34.jar;pdk\lib\json.jar;pdk\lib\junit.jar;pdk\lib\jxla.jar;pdk\lib\log4j-1.2.14.jar;pdk\lib\sigar.jar;pdk\lib\snmp4j.jar;pdk\lib\tomcat-jk.jar;pdk\lib\ws-commons-util-1.0.2.jar;pdk\lib\xalan.jar;pdk\lib\xml-apis.jar;pdk\lib\xmlrpc-client -3.1.jar;pdk\lib\xmlrpc-common-3.1.jar;pdk\lib\xpp3_min-1.1.3.4.O.jar;pdk\lib\xstream-1.2.1.jar" org.hyperic.hq.bizapp.agent.client.AgentClient setup goto :eof :setup-if-no-provider -"%JAVA_HOME%\bin\java" -Djava.compiler=NONE -Djava.security.auth.login.config=jaas.config -Dagent.mode=thread -Xmx256M -Xrs -Xmx128m -Djava.net.preferIPv4Stack=true -Djava.library.path="lib" -Dagent.propFile="../../conf/agent.properties" -Dagent.logDir="../../log" -classpath "lib\AgentClient.jar;lib\AgentServer.jar;lib\lather.jar;pdk\lib\activation.jar;pdk\lib\ant.jar;pdk\lib\backport-util-concurrent.jar;pdk\lib\commons-beanutils.jar;pdk\lib\commons-codec-1.3.jar;pdk\lib\commons-collections.jar;pdk\lib\commons-httpclient-3.1.jar;pdk\lib\commons-logging.jar;pdk\lib\dnsjava-2.0.3.jar;pdk\lib\getopt.jar;pdk\lib\hq-product.jar;pdk\lib\hyperic-util.jar;pdk\lib\jakarta-oro-2.0.7.jar;pdk\lib\jdom_b8.jar;pdk\lib\jsch-0.1.34.jar;pdk\lib\json.jar;pdk\lib\junit.jar;pdk\lib\jxla.jar;pdk\lib\log4j-1.2.14.jar;pdk\lib\sigar.jar;pdk\lib\snmp4j.jar;pdk\lib\tomcat-jk.jar;pdk\lib\ws-commons-util-1.0.2.jar;pdk\lib\xalan.jar;pdk\lib\xml-apis.jar;pdk\lib\xmlrpc-client-3.1.jar;pdk\lib\xmlrpc-commo n-3.1.jar;pdk\lib\xpp3_min-1.1.3.4.O.jar;pdk\lib\xstream-1.2.1.jar" org.hyperic.hq.bizapp.agent.client.AgentClient setup-if-no-provider +"%JAVA_HOME%\bin\java" -Djava.compiler=NONE -Djava.security.auth.login.config=jaas.config -Dagent.mode=thread -Xmx256M -Xrs -Xmx128m -Djava.net.preferIPv4Stack=true -Djava.library.path="lib" -Dagent.propFile="../../conf/agent.properties" -Dagent.logDir="../../log" -Dagent.dataDir="../../data" -classpath "lib\AgentClient.jar;lib\AgentServer.jar;lib\lather.jar;pdk\lib\activation.jar;pdk\lib\ant.jar;pdk\lib\backport-util-concurrent.jar;pdk\lib\commons-beanutils.jar;pdk\lib\commons-codec-1.3.jar;pdk\lib\commons-collections.jar;pdk\lib\commons-httpclient-3.1.jar;pdk\lib\commons-logging.jar;pdk\lib\dnsjava-2.0.3.jar;pdk\lib\getopt.jar;pdk\lib\hq-product.jar;pdk\lib\hyperic-util.jar;pdk\lib\jakarta-oro-2.0.7.jar;pdk\lib\jdom_b8.jar;pdk\lib\jsch-0.1.34.jar;pdk\lib\json.jar;pdk\lib\junit.jar;pdk\lib\jxla.jar;pdk\lib\log4j-1.2.14.jar;pdk\lib\sigar.jar;pdk\lib\snmp4j.jar;pdk\lib\tomcat-jk.jar;pdk\lib\ws-commons-util-1.0.2.jar;pdk\lib\xalan.jar;pdk\lib\xml-apis.jar;pdk\lib\xmlrpc-client -3.1.jar;pdk\lib\xmlrpc-common-3.1.jar;pdk\lib\xpp3_min-1.1.3.4.O.jar;pdk\lib\xstream-1.2.1.jar" org.hyperic.hq.bizapp.agent.client.AgentClient setup-if-no-provider goto :eof Modified: trunk/bin/hq-agent-wrapper.sh =================================================================== --- trunk/bin/hq-agent-wrapper.sh 2008-05-13 22:23:45 UTC (rev 9502) +++ trunk/bin/hq-agent-wrapper.sh 2008-05-13 22:39:53 UTC (rev 9503) @@ -131,6 +131,8 @@ AGENT_PROPS=../../conf/agent.properties AGENTLOGDIR_PROP=agent.logDir AGENTLOGDIR=../../log +AGENTDATADIR_PROP=agent.dataDir +AGENTDATADIR=../../data AGENT_LIB=./lib PDK_LIB=./pdk/lib # for /proc/net/tcp mirror @@ -176,6 +178,7 @@ -Djava.net.preferIPv4Stack=true \ -D${AGENTPROPFILE_PROP}=${AGENT_PROPS} \ -D${AGENTLOGDIR_PROP}=${AGENTLOGDIR} \ + -D${AGENTDATADIR_PROP}=${AGENTDATADIR} \ -cp ${CLIENT_CLASSPATH} ${CLIENT_CLASS}" PING_CMD="${CLIENT_CMD} ping" Modified: trunk/bin/hq-agent.sh =================================================================== --- trunk/bin/hq-agent.sh 2008-05-13 22:23:45 UTC (rev 9502) +++ trunk/bin/hq-agent.sh 2008-05-13 22:39:53 UTC (rev 9503) @@ -4,6 +4,8 @@ AGENT_PROPS=../../conf/agent.properties AGENTLOGDIR_PROP=agent.logDir AGENTLOGDIR=../../log +AGENTDATADIR_PROP=agent.dataDir +AGENTDATADIR=../../data AGENT_LIB=./lib PDK_LIB=./pdk/lib # for /proc/net/tcp mirror @@ -70,6 +72,7 @@ -Djava.net.preferIPv4Stack=true \ -D${AGENTPROPFILE_PROP}=${AGENT_PROPS} \ -D${AGENTLOGDIR_PROP}=${AGENTLOGDIR} \ + -D${AGENTDATADIR_PROP}=${AGENTDATADIR} \ -cp ${CLIENT_CLASSPATH} ${CLIENT_CLASS}" START_CMD="${CLIENT_CMD} start" Modified: trunk/etc/wrapper.conf =================================================================== --- trunk/etc/wrapper.conf 2008-05-13 22:23:45 UTC (rev 9502) +++ trunk/etc/wrapper.conf 2008-05-13 22:39:53 UTC (rev 9503) @@ -44,8 +44,10 @@ wrapper.java.additional.6=-Xmx128m wrapper.java.additional.7=-Djava.net.preferIPv4Stack=true wrapper.java.additional.8=-Dagent.logDir=../../log -wrapper.java.additional.9=-Dagent.propFile=../../conf/agent.properties +wrapper.java.additional.9=-Dagent.dataDir=../../data +wrapper.java.additional.10=-Dagent.propFile=../../conf/agent.properties + # Initial Java Heap Size (in MB) #wrapper.java.initmemory=3 Modified: trunk/src/org/hyperic/hq/agent/AgentConfig.java =================================================================== --- trunk/src/org/hyperic/hq/agent/AgentConfig.java 2008-05-13 22:23:45 UTC (rev 9502) +++ trunk/src/org/hyperic/hq/agent/AgentConfig.java 2008-05-13 22:39:53 UTC (rev 9503) @@ -55,6 +55,14 @@ public static final String PROP_PROPFILE = "agent.propFile"; public static final String DEFAULT_PROPFILE = "agent.properties"; + public static final String ROLLBACK_PROPFILE = "agent.rollbackPropFile"; + public static final String DEFAULT_ROLLBACKPROPFILE = "../../conf/rollback.properties"; + + // properties used with JSW + public static final String JSW_PROP_AGENT_BUNDLE = "set.HQ_AGENT_BUNDLE"; + public static final String JSW_PROP_AGENT_ROLLBACK_BUNDLE = + "set.HQ_AGENT_ROLLBACK_BUNDLE"; + public static final String PROP_LATHER_PROXYHOST = "lather.proxyHost"; public static final String PROP_LATHER_PROXYPORT = "lather.proxyPort"; @@ -83,6 +91,8 @@ { "agent.logDir", System.getProperty("agent.logDir", "log") }; public static final String[] PROP_DATADIR = { "agent.dataDir", System.getProperty("agent.dataDir", "data") }; + public static final String[] PROP_KEYSTORE = + { "agent.keystore", PROP_DATADIR[1] + "/keystore" }; public static final String[] PROP_PDK = { ProductPluginManager.PROP_PDK_DIR, System.getProperty(ProductPluginManager.PROP_PDK_DIR, "./pdk") }; @@ -101,6 +111,7 @@ PROP_TMPDIR, PROP_LOGDIR, PROP_DATADIR, + PROP_KEYSTORE, PROP_PDK }; |