Suggestions on deploying to multiple tomcat servers

What is the suggested way to deploy to multiple tomcat servers in parallel?

I currently have a small Gradle script that uses Cargo to deploy to my servers. The issue is it is taking 10 minutes per server. I would like to break these up and deploy to multiple servers at one time.

Is there a best practice for this? I believe I could use ant’s FORK task but curious if there was a better way to do this in Gradle.

Thanks, Jeremy

If you are using the Gradle Cargo plugin, then there’s no support for it at the moment. This is something I want to support in the future and I am working my way toward it. Unfortunately, Gradle doesn’t allow executing tasks in parallel. This is something we would like to provide in the future.

To make this work right now, I’d probably write a method in my build script that you can call from a single task. Every invocation of the method would provide the parameters needed to deploy to a different environment (e.g. hostname, port, username, password). The method itself can take care of the deployment. Within the deployment task I’d use GPars to take care of the parallelization functionality.

Thank you Benjamin. I will give this a try.

Jeremy