Most Read This Week
Case Study: From On-Premise to Cloud By @Oracle | @CloudExpo [#Cloud]
There are many technical considerations when moving applications from on premise to cloud
By: Michael Meiner
Nov. 23, 2014 05:00 PM
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
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
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
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.
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.
Subscribe to the World's Most Powerful Newsletters
Today's Top Reads