IBM Cloud Authors: Liz McMillan, Pat Romanski, Yeshim Deniz, Carmen Gonzalez, Elizabeth White

Related Topics: IBM Cloud

IBM Cloud: Article

Automated Deployment of Enterprise Application Updates

Part 2 - Run randomly built collections

This two-part article discusses application deployment, particularly automated updates, to IBM WebSphere Application Server in a large-scale enterprise environment. It applies to Application Server versions 5.0, 5.1, and 6.0, and also includes an introduction to a few version 6.0 enhancements. This article is not intended to be used as a reference for all the details of Application Server administration, but it does describe the key concepts used and contains a list of references. Although the beginning of the article reviews some fairly basic base server and managed server concepts and operations, much of the remainder of the article will discuss certain complex concepts or operational considerations that will be new even to very experienced enterprise application server administrators.

Part one of this article discussed wsadmin deployment to base and managed servers. It examined why phased deployments are needed to maintain applications in an Application Server Network-Deployment managed cell, and how to maintain high availability in such an environment.

This article discusses pre- and post-deployment validation as well as gradual deployment of incompatible versions. It also discusses the design and implementation of a downloadable Automated Deployment example program that illustrates how to automate the deployment of randomly built collections of enterprise applications or updates, and how to automatically target those applications or updates to the correct servers, including stage-specific application setup.

Pre- and Post-Validation to Maximize Availability

As in all of the deployment scenarios mentioned in Part 1 of this article, it makes no sense to start deploying an application update if it contains problems that are likely to cause the deployment to fail.

Typical pre-validations can include validating that (see Figure 1):

  • The application (EAR) appears to be complete and well formed.
  • The deployment targets and the required application settings are known.
  • The deployment target nodes and servers, or clusters, are valid.
  • The deployment target nodes and servers, or clusters, are running and are accessible.
  • The application settings are valid.
  • The application is already installed, in the case of an application update.
  • The application is not already installed, in the case of an application installation.
  • Dependencies (prerequisites, resources, or interdependent application versions) are met.
Typical post-validations can include validating that (see Figure 2):
  • The application installed correctly.
  • The application started.
  • The application appears to be the correct application, and is running correctly.
    - One or more Web page HTTP requests return the expected HTTP response.
Note: This is not a complete function test of the application, just validation that it is running.

Gradual Deployment (Incompatible Version Migration) Using Versioned Cells

Sometimes a set of interrelated application updates has significant interrelated changes, and the rollout of all those updates must be done at the same time. Of course, enterprise application availability must still be maintained. There is a similar version incompatibility problem if the application update changes the user experience, uses different database schemas, or uses different HTTP session-persistent data. All of these major updates typically require a gradual and carefully controlled rollout of the new version. Many large organizations (financial institutions, hospitals, etc.) require that all updates be handled this way.

An incompatible version update is typically accomplished using two sets of independent production cells. The current production cell is running version=N of all applications, and handling all user requests. Another independent cell then receives deployment updates for version=N+1 of all applications, but it is not active. Network Dispatchers (IP sprayers) provide session affinity, which means that multiple request-response HTTP messages from the same user will be routed to the same Web server and application server for processing. Thus the old version=N cell can be quiesced (allowed to continue processing ongoing HTTP sessions), but the Network Dispatchers (IP sprayers) route new requests to the new version=N+1 cell.

The transition to the new version=N cell can be done either slowly, by gradually increasing the work management load on the new cell, or relatively quickly. Some organizations will initially route selected risk-tolerant users (from selected source HTTP addresses) to the new version=N+1 cell, and only after a successful operation will they reroute the balance of incoming requests. If there is a problem, the work can be routed back to the old cell. Once the transition to the new version=N+1 cell is complete, the old cell is then typically updated to the same version=N+1, or it is used to start a new version=N+2 rollout.

There are many variations on the preceding approach. Some organizations run the parallel cells on separate machines. Others install parallel (but independent) nodes on the same machines. Some organizations just use a single cell with redundant (but independent) clusters, and do a gradual deployment one cluster at a time, using the Web HTTP server (configured with session affinity) to carefully quiesce and reactivate workflow to each of the clusters.

Of course, nearly every organization first extensively tests the new updates in a pilot-production stage, including functional testing and performance/stress testing, before the production rollout is even started.

