Digital Edition

SYS-CON.TV
Case Study: From On-Premise to Cloud By @Oracle | @CloudExpo [#Cloud]
There are many technical considerations when moving applications from on premise to cloud

Case Study: Moving from On-Premise to Cloud

In this article, we take web applications developed for on-premise and move to the cloud. We first prepare the applications, then we prepare the cloud and finally we deploy our apps to the cloud.

Preparing the Apps
For this exercise, we will be using two applications:

  1. A sample application (sample.war) from Tomcat (available here)
  2. A sample application (examplesWebApp.war) from WebLogic (available as part of the WLS 10.3.6 install)

You can try deploying these apps to tomcat and WebLogic respectively, using a local installation (ie, on premise).

Of course, you can also develop your own servlets or J2EE applications using your favorite application server and J2EE development environment. As we'll see later, the applications for the most part are portable to different app servers and to the cloud; however, for any vendor specific extensions, there may be some customization required for cloud enablement.

Preparing the cloud
There are a number of cloud solutions that can be employed:

  • IaaS - Infrastructure as a service
  • PaaS - Platform as a service
  • Saas - Software as a service

We will look at the first two.

In IaaS, we leverage the cloud for hardware and OS. One such offering is Amazon Elastic Compute Cloud (EC2). A free trial is available, which gives you a linux compute node (1GB RAM). More expandable options are available at a cost. Once you obtain access to your hardware and OS on EC2, you can log into the machine and use it like any other linux machine.  Thus you can install and configure an appserver such as tomcat, and then deploy your apps and voila! You now have moved your application to the cloud!

In PaaS, we leverage the cloud for hardware, OS and also the application server itself which are all managed by the cloud vendor. One such offering is Oracle's Java Cloud Service (JCS) - SaaS Extension. It is Java a platform specially built to deploy extension for Oracle Software as a Service offering .  A free trial is available and this paper uses the free trial. We will use our two applications to represent our SaaS extensions.  A console (based on Oracle's Enterprise Manager) gives you the ability to deploy applications into the cloud.

Deploy Apps to the cloud
To deploy our Tomcat sample to  JCS, we use the Java Console screen (see below). Select ‘deploy new' and then select the war file from your local files. Once the sample is available, you will see the tomcat sample listed as running.

Click on ‘test application' on that row, and it will bring up a window with a URL. Click on the URL and you will bring up the sample tomcat application, running on Oracle cloud!

Now we will attempt to deploy the WebLogic sample. Again, we select ‘deploy new' and point to the examplesWebApp.war. This time, however, we get 2 errors. Looking at the log, they are both in the weblogic extension file, weblogic.xml.

The first error is that <page-check-seconds> is set to 1. pageCheckSeconds specifies the interval in seconds between stale checks for an individual JSP. In development mode, the default is 1 (second). In production, the value should be set to -1 (do not check). Modify this value to -1 and the error disappears.

The second error is that <virtual-directory-mapping> is not allowed. With the JCS SaaS extension offering, you don't have full control over the environment (Oracle has another cloud offering which gives full control) and therefore there is no virtual mapping allowed. In this case, the virtual mapping is pointing to a central location for images. Remove the virtual mapping section. Then copy the images directory to your webapp directory and this will resolve your error.

Note that after making these changes, you will need to repackage the war (using ‘jar cf'). Now deploy using the console and you have your second application running in the cloud.

Conclusion
There are many technical considerations when moving applications from on premise to cloud. This article offers a framework for such considerations. We discussed moving to Infrastructure as a Service (IaaS) and Platform as a Service (PaaS). Then we took applications from Tomcat and WebLogic, and deployed to a Platform as a Service. We noted that application server-specific extensions sometimes need to be adjusted in order to deploy to the cloud.

About Michael Meiner
Michael Meiner is an Engineering Director at Oracle Corporation. His organization is responsible for lifecycle Quality Assurance of the Fusion Middleware Suite of products, including: installation, configuration, upgrade, test-to-production and interoperability on a range of computing platforms and Operating Systems. The Fusion Middleware product suite supports both On-Premise as well as Cloud offerings.



ADS BY GOOGLE
Subscribe to the World's Most Powerful Newsletters

ADS BY GOOGLE

Technological progress can be expressed as layers of abstraction - higher layers are built on top of...
SUSE is a German-based, multinational, open-source software company that develops and sells Linux pr...
Lori MacVittie is a subject matter expert on emerging technology responsible for outbound evangelism...
NanoVMs is the only production ready unikernel infrastructure solution on the market today. Unikerne...
Big Switch's mission is to disrupt the status quo of networking with order of magnitude improvements...
Yottabyte is a software-defined data center (SDDC) company headquartered in Bloomfield Township, Oak...
Dynatrace is an application performance management software company with products for the informatio...
Chris Matthieu is the President & CEO of Computes, inc. He brings 30 years of experience in developm...
All in Mobile is a mobile app agency that helps enterprise companies and next generation startups bu...
Every organization is facing their own Digital Transformation as they attempt to stay ahead of the c...
Blockchain is a new buzzword that promises to revolutionize the way we manage data. If the data is s...
CloudEXPO | DevOpsSUMMIT | DXWorldEXPO Silicon Valley 2019 will cover all of these tools, with the m...
Serveless Architectures brings the ability to independently scale, deploy and heal based on workload...
I spend a lot of time helping organizations to “think like a data scientist.” My book “Big Data MBA:...
The standardization of container runtimes and images has sparked the creation of an almost overwhelm...
Whenever a new technology hits the high points of hype, everyone starts talking about it like it wil...
Wasabi is the hot cloud storage company delivering low-cost, fast, and reliable cloud storage. Wasab...
To Really Work for Enterprises, MultiCloud Adoption Requires Far Better and Inclusive Cloud Monitori...
David Friend is the co-founder and CEO of Wasabi, the hot cloud storage company that delivers fast, ...
In addition to 22 Keynotes and General Sessions, attend all FinTechEXPO Blockchain "education sessio...