How to deploy Liferay Portal to Jelastic cloud

Here is a step-by-step instruction on deploying Liferay Portal, a popular enterprise web platform for building business solutions, to Jelastic cloud. Jelastic can run and scale any Java application with no code changes required so the steps we describe here are applicable to most Java applications.

Let’s get started!

1. Create the environment

1. Go to jelastic.com and sign up if you haven’t done it yet or log in with your Jelastic credentials by clicking the Sign In link on the page.

2. Click Create environment to set up a new environment in Jelastic.

liferay hosting

3. In the Environment topology window, select Tomcat 6 as your application server, set the Cloudlets limit (e.g. 12), type your environment name, for example, liferay, and click Create:

liferay cloud

In a minute your environment will be created and appears in the environments list.

liferay in the cloud

2. Upload Java package

1. Go to the Liferay web site, navigate to Downloads and download Liferay Portal Community Edition.

host liferay

2. Extract the files from this archive on your computer.

3. On Liferay web site, navigate to Additional Files and simply copy Liferay Portal CE GA4 WAR URL.

liferay portal hosting

Notice: If the URL is too long, you can get an exception. In this case try to use link from another downloading mirror.

4. Switch to Jelastic and upload the downloaded tomcat libraries Liferay application needs: liferay-portal-tomcat-6.0.6-20110225/liferay-portal-6.0.6/ tomcat-6.0.29/lib/ext.

5. After the upload is complete, navigate to Tomcat section and click on Config button. The config tab opens next to Deployment manager tab.

liferay connection
liferay deploy

6. Navigate to the home folder and click the New file button to create a new portal-ext.properties configuration file. Type the following: resource.repositories.root=${user.home}/liferay and click Save.

liferay install

7. Upload the liferay-portal-6.0.6-20110225.WAR Java package to the Deployment manager via URL, you have copied earlier.

liferay war

8. Once the package is in Jelastic dashboard, deploy it to the environment you have just created by clicking the Deploy button near the package name.

liferay portal cloud

Now you can finally navigate to Liferay Portal, create your account and use all capabilities of this application!

liferay portal in the cloud

And here is a video version of the same procedure:


With the “One click” install option you can have Liferay up and running within minutes. Our application packaging gives you rapid and stable multitenancy. The process is simple. Just a few clicks and you are done. Navigate to our Applications page, select Liferay from the list of available apps and get it hosted in a minute, skipping the steps of manual installation. You can find more details about Jelastic App Packaging here.