For an excellent case study of how the New York Stock Exchange (NYSE) and the Securities Industries Automation Corporation (SIAC) achieve extreme availability using gradual rollouts, see the article "Extreme Availability with WebSphere and DB2" in the reference section.

Automating Enterprise Application Update Deployments

The downloadable Automated Deployment example program shows a way to simplify the automated deployment of enterprise updates while helping to maximize enterprise application availability. The Automated Deployment example is designed and implemented to handle the typical enterprise concept of deployment Stages (see Figure 3).

The Automated Deployment example may be invoked manually or by some regularly scheduled system program (see Figure 4). The invocation must specify the input Distribution Directory, the deployment Action to perform, and the deployment Stage qualifier:

The stage name is just a text qualifier to the application Target and Settings files, and may represent quality stages (integration, pilot, production, etc.), platforms (Windows, Linux, z/OS, etc.), organization departments (sales, finance, etc.), or whatever names or combinations a particular enterprise uses.

If an updated application myApp.ear is to be deployed into the pilot stage, then a typical MyApp-pilot.targets server targets property file (or XML file or database entry, etc.) might be:

# multiple entries: nodeserver=nodeName,serverName
# multiple entries: cluster=clusterName
nodeserver = myNode,myServer1
cluster = myCluster

# multiple entries: testURL = URL
# multiple entries: testResult = resultString
testURL = http://myHost:9081/myAppWeb/AdderTest.jsp
testResponse = Java adder(3,4) = 7
testURL = http://myHost:9085/myAppWeb/AdderTest.jsp
testResponse = EJBsessionbean adder(5,6) = 11

Similarly, a typical MyApp-pilot.settings application settings property file might be:

# myApp application EAR

# myApp webmodule WAR

The overall automated deployment sequence is (see Figure 5):

  1. Invoke the automated distribution program
    a. This is typically done from an automated system cron job, but may be manually invoked
    b. The invocation command also specifies the stage to be deployed to
  2. Read the distribution directory to determine the new application updates to be deployed
  3. For each application update, read its stage-specific server targets and application settings
  4. From the total set of affected nodes and servers, calculate the subset of unique affected nodes and unique affected servers
  5. Pre-validate that the applications and targets and settings are valid
  6. Save and then disable AutoSync on all affected nodes
    a. Optionally, you can save and disable SyncOnStartup
  7. Install the applications into the Deployment Manager repository:
    a. Set the stage-specific application settings
    b. Set the stage-specific target servers or clusters
  8. Sequentially, for each affected node, phase distribute the updates:
    a. Optionally, quiesce all its affected servers (reroute new work requests)
    b. Stop all its affected servers
    c. NodeSync that node to retrieve all updates and install them into the affected servers
    Note: Wait to ensure the EAR expansion is complete
    d. Restart the affected servers
    Note: Test and wait to ensure the server is running
    e. Optionally reactivate the affected servers (to process new work requests)
    f. Optionally validate the installed application operation and request manual confirmation
  9. Restore the previous AutoSync settings for all affected nodes
    a. including SyncOnStartup if it was optionally disabled
  10. Post-validate all applications
  11. Move validated applications into the released directory
    a. If it failed, you can attempt to restore the previously released application
  12. Optionally e-mail the deployment log to a notification list
As before, there are two special notes in the above steps. First, after performing the NodeSync, the application update (EAR) has been distributed down to the node, but the EAR file must still be expanded into the server installed application directory. Until this EAR expansion is complete, attempting to start the server may produce indeterminate results. There is an IBM Problem Report about this and in the future there may be a downloadable Application Server Interim Fix to allow scripts to test for the completion of the EAR expansion. Second, after returning from the wsadmin startServer command, the command has been processed by the Node Agent, but the actual server startup may not yet be complete. Scripts need to test that the server has completed startup and is running.

Review of Requirements and Benefits of Automated Update Deployments

Automated update deployments are intended to:
  • Automatically detect current updates to be deployed
  • Automatically read stage-specific targets and application settings
  • Optionally, read application requirements (prerequisites, resources, interdependent versions, etc.)
  • Minimize failures by pre-validating as much as possible
  • Only update affected nodes and affected servers
  • Only cycle affected nodes and servers once each (even in the case of many concurrent updates)
  • Only cycle one affected node at a time to maximize application availability:
    - Optionally, quiesce affected servers (to allow complex in-progress HTTP sessions to complete)
    - Stop affected servers (to allow server failover and session recovery)
    - NodeSync to retrieve all updates and install them into the affected servers
    - Restart all affected servers
    - Optionally, reactivate affected server if quiesced
    - Minimize the effect of failures by post-validating

