7.4.  Configure and maintain application editions.


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.

  1. 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.

    Figure 7.6. Installing an application edition

    Installing an application edition

  2. 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

    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.

    Figure 7.7. Concurrent activation

    Concurrent activation

  3. 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:

    1. From the WebSphere administrative console, go to Applications > All Applications.

    2. 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.

    3. Go to the Routing Policies tab.

    4. Expand Work classes for HTTP requests and then expand Default_HTTP_WC. This is the default work class for this application.

    5. Add a new rule by clicking Add Rule.

    6. 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.

      Figure 7.8. Subexpression builder

      Subexpression builder

    7. 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.

    8. Select the appropriate application edition to which to route the traffic. The window looks similar to the figure below.

      Figure 7.9. Creating an edition routing rule

      Creating an edition routing rule

    9. Click Validate rule.

    10. Click OK and then Save.

    11. Synchronize the nodes. The router policy is picked up automatically by the on demand router after the synchronization finishes.

    12. Make sure you close and open all browser windows before doing the test.

  4. 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.

    Figure 7.10. Validation mode

    Validation mode

    To validate an application edition:

    1. After you install the new edition to the same target as the previous edition, select Applications > Edition control center > application_name

    2. Select the edition you want to validate, and click Validate. Wait for the deployment target to be cloned. Figure below shows the steps executed.

      Figure 7.11. Validation process

      Validation process

    3. Select Servers > All servers to check that the cloned validation servers were created. If so, start the servers.

    4. Start the application edition under validation in Applications > All applications, if not already started.

    5. 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.

    6. 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.

    7. 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.

    8. After the application is rolled out or after it is cancelled, edit the routing policy, and remove the rules created for the validation edition.

  5. 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.

    Figure 7.12. Rollout diagram

    Rollout diagram

    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:

    1. From the administrative console, go to Applications > Edition control center.

    2. Select the application on which to perform the rollout.

    3. Check the edition to be rolled out, and click Rollout.

    4. Select the rollout strategy, reset strategy, and drainage interval based on the application requirements, and click OK.

    5. After the rollout completes, a window similar to figure below is displayed:

      Figure 7.13. Rollout edition completion panel

      Rollout edition completion panel

  6. 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.

Professional hosting         Free 'Oracle Certified Expert Web Services Developer 6' Guide     Free SCDJWS 5.0 Guide