etc/modules/sample-bundle/src/main/rhq-bundle.xml | 21 +++++++++++++++----
etc/modules/sample-bundle/src/main/scripts/build.xml | 5 ++++
2 files changed, 22 insertions(+), 4 deletions(-)
New commits:
commit ea437dcddb5a108c059d5ea9822e8f95355e00fd
Author: Ian P. Springer <ips(a)jetengine.(none)>
Date: Fri Apr 30 09:25:04 2010 -0400
sample bundle script now installs the jbossas init script and uses it to stop and
restart the petstore AS instance
diff --git a/etc/modules/sample-bundle/src/main/rhq-bundle.xml
b/etc/modules/sample-bundle/src/main/rhq-bundle.xml
index 980f667..c9c25ca 100644
--- a/etc/modules/sample-bundle/src/main/rhq-bundle.xml
+++ b/etc/modules/sample-bundle/src/main/rhq-bundle.xml
@@ -26,7 +26,20 @@
type="integer"/>
<target name="deploy">
+
<echo>Deploying Java Petstore v2.0 to ${rhq.deploy.dir}...</echo>
+
+ <rhq:install-system-service name="jbossas-petstore"
scriptFile="jbossas-init-script"
+ configFile="jbossas-init-config"
overwriteScript="true"
+ startLevels="3,4,5"
startPriority="80" stopPriority="20"/>
+
+ <replace file="/etc/sysconfig/jbossas-petstore"
token="@@rhq.deploy.dir@(a)" value="${rhq.deploy.dir}"/>
+ <replace file="/etc/sysconfig/jbossas-petstore"
token="@@jboss.bind.address@(a)" value="${jboss.bind.address}"/>
+
+ <exec executable="/etc/init.d/jbossas-petstore">
+ <arg value="stop"/>
+ </exec>
+
<rhq:deploy>
<rhq:archive name="jbossas-petstore.zip"/>
<rhq:replace>
@@ -45,10 +58,10 @@
</rhq:ignore>
</rhq:deploy>
- <rhq:install-system-service name="jbossas-petstore"
scriptFile="jbossas-init-script"
- configFile="jbossas-init-config"
overwriteScript="true"
- startLevels="3,4,5"
startPriority="80" stopPriority="20"/>
+ <exec executable="/etc/init.d/jbossas-petstore"
failonerror="true">
+ <arg value="start"/>
+ </exec>
+
</target>
</project>
-
diff --git a/etc/modules/sample-bundle/src/main/scripts/build.xml
b/etc/modules/sample-bundle/src/main/scripts/build.xml
index ffb255c..c3dcd85 100644
--- a/etc/modules/sample-bundle/src/main/scripts/build.xml
+++ b/etc/modules/sample-bundle/src/main/scripts/build.xml
@@ -52,6 +52,11 @@
<zip destfile="target/bundle/jbossas-petstore.zip"
basedir="${jboss.home}"/>
<!-- copy the recipe into the bundle -->
+ <copy todir="target/bundle">
+ <fileset dir="src/main" includes="jbossas-init-*"/>
+ </copy>
+
+ <!-- copy the recipe into the bundle -->
<copy file="src/main/rhq-bundle.xml"
todir="target/bundle"/>
</target>
Show replies by date