|
| 以 PDF 格式下載這本書 (1536 KB)
Upgrading In a Single Cluster
You can perform a rolling upgrade of an application deployed to a single
cluster, providing the cluster’s configuration is not shared with any
other cluster.
To upgrade an application in a single cluster
-
Save an old version of the application or back up the domain.
To back up the domain use the asadmin backup-domain command.
For more information on the command, see backup-domain(1).
-
Turn off dynamic reconfiguration (if enabled) for the cluster.
To do this with 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
Alternatively, use this command:
asadmin set
--user user --passwordfile password-file cluster-name-config.dynamic-reconfiguration-enabled=false
-
Redeploy the upgraded application to the target domain.
If you redeploy using the Admin Console, the domain is automatically
the target. If you use asadmin, specify the target domain. 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. For more information on the command,
see enable-http-lb-application(1).
-
Quiesce one server instance in the cluster from the load balancer.
Follow these steps:
-
Disable the server instance using asadmin disable-http-lb-server.For more information on the command, see disable-http-lb-server(1).
-
Export the load balancer configuration file using asadmin
export-http-lb-config. For more information on the command, see export-http-lb-config(1).
-
Copy the exported configuration file to the web server instance’s
configuration directory.
For example, for Sun Java System Web
Server, the location is web-server-install-dir/https-host-name/config/loadbalancer.xml. To ensure that the load balancer loads
the new configuration file, be sure that dynamic reconfiguration is enabled
by setting the reloadinterval in the load balancer configuration.
-
Wait until the timeout has expired.
Monitor the load
balancer’s log file to make sure the instance is offline. If users see
a retry URL, skip the quiescing period and restart the server immediately.
-
Restart the disabled server instance while the other instances
in the cluster are still running.
Restarting 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.
-
Re-enable the server instance in load balancer.
Follow
these steps:
-
Enable the server instance using asadmin enable-http-lb-server. For more information on the command, see enable-http-lb-server(1).
-
Export the load balancer configuration file using asadmin
export-http-lb-config. For more information on the command, see export-http-lb-config(1).
-
Copy the configuration file to the web server’s configuration
directory.
-
Repeat steps 5 through 8 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.
|