Deploy multiple wars to multiple remote containers through Jenkins job - deployment

Hi I'm using Jenkins to build and deploy to remote container. As of now my maven job build 5 webapps through one parent pom and deploy all wars into one remote container.
As of now I'm using deploy plugin which is allowing to deploy a war to single remote container.
Now I wanted to put each war into a different remote container. Please let me know any plugins available or any scripts to use to specify where to deploy each war file.
Thanks

You can write an ant script for this purpose. Tomcat manager plugin can be controlled through Ant, so you can write five different tasks for your 5 different servers. You can add this ant script as a post build task.
Thanks
Param

Related

How to deploy two war files onto Jboss 6.4.0

I have two war files msg-producer and msg-consumer. How to deploy these two war files onto jboss 6.4.0 simultaneously?
currently deploying one war file like this:
copy war file into EAP\standalone\deployments folder
Run standalone.bat from EAP-6.4.0\bin.
Yes, you can deploy two or multiple WAR files into EAP\standalone\deployments folder.
Each web application will have a different context root, using context root you can access the application.
Yes, You can deploy two or more WAR/EAR files in the JBoss Application server.
Please go through the $JBOSS_ROOT/standalone/deployments/README.txt
There are two different modes 1. auto-deploy mode and 2. manual deploy mode
Manual deployment relies on a system of marker
files, with the user's addition or removal of a marker file serving as a sort
of command telling the scanner to deploy, undeploy or redeploy content.
Auto-deploy mode: The scanner will directly monitor the deployment content,
automatically deploying new content and redeploying content whose timestamp
has changed.
Read the README.txt for more details.
The simplest way I recommend is
Login the JBoss admin console
Under deployments tab, click on "add" and select the required msg-producer and msg-consumer war files. "Enable" checkbox to be selected.
Access the application http://localhost(or_servername):8080/contextroot/

Jenkins deployment on multiple servers with different configurations

We are using jenkins to build and deploy our project.
Currently we build the project (It's a Spring java application) in one jenkins job and deploy it on our servers in an other jenkins job. The result of the build job is a war file which gets build and deployed by maven to tomcat.
This worked really well till we came to the point that we needed different configuration files (spring applicationContext.xml) for the application depending on which server the application is deployed. The configuration file comes packed in the war file from the build job.
What would be a good way to modify the build process for two servers with two configuration files? Is there a way to avoid having two builds just because we need two different configuration files in the war files?
Thanks for your help!
I supply the configuration files, per environment, at the time of deployment.
It overwrites whatever is there as part of .war

Can't get past Welcome to Jboss page Openshift

I'm trying to use Openshift to host my java webapps. The problem I am running into is every time I go to my application "http://omniticketmvc-leviliester.rhcloud.com/" it takes me to a "Welcome to your JBossEWS (Apache/Tomcat) application on OpenShift".
I thought maybe it was because my project had some sort of default .war that was being deployed instead of the one I wanted. To try to confirm that I followed this guide made by to deploy a pre-compiled War file. https://www.openshift.com/kb/kb-e1088-how-to-deploy-pre-compiled-java-applications-war-and-ear-files-onto-your-openshift-gear .
As you can imagine that did not work. The guide implies that I should be able to find my webapp running at app-domain.rhcloud.com/mywebsite with "mywebsite" being the name of the war file my project created. In this scenario my Application war file is name "OmniTicket". I can find that war file on the server using ssh but the directory hierarchy is confusing to me.
I also tried looking in logs on the server but I don't see any errors to indicate a malfunction in spring or database connections. Any help would be appreciated. Specifically when I deploy my application to the Jboss Server without any obvious errors, why can't I get to the application root?
I should also mention it is a SpringMVC restful service application that works locally.
Try following steps:
Rename your war name to ROOT.war
Delete the src and pom.xml. If pom.xml is present then OpenShift would try to build the maven project
Place the war in deployments folder under your application root folder
Commit the war and push changes to application Git repository.
Check the logs using rhc tail command

what will happened if I put same or different name war in running jboss server

I am really new to jboss and I need to know some behaviors of jboss.
Here is my scenario, we are using jboss-6.1.0.Final
I am using jetkins for preparing war, now war is ready now I have planned to use FTP plugin to upload war on server. Up to this everything is fine but what I need to know is
I have ftp root path is C:\jboss-6.1.0.Final\server\RCM\deploy.
So if I deploy same war(or with same war with changing name) without stopping server because jetkins takes time to prepare war so I don't want to stop it until war is ready.
So my main query is what will happened if I put same or different name war in running server? will it stop currently running server?
Any help will highly appreciated.
It will not stop running server. It could start redeploying war if war name is same.
if it has different name then It could start deployment of new war.

Deploying only changed portions of a war to Tomcat

I'm deploying my application to Tomcat, which currently involves uploading a ~40MB war file to a remote server.
Often the changes within the war only affect jars and static content which account for maybe 2 - 3MB's. Is there some tooling I can integrate with my Ant script that can accurately detect the changes to the war and give me a smaller subset to upload?
I ended up writing an ant task to copy the relevant portions of the app, zip them up and deploy them on the server.
Simple, but effective.