Continous Integration [message #663818] |
Wed, 06 April 2011 11:00  |
Eclipse User |
|
|
|
I was wondering if anyone could provide some advice regarding a good CI setup for Virgo; including building and automating deployment using Jenkins (formerly Hudson)?
I have setup a multi-bundle project, including a WAB, using Pax-Construct to help manage Maven. Lot's of wrapped JAR's and I found Pax-Construct to be really useful in keeping things consistent.
I've mostly follows the suggestions made here: http://www.eclipse.org/virgo/documentation/virgo-documentati on-2.1.0.RELEASE/docs/virgo-getting-started/htmlsingle/virgo -getting-started.html#automated.build, and Maven will handle most of those needs excepting the deployment into the Virgo container itself.
I've currently resorted to an Ant script that runs after the Maven goal execution in the Jenkins build to remove old artifacts, copy the new artifacts into the usr repository and the pickup dir. It kind of does the trick but Virgo can be flakey when hot deploying a JSF application so I need to stop\start the server as part of that process now, and setup monitoring to check that the application is indeed running.
Any ideas would be much appreciated.
Cheers,
Matt
|
|
|
Re: Continous Integration [message #663969 is a reply to message #663818] |
Wed, 06 April 2011 21:03   |
Eclipse User |
|
|
|
I also happen to be using Jenkins to push projects to the staging server, and I also use the pickup/ route. What I do to make sure that bundles can get unloaded and loaded properly is that I wait a few seconds between each operation.
For example, I have the following bash snippet for unloading the bundles:
# Remove Bundles
rm -f /usr/local/virgo-tomcat-server/pickup/wab-*.war
sleep 20
rm -f /usr/local/virgo-tomcat-server/pickup/persistence-*.jar
sleep 10
rm -f /usr/local/virgo-tomcat-server/pickup/service-bundle1-*.jar
rm -f /usr/local/virgo-tomcat-server/pickup/service-bundle2-* .jar
rm -f /usr/local/virgo-tomcat-server/pickup/service-bundle3-*.jar
sleep 10
For loading, I have the following:
# Install bundles
cp $WORKSPACE/service-bundle1/target/service-bundle1- *.jar \
/usr/local/virgo-tomcat-server/pickup
cp $WORKSPACE/service-bundle2/target/service-bundle2-*.jar \
/usr/local/virgo-tomcat-server/pickup
cp $WORKSPACE/service-bundle3/target/service-bundle3-*.jar \
/usr/local/virgo-tomcat-server/pickup
sleep 10
cp $WORKSPACE/persistence/target/persistence-*.jar \
/usr/local/virgo-tomcat-server/pickup
sleep 10
cp $WORKSPACE/wab/target/wab-*.war \
/usr/local/virgo-tomcat-server/pickup
sleep 20
Then, to make sure changes work, Site Monitor Plugin is used. So far, this technique has been quite reliable for a few weeks. Though, it would be great if Virgo can have CLI commands, like Glassfish's asadmin, that handles bundle loading and unloading.
Hope this helps.
[Updated on: Wed, 06 April 2011 21:07] by Moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06068 seconds