Deployment Actions

The primary focus of this article has been the deployment of application updates since that is by far the most complex deployment problem. Generically, the most common deployment actions are:
  1. Install (a new, nonexistent application)
  2. Update (a rebuilt application, or rebuilt application components)
  3. Reconfigure (change application settings or targets)
  4. Uninstall (remove an existing application)

Automated Deployment Example Program Updates and Limitation

It is expected that any updates to the current version 1.1 (December 2004) Automated Deployment example program may be available from the Application Server "Sample Scripts" Web page in the Developer Domain Application Server Library Samples (www.ibm.com/developerworks/websphere/library/samples/SampleScripts.html).

Some limitations in the current example program include:

  1. Limited error detection and exception handling (not production quality code)
  2. No exploitation of Application Server security (no userid nor password passed to wsadmin)
  3. No handling of nested or complex attributes (for application settings)
  4. Errors and Warnings are logged and summarized, but no e-mail notification is generated
  5. No handling of incompatible applications or versions (no interdependency analysis)
    a. Today, many customers handle this by having version=N and version=N+1 cells


WebSphere Application Server Administration
  • IBM WebSphere Application Server Network Deployment V5.1: System Administration: ftp://ftp.software.ibm.com/software/webserver/appserv/library/wasv51nd_admin.pdf Ch-4: Welcome to Scripting, Ch-5: Deploying and Managing Using Scripting
  • Williamson, Leigh; Chan, Lavena; Cundiff, Roger; (et al.) (2004). ISBN-0131446045. IBM WebSphere System Administration
  • Barcia, Roland; Hines, Bill; Alcott,Tom; Botzum, Keys (2004). ISBN-0131468626. IBM WebSphere: Deployment and Advanced Configuration

    WSADMIN Scripting

  • WebSphere Application Server Information Center: Deploying and managing using scripting: http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/ com.ibm.websphere.nd.doc/info/ae/ae/trun_wlm.html
  • WebSphere Application Server Technical Library, Sample scripts: www.ibm.com/developerworks/websphere/library/samples/SampleScripts.html
  • RedBook: WebSphere Version 5 for z/OS - WSADMIN Primer: www.ibm.com/support/docview.wss?uid=tss1wp100421

    WebSphere Availability and Workload Management

  • Extreme Availability with WebSphere and DB2: www.ibm.com/websphere/developer/zones/hipods/
  • High Performance On Demand Solutions: www-128.ibm.com/developerworks/websphere/zones/hvws/library.html
  • RedBook: WebSphere V5 Performance, Scalability, and High Availability: www.redbooks.ibm.com/abstracts/sg246198.html
  • RedPaper: Server Clusters For High Availability in WebSphere Application Server Network Deployment V5: www.ibm.com/support/docview.wss?uid=swg27002473
  • Maintain continuous availability while updating WebSphere Application Server enterprise applications: www.ibm.com/developerworks/websphere/techjournal/0412_vansickel/0412_vansickel.html
  • Using WebSphere Application Server V5 for Load balancing and Failover: www.ibm.com/developerworks/ibm/library/i-wasldbal/index.html

    A detailed list of resources pertaining to this article can be found online at http://sys-con.com/websphere.

  • More Stories By Ellen Matheson McKay

    Ellen Matheson McKay is an information developer for IBM Canada Ltd. She writes online help and publications for Rational Application Developer.

    More Stories By Barry Searle

    Barry Searle is the architect for WebSphere Tools for Automated Build and Deployment. A professional engineer, he has worked at the IBM Canada Lab for over 15 years on various application development tools. Prior to that he worked on developing command and control systems, and leading complex communications development projects.

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

    @ThingsExpo Stories
    In this strange new world where more and more power is drawn from business technology, companies are effectively straddling two paths on the road to innovation and transformation into digital enterprises. The first path is the heritage trail – with “legacy” technology forming the background. Here, extant technologies are transformed by core IT teams to provide more API-driven approaches. Legacy systems can restrict companies that are transitioning into digital enterprises. To truly become a lead...
    SYS-CON Events announced today that CAST Software will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. CAST was founded more than 25 years ago to make the invisible visible. Built around the idea that even the best analytics on the market still leave blind spots for technical teams looking to deliver better software and prevent outages, CAST provides the software intelligence that matter ...
    SYS-CON Events announced today that Daiya Industry will exhibit at the Japanese Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Ruby Development Inc. builds new services in short period of time and provides a continuous support of those services based on Ruby on Rails. For more information, please visit https://github.com/RubyDevInc.
    As businesses evolve, they need technology that is simple to help them succeed today and flexible enough to help them build for tomorrow. Chrome is fit for the workplace of the future — providing a secure, consistent user experience across a range of devices that can be used anywhere. In her session at 21st Cloud Expo, Vidya Nagarajan, a Senior Product Manager at Google, will take a look at various options as to how ChromeOS can be leveraged to interact with people on the devices, and formats th...
    SYS-CON Events announced today that Yuasa System will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Yuasa System is introducing a multi-purpose endurance testing system for flexible displays, OLED devices, flexible substrates, flat cables, and films in smartphones, wearables, automobiles, and healthcare.
    SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Taica manufacturers Alpha-GEL brand silicone components and materials, which maintain outstanding performance over a wide temperature range -40C to +200C. For more information, visit http://www.taica.co.jp/english/.
    SYS-CON Events announced today that SourceForge has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. SourceForge is the largest, most trusted destination for Open Source Software development, collaboration, discovery and download on the web serving over 32 million viewers, 150 million downloads and over 460,000 active development projects each and every month.
    SYS-CON Events announced today that Nihon Micron will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Nihon Micron Co., Ltd. strives for technological innovation to establish high-density, high-precision processing technology for providing printed circuit board and metal mount RFID tags used for communication devices. For more inf...
    Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities – ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups. As a result, many firms employ new business models that place enormous impor...
    SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
    Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
    SYS-CON Events announced today that Dasher Technologies will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Dasher Technologies, Inc. ® is a premier IT solution provider that delivers expert technical resources along with trusted account executives to architect and deliver complete IT solutions and services to help our clients execute their goals, plans and objectives. Since 1999, we'v...
    SYS-CON Events announced today that TidalScale, a leading provider of systems and services, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale has been involved in shaping the computing landscape. They've designed, developed and deployed some of the most important and successful systems and services in the history of the computing industry - internet, Ethernet, operating s...
    SYS-CON Events announced today that Massive Networks, that helps your business operate seamlessly with fast, reliable, and secure internet and network solutions, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. As a premier telecommunications provider, Massive Networks is headquartered out of Louisville, Colorado. With years of experience under their belt, their team of...
    SYS-CON Events announced today that IBM has been named “Diamond Sponsor” of SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California.
    Infoblox delivers Actionable Network Intelligence to enterprise, government, and service provider customers around the world. They are the industry leader in DNS, DHCP, and IP address management, the category known as DDI. We empower thousands of organizations to control and secure their networks from the core-enabling them to increase efficiency and visibility, improve customer service, and meet compliance requirements.
    SYS-CON Events announced today that TidalScale will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale is the leading provider of Software-Defined Servers that bring flexibility to modern data centers by right-sizing servers on the fly to fit any data set or workload. TidalScale’s award-winning inverse hypervisor technology combines multiple commodity servers (including their ass...
    As hybrid cloud becomes the de-facto standard mode of operation for most enterprises, new challenges arise on how to efficiently and economically share data across environments. In his session at 21st Cloud Expo, Dr. Allon Cohen, VP of Product at Elastifile, will explore new techniques and best practices that help enterprise IT benefit from the advantages of hybrid cloud environments by enabling data availability for both legacy enterprise and cloud-native mission critical applications. By rev...
    Join IBM November 1 at 21st Cloud Expo at the Santa Clara Convention Center in Santa Clara, CA, and learn how IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Cognitive analysis impacts today’s systems with unparalleled ability that were previously available only to manned, back-end operations. Thanks to cloud processing, IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Imagine a robot vacuum that becomes your personal assistant tha...
    As popularity of the smart home is growing and continues to go mainstream, technological factors play a greater role. The IoT protocol houses the interoperability battery consumption, security, and configuration of a smart home device, and it can be difficult for companies to choose the right kind for their product. For both DIY and professionally installed smart homes, developers need to consider each of these elements for their product to be successful in the market and current smart homes.