Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy Only Diffs in Webapp with Maven to Remote Server

I am using cargo:deploy with maven to deploy applications to servers. This works well, but I recently tried using CloudBees. They have a similar plugin for their infrastructure. However, it deploys only differences between the old WAR and the new WAR so it is significantly faster. Where cargo:deploy takes me 4 to 6 minutes, the CloudBees method takes less than a minute.

Are there any plugins for Maven that will allow me to deploy only my changes to my own app server? Right now I'm using Tomcat, but would consider switching application servers if there was a good solution for something else.

like image 921
Mark Avatar asked Jun 05 '11 01:06

Mark


Video Answer


1 Answers

You need server side support for receiving the delta, which is where we (cloudbees) get to invoke our secret sauce.

What you would need is a deployment service on the target server that understands whatever delta format gets uploaded.

It is not to tricky to do in some ways... The war has built in checksums, so if an entry in the war has the same path, last-modified, Crc and size then it is a good candidate for exclusion from the delta, so you take a safer hash or two (sha-256 and md5 for example, to give to different functions to compare with) and if those hashes are the same! Exclude from the delta.

A fancy tomcat-deployer web app could support such deployment, but you'd want to lock it down for production, but anyway why host yourself when you can GSETDIFY

like image 145
Stephen Connolly Avatar answered Sep 18 '22 13:09

Stephen Connolly