[jboss-svn-commits] JBL Code SVN: r34092 - labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Jul 21 09:15:25 EDT 2010


Author: whitingjr
Date: 2010-07-21 09:15:25 -0400 (Wed, 21 Jul 2010)
New Revision: 34092

Modified:
   labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-api.xml
Log:
Added property loading of server config.
Added deployment of hornetq config.

Modified: labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-api.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-api.xml	2010-07-21 12:18:10 UTC (rev 34091)
+++ labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-api.xml	2010-07-21 13:15:25 UTC (rev 34092)
@@ -19,15 +19,15 @@
 
 <project name="RedHat-JBoss-Performance:Commands" default="usage" basedir=".">
 
-   <property file="build-api.properties" />
-
    <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"/>
    <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
-   
+
+   <property file="build-api.properties" />
    <property environment="env"/>
    <property name="framework.properties.dir" location="${env.HOME}/.specjms" />
    <property name="framework.file" location="${framework.properties.dir}/specjms.seq" />
    <property file="${framework.file}" />
+   <property file="../src/main/resources/environments/${env.BENCHMARK_SYSTEM}/environment.properties" />
    
    <target name="clean">
       <echo>Removing prior run collected data.</echo>
@@ -39,16 +39,16 @@
    
    <target name="prepare-eap-server">
       <echo>Preparing EAP server.</echo>
-      <sshexec host="hornetq"
-         username="root"
-         password="${r_p}"
+      <sshexec host="${eap.server.host}"
+         username="${eap.server.username}"
+         password="${eap.server.password}"
          command="/root/apache-ant-1.7.1/bin/ant -buildfile /root/java/batch-execution-SPEC-jms2007/scripts/server-controller/server-commands.xml start"/>
       
       <echo>Waiting ${sever.startup.sleep.inMinutes} minutes to allow the server to startup.</echo>
       <sleep minutes="${sever.startup.sleep.inMinutes}"/>
       
       <delete file="${jps.output.file}" failonerror="false"/>
-      <scp remotefile="root at hornetq:${jps.output.file}" localTodir="${jps.output.file}" failonerror="false" password="${r_p}"/>
+      <scp remotefile="root at hornetq:${jps.output.file}" localTodir="${jps.output.file}" failonerror="false" password="${eap.server.password}"/>
       
       <sleep seconds="10"/>
       
@@ -61,43 +61,43 @@
    
    <target name="start-jstat" if="pid.file.isAvailable">
       <property file="${jps.output.file}" />
-      <sshexec host="hornetq"
-         username="root"
-         password="${r_p}"
+      <sshexec host="${eap.server.host}"
+         username="${eap.server.username}"
+         password="${eap.server.password}"
          command="${start.jstat.1} ${process.pid} ${start.jstat.2}"/>
    </target>
    
    <target name="stop-eap-server">
       <echo>Stopping EAP server.</echo>
-      <sshexec host="hornetq"
-         username="root"
-         password="${r_p}"
+      <sshexec host="${eap.server.host}"
+         username="${eap.server.username}"
+         password="${eap.server.password}"
          command="/root/apache-ant-1.7.1/bin/ant -buildfile /root/java/batch-execution-SPEC-jms2007/scripts/server-controller/server-commands.xml stop"/>
    </target>
    
    <target name="gather-configuration" depends="clean">
       <echo>Gathering configuration located on EAP server.</echo>
-      <scp remotefile="root at hornetq:${server.deployment.dir}/bin/run.conf" localTodir="${spec.install.dir}/config/run.conf" failonerror="true" password="${r_p}"/>
-      <scp remotefile="root at hornetq:${server.deployment.dir}/server/production/deploy/hornetq/hornetq-configuration.xml" localTodir="${spec.install.dir}/config/hornetq-configuration.xml" failonerror="true" password="${r_p}"/>
+      <scp remotefile="root at hornetq:${server.deployment.dir}/bin/run.conf" localTodir="${spec.install.dir}/config/run.conf" failonerror="true" password="${eap.server.password}"/>
+      <scp remotefile="root at hornetq:${server.deployment.dir}/server/production/deploy/hornetq/hornetq-configuration.xml" localTodir="${spec.install.dir}/config/hornetq-configuration.xml" failonerror="true" password="${eap.server.password}"/>
    </target>
 
    <target name="start-benchmark">
       <parallel failonany="true">
          <echo>starting Controller</echo>
 
