About Rolling Upgrades
To upgrade an application without loss of service to a user, upgrade the application on one server or cluster at a time. The cluster transparently maintains a mixed-version environment, and users are unaware that the upgrade is taking place.This type of upgrade is called a rolling upgrade.
Rolling upgrades are only possible if old and new versions of the application are compatible and can both run at once. Session info must be compatible. Perform a mixed-mode rolling upgrade in a single stand-alone cluster, or in multiple clusters.
Rolling upgrade in a mixed-mode environment is not possible if the application has major changes, for example, changes to the database schema. In that case you must bring down the application while you upgrade.
Upgrading In a Single Stand-alone Cluster
To upgrade an application in a single, stand-alone cluster (that is, a cluster which does not share a configuration with any other cluster):
- Save an old version of the application or back up the domain.
- Turn off dynamic reconfiguration for the cluster if it is enabled.
Through the Admin Console:
- Expand the Configurations node.
- Click the name of the cluster’s configuration.
- On the Configuration System Properties page, uncheck the Dynamic Reconfiguration Enabled box.
- Click Save
The asadmin
equivalent command is asadmin set
. The syntax is:
asadmin set --user
user --passwordfile
password_file cluster_name-config.dynamic-reconfiguration-enabled=true
- Redeploy the upgraded application to the target
domain
. If you redeploy using the Admin Console, the domain is automatically the target. Because dynamic reconfiguration is disabled, the old application continues to run on the cluster.
- Enable the redeployed application for the instances using
asadmin enable-http-lb-application
.
- Disable one server instance using
asadmin disable-http-lb-server.
- Export the load balancer configuration file using
asadmin export-http-lb-config
.
- Copy the exported configuration file to the web server instance’s configuration directory. For example, for Sun ONE Web Server, the location is web-server-install-dir/
https-
host-name/config/loadbalancer.xml
- Wait until the timeout has expired. Monitor the load balancer’s log file to make sure the instance is offline.
- Restart the disabled server instance while the other instances in the cluster are still running. The restart causes the server to synchronize with the domain and update the application.
- Test the application on the restarted server to make sure it runs correctly.
- Enable the server instance using
asadmin enable-http-lb-server.
- Export the load balancer configuration file using
asadmin export-http-lb-config
.
- Copy the configuration file to the web server’s configuration directory.
- Repeat Step 5 through Step 13 for each instance in the cluster.
- When all server instances have the new application and are running, you can enable dynamic reconfiguration for the cluster again.
Upgrading in Two Clusters
- Save an old version of the application or back up the domain.
- Turn off dynamic reconfiguration for both clusters if it is enabled.
Through the Admin Console:
- Expand the Configurations node.
- Click the name of one cluster’s configuration.
- On the Configuration System Properties page, uncheck the Dynamic Reconfiguration Enabled box.
- Click Save
- Repeat for the second cluster.
The asadmin
equivalent command is asadmin set
. The syntax is:
asadmin set --user
user --passwordfile
password_file cluster_name-config.dynamic-reconfiguration-enabled=true
- Redeploy the upgraded application to the target
domain
. If you redeploy using the Admin Console, the domain is automatically the target. Because dynamic reconfiguration is disabled, the old application continues to run on the clusters.
- Enable the redeployed application for the clusters using
asadmin enable-http-lb-application
.
- Disable one cluster from the load balancer using
asadmin disable-http-lb-server
.
- Export the load balancer configuration file using
asadmin export-http-lb-config
.
- Copy the exported configuration file to the web server instance’s configuration directory. For example, for Sun ONE Web Server, the location is web-server-install-dir/
https-
host-name/config/loadbalancer.xml
- Wait until the timeout has expired. Monitor the load balancer’s log file to make sure the cluster is offline.
- Restart the disabled cluster while the other cluster is still running. The restart causes the cluster to synchronize with the domain and update the application.
- Test the application on the restarted cluster to make sure it runs correctly.
- Enable the cluster using
asadmin enable-http-lb-server.
- Export the load balancer configuration file using
asadmin export-http-lb-config
.
- Copy the configuration file to the web server’s configuration directory.
- Repeat Step 5 through Step 13 for the other cluster.
- When all server instances have the new application and are running, you can enable dynamic reconfiguration for both clusters again.
Legal Notices