IBM Cloud Authors: Liz McMillan, Stackify Blog, Elizabeth White, Pat Romanski, Yeshim Deniz

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 his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
    "There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    "Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
    Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
    Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
    "Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    "MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
    "IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
    SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
    "Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
    It is of utmost importance for the future success of WebRTC to ensure that interoperability is operational between web browsers and any WebRTC-compliant client. To be guaranteed as operational and effective, interoperability must be tested extensively by establishing WebRTC data and media connections between different web browsers running on different devices and operating systems. In his session at WebRTC Summit at @ThingsExpo, Dr. Alex Gouaillard, CEO and Founder of CoSMo Software, presented ...
    WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, introduced two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a multip...
    A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
    SYS-CON Events announced today that Evatronix 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. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
    Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
    To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
    An increasing number of companies are creating products that combine data with analytical capabilities. Running interactive queries on Big Data requires complex architectures to store and query data effectively, typically involving data streams, an choosing efficient file format/database and multiple independent systems that are tied together through custom-engineered pipelines. In his session at @BigDataExpo at @ThingsExpo, Tomer Levi, a senior software engineer at Intel’s Advanced Analytics gr...
    When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things’). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing? IoT is not about the devices, it’s about the data consumed and generated. The devices are tools, mechanisms, conduits. In his session at Internet of Things at Cloud Expo | DXWor...