Comments
litl_phil wrote: While it's nice that Google and Acer share the vision of cloud-based computing, it's also worth noting that we at litl already have a webbook on the market (available at litl.com) that runs our own cloud-based OS. Unlike Chrome, litlOS is focused on creating a new and better web experience for the home, so we don't have the usual browser interface, we have our own innovative UI. In conjunction with easel mode (litl's inverted-V position) and our growing cohort of litl channels (special apps t...
Cloud Expo on Google News


2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
SYS-CON.TV
Top Links You Must Click On


Crushing Configuration Chaos: Java EE Deployments Made Easy
Deploying and migrating Java EE applications is hard work

This article presents three brief use cases that examine the ways that JavaEE applications are moved across environments. We also show you how a new philosophy could be applied to these use cases to minimize errors, increase deployment speed, and assist in troubleshooting applications.

A New Philosophy, A New Approach
The new philosophy encapsulates the way sys admins should think about deployments. Today, deployments are most often thought of as atomic instances, as actions, rather than a process. A new approach is to think of deployments holistically. For example, deploying EAR files should not be parsed apart from configuring a server. The method for deploying to the test instance shouldn't be any different than the method used in staging, production, or development. Furthermore, troubleshooting a configuration is just as much a part of deployment as any other step. At the end of the day, all of the pieces need to be considered together to make the application work the way it was intended. In short, deployments are dynamic because they go through a growing, changing, and unpredictable lifecycle. The professionals who manage application environments are forced to make assumptions about their use and growth; for the most part those assumptions are usually correct. But over time, those environments will invariably change in unexpected ways: new technologies are adopted; business requirements change; even the personal style and best practices of the IT professionals managing the process may evolve. All of these issues make the application environments highly variable. Each deployment into an environment can be quite different, presenting many problems unless the deployment process is flexible enough to adapt to those differences. Deployments are inherently dynamic because each environment may differ slightly from every other environment, and the environments themselves may be in flux. Also, keep in mind that many companies today may be developed in one environment and deployed in another (e.g., develop on JBoss then deploy on WebSphere). The new way of thinking provides an opportunity to conceptualize the deployment process and approach.

An effective Java EE deployment process must be able to:

  • Baseline a "known good" configuration environment.
  • Understand what changes will be made if that configuration were applied to another environment.
  • Apply only those changes that are required and provide a point of control for "optional" configuration changes.
  • Provide robust error management including rollbacks, uninstalls, logging (for debugging), and troubleshooting.
  • Be able to drop seamlessly into an existing application lifecycle process.
  • Provide extension points for other configuration parameters and be flexible enough to deploy to the environments needed without undue reliance on infrastructure.
  • Provide an audit trail for changes and monitor the application to verify that it continues to be configured in the way the business wants.
Furthermore, these steps must be combined with three component parts. Unfortunately, many people today don't separate these three parts for deployment and this causes problems. The three components are colloquially termed a) the What, b) the Where, and c) the How. If these three components are intermingled, the result can be a very messy problem. If you separate them, the result is always a predictable, repeatable process that eliminates runaway errors and costs. The three component parts are specifically known as:
  • Payload (the What) - the bundled application binaries (EARs, WARs, etc.) and the desired configuration (JDBC, JMS, etc.). The configuration should be abstracted from and independent of any target specifics (such as topology, application server vendor, and version).
  • Target (the Where) - environment-specific details (hostname, db location, cluster size, etc.).
  • Mechanism (the How) - an application or tool that can deploy any element in a payload to any given target, and also generate payloads from a target.
The decoupling of the payload, target, and mechanism are critical to the successful implementation of a dynamic deployment process. Properly implemented, this process enables consistent, repeatable, and predictable deployments.

The following are brief examples of specific use cases that demonstrate the value of this approach. While not inclusive of all of the benefits, these examples present concrete reasons for adopting this philosophy.

Use Case 1: Modeling an Existing Application Infrastructure
This use case is most common at the beginning of a deployment - a simple baseline to determine what does or doesn't exist on the server, either as an inventory exercise or in preparation for a deployment change or upgrade. Doing even this simple activity with existing methods can be difficult. With most application servers there are really two ways to go about doing an inventory, and both are fairly cumbersome. The first is to page through the management console and note the applications installed, how they are configured, and what other configurations are present (JMS, etc.). A second way involves parsing the raw configuration files from the server to discover the required information. Neither approach is simple; both feature multiple opportunities for error even if done by experienced staff.

The new approach transforms the modeling task into a straightforward procedure. The mechanism defined in this approach can not only deploy applications and configurations, but also generate payloads from a target environment. In this use case the mechanism would be pointed at the target to generate an abstract representation of the target's configuration. This output would serve as both a model for the application infrastructure and a baseline for applying that same configuration to another environment. For example, there are tools that generate output from a server snapshot; the output could be an XML representation (human-readable) of the entire application configuration. This output is both easy to generate (because the mechanism is doing all the work for you) and not subject to error. Furthermore, the XML representation is an extremely portable semantic representation of the configuration. In other words, technical personnel can use a text editor (any text editor, really) to read the contents, or feed the contents of the file to any process to transform the captured semantics into some other output, be it an HTML rendering or a set of instructions.

Use Case 2: Migrating Applications from Development to Quality Assurance (QA) to Production
Every Java EE application goes through a development/test lifecycle. Most commonly, promoting applications from environment to environment is achieved via two routes: manual or scripted deployment. In my experience either route is problematic. Manual deployment isn't only time-consuming, but also extremely error-prone. The scripted approach doesn't give much advantage, as scripts must be continually updated and kept in sync between environments. In either case, if something goes wrong during deployment the target environment can be left in an unknown "Frankenstein-like" state. With the new approach, deploying from development to QA to production is straightforward, automated, and robust. For example, let's imagine that the target environment for deployment is a two-way WebSphere cluster. Prior to deployment, the server variables would be identified and defined, most likely in a simple properties file containing all the environment variables that should change from one deployment to the next. For simplicity's sake, we'll assume that the only variables that will change from one environment to the next are: hostname, admin port, db location, and topography. In this case, the properties file would be a simple key-value pair for each of those attributes. At deployment, the payload would consist of the actual application binaries, the XML document that describes the configuration, and the server properties. These artifacts would be fed into the deployment mechanism, which would, on-the-fly, translate the environment variables and payload into the target environment. Hostname, admin port, db location, and topography are automatically merged into the generic configuration document. The deployment mechanism then interrogates the target server and only makes the changes necessary to the environment so it matches the abstract configuration (after first identifying the changes that it will make). If at any point in the deployment process something goes wrong, then all the changes are rolled back, leaving the environment exactly as it was prior to the attempted deployment. Verbose logging of the deployment aids in the identification and correction of the underlying problems.

When the process goes well and it's time to deliver the application to a "production" environment, the same mechanism and configuration document are used to deploy the application (as was used in the test deployment). The only change is to the pre-defined server properties, which should remain fairly static across time. What's tested, both application and configuration, is what gets deployed.

Use Case 3: Troubleshooting a Configuration Problem
Let's assume that there are two servers with the same applications installed on them. One works and one doesn't. This is a surprisingly common situation in installations today. Today, comparing those servers in an effort to figure out "what's different" is an arduous task. "Diffing" the raw configuration files is a daunting if not impossible task - most configuration files contain too many false positives. The only other existing method, going screen-by-screen in the management console, is so difficult that it rarely makes the list of "reasonable" approaches. The new approach recognizes that troubleshooting is part of the deployment process. Because it assumes the ability to export configurations from servers and present that information in a standard abstract format, it can now compare those configurations side-by-side and show only those differences that matter. In my experience, approximately 25% to 40% of all deployment defects are configuration-related. Able to identify a configuration error quickly, or at least rule out configuration as a potential source of the behavior, conflict resolution is faster, easier, and more specific.

Conclusion
Deploying applications on Web application servers doesn't have to be an arduous, expensive, time-intensive process. Using this new approach, organizations can separate payload, mechanism, and target and create fast, automated deployments without using scripts. Thinking of deployments in this new way can crush the chaos, once and for all.

About Daniel Nelson
Daniel Nelson serves as vice president, products, and is one of the original founders of Phurnace Software. He is responsible for all aspects of product management including innovation and product line expansion. Daniel has over ten years of experience in the software development field, eight of which are in senior management positions in operations, project management, and quality assurance at innovative early-stage software companies such as Isochron Data, drkoop.com, the Cobalt Group, NetObjects, and SurfWatch Software. Daniel has spent the last six years working specifically with Java EE? technologies. Daniel has a B.A. and an M.B.A. from the University of Texas at Austin. His idea and business plan for Phurnace Software, Inc. won him the coveted Moot Corp. Award in 2006 from the University of Texas competition.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

Enterprise Open Source Magazine Latest Stories . . .
Oracle seems to have divided the open source ranks over the MySQL delay it’s having closing its acquisition of Sun. Eben Moglin, the GPL’s most ardent defender and delineator, the lawyer who has worked hand in glove for years with the Free Software Foundation’s founder Richard Stallman...
Cloud computing is a game changer. The cloud is disrupting traditional software and hardware business models by disrupting how IT service gets delivered. Entrepreneurial opportunities abound as this classic disruptive technology begins to proliferate, so it is no surprise that SYS-CON'...
The irony is that Oracle has advanced MySQL, lost money in the process, and helped its competitors - all at the same time. When Oracle buys Sun and controls MySQL the gift (other than to Microsoft SQL Server) keeps on giving as the existential threat to RDBs is managed by Redwood Shore...
WSO2, the open source SOA company, today announced the launch of the WSO2 Cloud Platform. Available today, the new WSO2 Cloud Platform features a family of WSO2 Cloud Virtual Machines; WSO2 Cloud Connectors for enabling fast, secure cloud services; and the multi-tenant WSO2 Governance-...
Now, the open source Mozilla Thunderbird client software can be used with Open-Xchange collaboration software. The "Community OXtender for Thunderbird" software connector gives users full access to appointments and contacts stored in the Open-Xchange Server and enables them to use Thun...
Morph Labs, a leading provider of enterprise cloud computing technology, today announced an introductory trial of the Morph CloudServer, an open, standards-based server IT organizations can use to rapidly model and evaluate their cloud implementations. A miniature "Cloud Environment in...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON Featured Whitepapers
ADS BY GOOGLE