IBM Cloud Authors: Pat Romanski, Yeshim Deniz, Elizabeth White, William Schmarzo, Karthick Viswanathan

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
    The best way to leverage your Cloud Expo presence as a sponsor and exhibitor is to plan your news announcements around our events. The press covering Cloud Expo and @ThingsExpo will have access to these releases and will amplify your news announcements. More than two dozen Cloud companies either set deals at our shows or have announced their mergers and acquisitions at Cloud Expo. Product announcements during our show provide your company with the most reach through our targeted audiences.
    DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City. Digital Transformation (DX) is a major focus with the introduction of DXWorldEXPO within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of bus...
    With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO and DXWorldEXPO are two of the most important technology events of the year. Since its launch over eight years ago, @CloudEXPO and DXWorldEXPO have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, we provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading...
    DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
    DXWorldEXPO LLC announced today that ICOHOLDER named "Media Sponsor" of Miami Blockchain Event by FinTechEXPO. ICOHOLDER give you detailed information and help the community to invest in the trusty projects. Miami Blockchain Event by FinTechEXPO has opened its Call for Papers. The two-day event will present 20 top Blockchain experts. All speaking inquiries which covers the following information can be submitted by email to info@dxworldexpo.com. Miami Blockchain Event by FinTechEXPO also offers s...
    DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
    Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
    Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
    Cloud-enabled transformation has evolved from cost saving measure to business innovation strategy -- one that combines the cloud with cognitive capabilities to drive market disruption. Learn how you can achieve the insight and agility you need to gain a competitive advantage. Industry-acclaimed CTO and cloud expert, Shankar Kalyana presents. Only the most exceptional IBMers are appointed with the rare distinction of IBM Fellow, the highest technical honor in the company. Shankar has also receive...
    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.
    Poor data quality and analytics drive down business value. In fact, Gartner estimated that the average financial impact of poor data quality on organizations is $9.7 million per year. But bad data is much more than a cost center. By eroding trust in information, analytics and the business decisions based on these, it is a serious impediment to digital transformation.
    The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
    Predicting the future has never been more challenging - not because of the lack of data but because of the flood of ungoverned and risk laden information. Microsoft states that 2.5 exabytes of data are created every day. Expectations and reliance on data are being pushed to the limits, as demands around hybrid options continue to grow.
    Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
    As IoT continues to increase momentum, so does the associated risk. Secure Device Lifecycle Management (DLM) is ranked as one of the most important technology areas of IoT. Driving this trend is the realization that secure support for IoT devices provides companies the ability to deliver high-quality, reliable, secure offerings faster, create new revenue streams, and reduce support costs, all while building a competitive advantage in their markets. In this session, we will use customer use cases...
    Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
    The IoT Will Grow: In what might be the most obvious prediction of the decade, the IoT will continue to expand next year, with more and more devices coming online every single day. What isn’t so obvious about this prediction: where that growth will occur. The retail, healthcare, and industrial/supply chain industries will likely see the greatest growth. Forrester Research has predicted the IoT will become “the backbone” of customer value as it continues to grow. It is no surprise that retail is ...
    Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
    DXWorldEXPO LLC announced today that "Miami Blockchain Event by FinTechEXPO" has announced that its Call for Papers is now open. The two-day event will present 20 top Blockchain experts. All speaking inquiries which covers the following information can be submitted by email to info@dxworldexpo.com. Financial enterprises in New York City, London, Singapore, and other world financial capitals are embracing a new generation of smart, automated FinTech that eliminates many cumbersome, slow, and expe...
    Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will be held June 5-7, 2018, at the Javits Center in New York City, and November 6-8, 2018, at the Santa Clara Convention Center, Santa Clara, CA. Digital Transformation (DX) is a major focus with the introduction of DX Expo within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive ov...