views:

193

answers:

2

How may I automate (no downtime) deployment?
And be able to turn any server off for maintenance.
What tools should I use?

I am using Tomcat but I am willing to move to other Java EE server best suited for the requirements presented.

I would like to know ready to use configuration details.

+3  A: 

If you have two tomcat's running in a cluster (behind a load balancer or behind apache), it's really easy.

  1. Take server 1 out of the cluster, update server it.
  2. Bring server 1 back up.
  3. Take server 2 out of the cluster, update server it.
  4. Bring server 2 back up.

Anything else will result in downtime (however brief) if you're doing a full redeployment of your application.

If you can tolerate a small bit of downtime (<1 sec), then you can emulate this by deploying to a second instance of tomcat, then point your load balancer to the second instance. In this case, you will lose any active sessions, but the switch should be real fast.

In both cases there are database synchronization issues that you will have to address though.

Seth
I am also looking for opensource tools that automate this process.
Eduardo
No such thing that I know of.
duffymo
+1  A: 

Since WebLogic 9, WebLogic has a feature allowing to deploy a new version of an application without downtime which is called side-by-side deployment:

Side-by-side deployment: BEA WebLogic Server 9.0 enables deployment of multiple versions of the same application across a WebLogic cluster; new client requests are routed to the new version and there is no impact on existing clients of the older version. BEA WebLogic Server will automatically retire the older version of the application once all existing clients have completed their processing. This eliminates the need to build out replicated versions of production environments, deploy two different versions in two environments, or use a load-balancer to cutover application traffic to the new version.

WebLogic Server also supports whole server-level migration, where a migratable server instance, and all of its services, is migrated to a different physical machine. This could be used for server maintenance.

Note that whole server migration is not supported by all platforms and has obviously a non negligible cost (in terms of infrastructure).

Pascal Thivent