64 Responses to “How to deploy Liferay Portal to Jelastic cloud”

  1. Alvin P. Reyes

    Nice Guide!

    I’m new to Jelastic but I’ve been checking out Liferay for a while. I’m actually thinking of putting my dummy liferay instance in my own Jelastic Account. :) Thank you for this!

    Reply
  2. murali

    how to upload my spring-hibernet portlet application war file inside jelastic-liferay cloud.

    Reply
  3. murali

    give clear idea “web-server where Liferay is installed” means.

    i need to deploy my application war file inside a ROOT directory or any where.. already in ROOT directory liferay standlone server is there.. how life-ray will recognize my portal application war.

    Reply
  4. Marina Sprava

    It seems that you have to add your .war file via admin page of Liferay..there you will be able to chose in which context deploy your .war.

    Reply
  5. murali

    how to chose context deploy path..can please you give step by step procedure.?

    Reply
  6. Install Liferay CE on Cloud | Tech blog Wasim Shaikh

    [...] just sign up and follow this step to install Liferay on Cloud (this is [...]

    Reply
  7. Wasim Shaikh (@wasim117)

    Thanks for the Detailed Article , here is the Video I have created using screenr , and installed liferay on jelastic

    http://blog.wasimshaikh.com/2011/11/05/install-liferay-ce-on-cloud/

    And Liferay Instance can be found here http://lr-themes.jelastic.servint.net/
    If jelastic keep this as free then I will use this url for theme preview.

    Thanks,
    Wasim Shaikh
    blog.wasimshiakh.com

    Reply
  8. murali

    i need how to deploy my spring-hibernet war file inside a liferay on jelastic cloud…….

    Reply
  9. Joss

    Quick note – it seems that multiple uploads and large uploads are not working, so:

    When you come to the section about uploading the Library bits – expand your environment (little arrow) and the mouseover Tomcat 7 (in my case) and click on configure.

    In the lower pane, open the Lib directory in the tree and mouse over next to the lib directory – click on Upload.

    Browse to the ext directory as said above and then upload all those jar files ONE AT A TIME!

    I tried several times to upload them en masse and the just didn’t appear.

    With the WAR file, it uploaded it, apparently, but it never appeared on the list. So instead, go to Liferay.com and get the Direct Url for the file from the sourceforge download page (that you land on when you download normally.) Use that and put it in the URL field in Jelastic when you use the deployment manager to upload.

    Reply
    • Joseph Toman

      I had problems getting the WAR file for 6.2.0-GA1 uploaded because it’s too large to upload locally and Sourceforge uses redirects to get it from the right mirror. Jelastic doesn’t like uploads that end in “download”. To get the correct URL you actually have to start downloading the WAR file in a browser, and right click on the download in the download window (in Firefox) to “Copy Download Link”. I’m sure there are similar things in other browsers.That finally worked for me and I’m back on track getting 6.2.0 installed on Jelastic.

      Reply
  10. Marina Sprava

    Hello Joss! Thanks for your report! This problem is being fixed now by our team. You can try to divide jar files into several parts and upload them in turn.

    Reply
  11. Jelastic and Performance issues - Forums - Liferay.com

    [...] to have a play on this environment, it is free to use while in Beta. You can find instructions here.However, I found a couple of problems. First of all when you come to the part about loading the [...]

    Reply
  12. murali

    hello… how to deploy the custom portlet application inside liferay on jelastic cloud?

    Reply
  13. sandeep

    Hi I am trying to upload liferay 6 beta 4 war in jelastic and its getting stuck in between complaining about the size. Is there a restriction on the size max size = 157286400

    Is there any workaround fro the same

    Reply
  14. Marina Sprava

    Hi! Yes, we have the restriction on the size of .WAR archive – 150MB. Since our 1.4 version users have an opportunity to use external storages for deploying their .war archives, all you need is just store your .war archive on an external storage and then use link (ftp, http) to this file in Jelastic Deployment Manager. Please visit our docs at http://jelastic.com/docs/file-uploading.

    Reply
  15. sandeep

    Thanks Marina for very prompt response. Yeah i tried to do that as well. I used the direct link url provided in sourceforge. It immediately shows the war as uploaded but while i deploy, it gives zip reading exception, not being able to extract properly.

    Reply
  16. Marina Sprava

    Is it a standart .WAR archive? Are you sure that all is ok with this .WAR?

    Reply
  17. sandeep

    Yes I am using this Link to upload liferay war. http://sourceforge.net/projects/lportal/files/Liferay Portal/6.1.0 B4/liferay-portal-6.1.0-ce-b4-20111110.war/download?use_mirror=voxel

    I dont know how to check if the war is valid coz all i have to do is give this url and it shows me uploaded in frontend.

    Reply
  18. sandeep

    Hi,

    I deleted the war that was deployed and the uploaded file and again did the same. I got the zip exception. But then I restarted the server and it is working :) Thanks for the support :)

    Reply
  19. Marina Sprava

    It is great! Feel free to ask us!

    Reply
  20. sandeep

    There is a tunnel-web war file that liferay needs if you want to expose Liferay web services. I was trying to upload the same and setting the context to tunnel-web but jelastic is not allowing me to add hyphen(-) in context name. Liferays webservices can be accessed by http://domain/tunnel-web/axis/ and it requires the context name to be tunnel-web

    Reply
  21. Marina Sprava

    We are fixing this problem now. You can try to upload your .WAR to Tomcat/webapps.

    Reply
  22. sandeep

    Thanks Marina. Can i know what decides the number of cloudlets that i see. I saw cloudlets being used going upto 9. So i stopped the environment and it still doesnt seem to come down. How do I know what is eating the cpu and memory when I have completely stopped the environments

    Reply
  23. Marina Sprava

    Hi! Give us the name of your environment, please, and we’ll try to help you.

    Reply
  24. liferaysatish

    Hi Marina

    I have tried as you suggested. It is working find for me.

    It’s awesome….:)

    Regards
    Satish Babu

    Reply
  25. Marco

    After click on few pages on Liferay Portal installed on Jelastic the maximum space of 1Gb of storage get reached due JSP compilation process and temp files used….

    Reply
  26. Sandeep

    Hi Marina,

    Hope you are doing good. I was today trying to use same environment that i used to configure my previous version of Liferay with new version of liferay. Today what i did was i deleted ROOT and removed old dependency jars and was trying to upload new dependency jars in lib folder and it would say Please only upload files that have extensions: .jar

    Reply
  27. Sandeep

    Its liferayb4

    Reply
  28. Marina Sprava

    Can you upload these jars to other environment?

    Reply
  29. Sandeep

    Ok you want me to create a new environment and upload jars into that. I could do that. But the reason i was doing the way i did was, normally in Liferay when we upgrade from one version to another we just change the war and replace the dependency jars and point to the same database. Thats how we uprgade to a newer version of Liferay

    Reply
  30. Sandeep

    I have extracted and was trying to upload jars one by one. Let me try again.

    Reply
  31. Sandeep

    No its not working for me. If you can access my environment and try uploading jars in lib it would be great. Or is there any way i can give access of my environment to you?

    Reply
  32. Sandeep

    I have tried the same way, as I had already tried this exercise before. I still am not able to do the same. Seems like a bug to me. I am giving the links of the screenshot.

    http://dl.dropbox.com/u/40943977/1.JPG
    http://dl.dropbox.com/u/40943977/2.JPG

    Reply
  33. silenkiller

    Its working fine in latest version of firefox. Turned out to be issue with firefox 3.5.6

    Reply
  34. Matt O'Brien

    I am having problems deploying from the sourceforge url. It says it is running after deployment but I get an error: Oops! This link appears to be broken. I’ve started and stopped the server,but it didn’t help.

    Reply
  35. Philippe

    Hi, I’m have created a new environment, upload LR 6.1 and deploy it.
    Then I connected to it (without having restarted tomcat…) and I got in catalina.out this error:

    ERROR [DirectServletRegistry:187] java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Map

    After restarting tomcat, I have now on screen :

    “The server encountered an internal error () that prevented it from fulfilling this request.”
    org.apache.jasper.JasperException: java.lang.IllegalStateException: No output folder

    No error recorded in catalina.out. Do anyone has any clue ?

    Reply
  36. Sandeep

    Hi Marina,

    Is it possible for you to write a next blog entry on how Liferay can be deployed in a clustered environment.
    http://www.liferay.com/documentation/liferay-portal/6.0/administration/-/ai/unbreakable-liferayvirtual-hostingto-infinity-and-beyondmultip-3

    Thanks Sandeep

    Reply
  37. Bassem

    After deploying the liferay war file to ROOT, still getting tomcat home page when access the domain.

    Reply
  38. swconsultant

    I got the same error as Philippe -

    10:56:07,133 ERROR [DirectServletRegistry:187] java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Map
    java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Map

    The name of our environment is liferayone. Could you check to see what’s the issue?

    Thanks.

    Reply
  39. How to deploy the Liferay Portal to the Jelastic cloud: Part II « Jelastic — Rock-Solid Java in the Cloud, Java Server Hosting, Java Cloud Computing

    [...] most popular enterprise web platforms for building business solutions. We have already shown you how to deploy this great application to Jelastic Cloud and today we will continue to work with Liferay Portal: let’s configure the environment [...]

    Reply
  40. How to deploy the Liferay Portal to the Jelastic cloud: Part II - Platform as a Service Magazine

    [...] most popular enterprise web platforms for building business solutions. We have already shown you how to deploy this great application to Jelastic Cloud and today we will continue to work with Liferay Portal: let’s configure the environment [...]

    Reply
  41. Jussi Lehto (@JussiLehto)

    Hi, is it to possible install Liferay if we are using Glassfish on Jelastic, or does Liferay require Tomcat in this environment?

    Reply
  42. pooja

    Hey marina,
    I am using liferay 6.1.1 and in that we are not able to browse the war file from our desktop, so can you please suggest how to upload a war file/??

    Reply
  43. pooja

    Thanx Marina

    Reply
  44. Joseph Toman

    Well, Liferay deploys, but the portal-ext.properties you use in your example doesn’t set up the database connection, so it defaults to HSQL. You might want to add the database config to that part of the tutorial. Otherwise, what’s the point of choosing one?

    Reply

Leave a Reply