Application edition management and rollout
WebSphere Application Server V8.5 introduces the Edition control center, which enables management and operational control over application editions, including interruption-free application upgrades. An application edition is a version of an application composed of distinct versions of modules and bindings.
The terms version and edition distinguish between what occurs in your development and build environment from what occurs in your deployment and operational environment. A version is a successive generation of an interface, function, implementation, or entire application, and so forth. Version is a development and build concept. An edition is a successive deployment generation, for example, the deployment of a particular set of versioned artifacts. Edition is a deployment and operational concept.
The edition control center provides an application versioning model that supports multiple deployments of the same application in the Intelligent Management cell. Each deployment has a unique edition name. The edition control center allows you to select the edition to activate on an Intelligent Management cluster, so that you can perform a rollout of an application update or revert to a previous level.
Installing an application edition
Installing an application edition is similar to installing an application. When installing a new
edition of an application, the
Application edition and
Edition description must be specified in
the Select installation options window during the application installation wizard. This
automatically creates an edition for the application being deployed.
Activating an edition
Application editions can be in one of three states: Inactive, Validation, or Active. The installation of an edition does not make it automatically active. Activating an edition is different from starting an edition. An application edition must be in active state before it can be started. Similarly, the edition can only be deactivated when it is stopped.
To activate an edition, select Applications > Edition control center > application_name and then select the edition to activate. Click Activate.
Concurrent activation enables you to activate different editions of the same application on different servers or clusters. To use multiple editions concurrently, it is necessary to distinguish user requests from one another so that the requests can be sent to the application servers that are hosting the appropriate edition. For example, if you introduce a new edition of an application, you might want a select group of users to test the edition and not want all users to have access to the edition. The on demand router policies define the destination of a client request. To have concurrent activation of an edition, you must create a routing policy.
Note: Only one edition can be active in a single target simultaneously. If you want to have multiple editions of the same application concurrently activated, you must use different deployment targets. You also create the routing policies to allow the on demand router to decide to what edition to send the requests.
Creating routing policies for application editions
A routing policy allows you to create rules for the on demand router (ODR) to decide to what edition to send a client request based on a set of criteria. This action is needed whenever you have multiple editions of the same application either in active/validate state or in active/active state.
Editions of an application usually have the same basic parameters used for routing requests, such as virtual host and context root. The routing policy needs extra information to be able to differentiate the client requests and route them to the correct edition. This information can be the IP address, the user ID or group, the time of the request, or many other parameters. For a listing of other parameters, visit the following information center website:
To create a routing policy for an edition:
From the WebSphere administrative console, go to Applications > All Applications.
Select the application for which you are creating the policy. Notice that the policy is created per application and not per edition, so your change affects all editions for the same application.
Go to the Routing Policies tab.
Expand Work classes for HTTP requests and then expand Default_HTTP_WC. This is the default work class for this application.
Add a new rule by clicking Add Rule.
Click Build subexpression to assist you in the definition of the rule. Figure below shows an example of where the client IP address was used.
Copy and paste the subexpression into the rule text box, and select the appropriate action to take when it matches. In this example, we selected the Permit routing with affinity to option. The other available options are listed in the information center website.
Select the appropriate application edition to which to route the traffic. The window looks similar to the figure below.
Click Validate rule.
Click OK and then Save.
Synchronize the nodes. The router policy is picked up automatically by the on demand router after the synchronization finishes.
Make sure you close and open all browser windows before doing the test.
Validating an edition
Validating an application in a realistic way or in a production environment is usually a complicated process. It can demand creating and setting up a whole new environment just for the sake of validation and still incur the risk of not having this validation environment synchronized with the production environment.
WebSphere Application Server V8.5 offers a simplified way of doing this task. By setting an application edition to validation state, it creates a clone of the target used by the previous edition and deploys the edition under validation. The new target (a cluster or stand-alone server) is cloned to target_name-Validation and is displayed as a regular server/cluster.
Note: To use application edition validation, you need to have a configured and working on demand router. The routing policy is used by this component to decide where to send client requests. You must also have an already active edition before starting the validation.
To validate an application edition:
After you install the new edition to the same target as the previous edition, select Applications > Edition control center > application_name
Select the edition you want to validate, and click Validate. Wait for the deployment target to be cloned. Figure below shows the steps executed.
Select Servers > All servers to check that the cloned validation servers were created. If so, start the servers.
Start the application edition under validation in Applications > All applications, if not already started.
Create a new routing policy for the validation edition. This rule ideally applies to a specific set of clients, users, or groups that will have the traffic routed to the application under validation.
At this point you can access the application and validate it. Make sure you close and re-open all browser windows before accessing the application.
After the application is validated, you can either roll it out or cancel the validation. To cancel a validation, go to Application > Edition control center > application_name and then select the edition under validation. Click Cancel Validation.
After the application is rolled out or after it is cancelled, edit the routing policy, and remove the rules created for the validation edition.
Rolling out an edition
When you perform a rollout on an edition, you replace an active edition with a new edition. If the new edition is compatible with earlier versions, you can perform a rollout to replace the active edition without impacting existing clients. An interruption-free replacement is ensured by quiescing current application requests and either rerouting new requests to other servers or temporarily queuing the requests until the new edition is ready for service.
To perform a rollout on a new edition, you must first install the application edition with the new edition information. You also need to have the previous edition of the application active and started.
Performing the rollout
To perform an interruption-free rollout for a compatible application edition:
From the administrative console, go to Applications > Edition control center.
Select the application on which to perform the rollout.
Check the edition to be rolled out, and click Rollout.
Select the rollout strategy, reset strategy, and drainage interval based on the application requirements, and click OK.
After the rollout completes, a window similar to figure below is displayed:
Rolling back an edition
If after the application rollout you find an error and decide to go back, you can easily do this by rolling back to the former edition. The rollback process works the same way as the rollout. The only difference is that you select a previous working edition during the rollout procedure.
To rollback an edition:
From the administrative console, go to Applications > Edition control center.
Select the application that you want to rollback.
Check the previously known working edition, and click Rollout.
Select the rollout strategy, reset strategy, and drainage interval, based on the application requirements, and click OK.