-         <sshexec host="jmsclient1"
-                     username="root"
-                     password="${r_p}"
+         <sshexec host="${benchmark.client.01.host}"
+                     username="${benchmark.client.01.username}"
+                     password="${benchmark.client.01.password}"
                      command="${start.controller.command}"/>
          <echo>start satellite1</echo>
-         <sshexec host="jmsclient1"
-            username="root"
-            password="${r_p}"
+         <sshexec host="${benchmark.client.01.host}"
+            username="${benchmark.client.01.username}"
+            password="${benchmark.client.01.password}"
             command="${start.satellite.one}"/>
          <echo>start satellite2</echo>
-         <sshexec host="jmsclient2"
-            username="root"
-            password="${r_p}"
+         <sshexec host="${benchmark.client.02.host}"
+            username="${benchmark.client.02.username}"
+            password="${benchmark.client.02.password}"
             command="${start.satellite.two}"/>
             
       </parallel>
@@ -107,8 +107,8 @@
    <target name="gather-logs">
       <echo>Gathering log files</echo>
       <parallel failonany="false">
-         <scp remotefile="root at hornetq:/jboss-5.1.0.Branch/server/production/log/jstat-hornetq.txt" localTodir="${spec.install.dir}/output/${org.spec.internal.runId}/config/jstat-hornetq.txt" failonerror="false" password="${r_p}"/>
-         <scp remotefile="root at hornetq:/tmp/verbose-gc.txt" localTodir="${spec.install.dir}/output/${org.spec.internal.runId}/config/verbose-gc.txt" failonerror="false" password="${r_p}"/>
+         <scp remotefile="root at hornetq:/jboss-5.1.0.Branch/server/production/log/jstat-hornetq.txt" localTodir="${spec.install.dir}/output/${org.spec.internal.runId}/config/jstat-hornetq.txt" failonerror="false" password="${eap.server.password}"/>
+         <scp remotefile="root at hornetq:/tmp/verbose-gc.txt" localTodir="${spec.install.dir}/output/${org.spec.internal.runId}/config/verbose-gc.txt" failonerror="false" password="${eap.server.password}"/>
       </parallel>
    </target>
    
@@ -234,7 +234,7 @@
          <equals arg1="true" arg2="${replacement.file.exists}"/>
          <then>
             <echo>Replacing file ${replacement.file.source.name} </echo>
-            <scp localFile="${replacement.file.source.name}" remoteTofile="root at hornetq:${replacement.file.target.name}"  failonerror="true" password="${r_p}" />
+            <scp localFile="${replacement.file.source.name}" remoteTofile="root at hornetq:${replacement.file.target.name}"  failonerror="true" password="${eap.server.password}" />
          </then>
          <else>
             <echo>No replacement of remote file.</echo>
@@ -262,7 +262,7 @@
          <equals arg1="true" arg2="${remove.file.property.exists}"/>
          <then>
             <echo>Removing file ${remove.file.name} </echo>
-            <sshexec host="hornetq" username="root" password="${r_p}" command="rm -f ${remove.file.name}" />
+            <sshexec host="${eap.server.host}" username="${eap.server.username}" password="${eap.server.password}" command="rm -f ${remove.file.name}" />
          </then>
          <else>
             <echo>No deletion of remote file.</echo>
@@ -348,6 +348,20 @@
                </then>
             </if>
             
+            <condition property="payload.hornetq-jms.xml.isPresent" else="false" value="true">
+               <available file="${payload.dir}/hornetq-jms.xml"/>
+            </condition>
+            <if>
+               <equals arg1="true" arg2="${payload.hornetq-jms.xml.isPresent}"/>
+               <then>
+                  <echo>Deploying hornetq-jms.xml</echo>
+                  <antcall target="substitute-remote-config">
+                     <param name="replacement.file.source.name" value= "${payload.dir}/hornetq-jms.xml"/>
+                     <param name="replacement.file.target.name" value= "${server.deployment.dir}/server/production/deploy/hornetq/hornetq-jms.xml"/>
+                  </antcall>
+               </then>
+            </if>
+            
             <condition property="payload.build-commands-properties.isPresent" else="false" value="true">
                <available file="${payload.dir}/build-commands.properties"/>
             </condition>



More information about the jboss-svn-commits mailing list