Liferay 6.1 GA1 in the cloud, step by step

Do you want your new Liferay 6.1 GA1, with all these new functionalities: english and spanish, in the cloud?

Follow these simple steps to achieve it, even if you want to use the new Setup Wizard:

  1. Go to Jelastic (www.jelastic.com), create an account depending of your location
  2. Create an enviroment: Tomcat 6 + MySQL 5
  3. Upload portal libraries (portal-client and dependencies) to SERVER_ROOT/lib. Include here JDBC driver for your database.
  4. Upload WAR file from sourceforge (here) (Jelastic make it easy that uploading, because directly links to that WAR file)
  5. Create portal-ext.properties at SERVER_ROOT/home, with this values:
    • resource.repositories.root=${user.home}/ENVIROMENT_NAME
    • include-and-override=${liferay.home}/portal-setup-wizard.properties
    • liferay.home=${user.home}/ENVIROMENT_NAME
    • jdbc.default.jndi.name=jdbc/LiferayPool
  6. Modify SERVER_ROOT/server/context.xml file with this values (note that the "mysql-" is very important at db url):
    • <Resource name="jdbc/LiferayPool" auth="Container" type="javax.sql.DataSource"
                  maxActive="100" maxIdle="30" maxWait="10000"
                  username="USER" password="PASSWORD" driverClassName="com.mysql.jdbc.Driver"
                  url="jdbc:mysql://mysql-ENVIROMENT_NAME.jelastic.com/DATABASE_NAME?useEncoding=true&amp;characterEncoding=UTF-8" />
  7. Clean catalina.out log to be sure that your installation is successfull.
  8. Restart server.
  9. Check in catalina.out that Liferay starts reading your portal-ext
  10. Browse to you portal: ENVIROMENT_NAME.jelastic.com
  11. Setup Wizard is the first thing you'll see, but as JNDI is configured, we cannot modify database settings. We should go to SERVER_ROOT/server/context.xml for database changes.
  12. Set up for portal (name, language, admin credentials), and...
  13. Here it is! Your portal up and running!

Then, you can tune your portal with portal-ext reminding not to modify properties set in this blog.

Importants (and new things):

As you can see, we are taking care of telling setup wizard where to read the new props file (the include-an-override property), and we are also configuring database with JNDI, but of course you can do it with JDBC, just with the usual way:

  • jdbc.default.driverClassName=com.mysql.jdbc.Driver
  • jdbc.default.url=jdbc:mysql://mysql-ENVIROMENT_NAME.jelastic.com/database_name?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
  • jdbc.default.username=user
  • jdbc.default.password=password

Hope it helps!

Manuel

Blogs
I was wondering how to do this. Thanks for your blog post. very helpful!
what do you mean create portal-ext.properties at SERVER is that within the home folder? because it didn't let me add the file in the SERVER folder
Same issue as Bradley : Step 5 Create portal-ext.properties at SERVER.

Confused over what 'SERVER' is : root of 'ENVIRONMENT_NAME' ???

SERVER/lib should be /lib ? (Seems to be where to store our jar files)

SERVER/context.xml should be /server/context.xml (since the file exists already).

If so then we can't create files in /server or /
Are you using Tomcat 7 and MySQL 5.0?
Hey Bradley, did you get the MySQL driver?

As Brian said, it's inside Liferay's Tomcat bundle.
Let me know if you get it

Cheers!
Hi Manuel, I've successfully deployed Liferay 6.1 GA1 in my free jelastic environment but after few clicks on control panel the portal became unavailable due disk quota exception ....have you some advice on this ? Thanks!

Marco
I am no able to go thru Basic Configuration form, I fill I press finish configuration, and nothing happens, I check log and nothing there, I restart server, check the database Mysql and tables are there, but not way to get into welcome page.
Hi Cesar.

Do you have javascript errors or is javascript enabled?
Hi Manuel

no any, you can check in http://intergalt6.jelastic.dogado.eu/
Hi Cesar

I can see that you have configured a cluster in your installation.
Which properties (relatives to clustering) do you have in portal-ext?

Cheers!
Hi Manuel

And how can you see that? if in cluster was not willfully, I just follow the instructions of this blog, were is that portal-ext file?

BTW, Search for that file I found a Liferay.Log file that maybe is root of the problem:

It mentions a problem related with connection with database
java.net.SocketException
MESSAGE: Broken pipe

Is estrange because in first start all the files of liferay were created in the MySql database, then db configuration is fine
Hi.

This is very valuable information. I am about to enter the research mode for cloud computing around Liferay, and this is very refreshing to read about. It is a pity nobody has commented more on this subject. Perhaps I open a forum or search one where this has been discussed.