Tuesday, October 26, 2010

Hardware Requirements and few examples of possible combinations

There have been many post in Liferay forum around Hardware Requirements
I will share few successful implementation I am aware of and minimum requirements for server and developer sandboxes.
I will update this post every time I come across new config so watch out this space for newer Hardware configs :)

The best resources for server sizing and hardware requirements are Liferay whitepaper, choose the one which is relevant to your version
LPEE 6.2 Deployment Checklist
Liferay Portal 6.2 Performance Whitepaper
https://www.liferay.com/documentation/additional-resources/whitepapers

There can be unlimited combination so please leave your requirements and I will try to device optimal hardware requirements for you as per my learning's :D

General thumb rule before finalizing the architecture and server sizing / hardware configuration is

1. Gather requirements for
a. Total number of users
b. Concurrent users  & maximum logged in users expected at one time
c. Operation expected WCM scenario, Content reading, content access, transaction / login, search etc
d. High availability required
e. Clustering required (Need to request for a cluster key)

Based on the inputs you can reach a rough sizing estimate using the performance whitepaper

make sure when you are taking vCPU into consideration use 2 vCPU = 1 physical core.

Again hardware will also depend on the application being built on top of Liferay so if its a page with login and WCM etc it will handle smaller number of user than plain text age and you need to prorate and adjust the users based on the application and OOB components used from Liferay.

Make sure in a HA architecture the nodes / cluster node are in same network / DC

Liferay portal 6.2

 Production Box
RAM --Min : 16 GB , Good to have 32 - 64 GB RAM
Processor - Min 4 CPU (I1 quad core processor) , Good to have 8 CPU ( 2 quad core processor)
example - 2 X Intel core 2 Quad X5677 3.46GHz, 12MB L2 cache

Liferay portal 6.1 and below :
Developer Box
Minimal -- 1 GB RAM , processor with clocks more than 2.X Ghz for example celeron processor will suffice if you provide 2 GB RAM and Processor 2.6GHz
if you are working with LR portal 5.1X below you can use processor with lower clock.

In scenarios where developers have a complete sandbox setup on their local machine my recommendation is at least 2 GB RAM is used with dual core CPU @2.50GHz
(MySQL , eclipse , LR portal , Apache webserver +3rd party integration component

----------
For Testing /UAT / Staging environment
The number of nodes will depend on the load / traffic expected however its good to have Minimum of 2 portal nodes 2 authentication server nodes and a hot standby of DB

Minimal --
Liferay portal 1.5 GB RAM , dual core CPU @2.50GHz or more (per node)
------------
Production Environment
Some possible combination

1>
OS: Redhat Linux
Sever : Dell Power edge
CPU :1 quad core @2.5Ghz or 2 Dual core with no less clock
Ram :4GB

2>
Sever : Dell Power edge or Sunfire in case of Solaris
2X 2.0Ghz
quad core
8GB
Linux
--------------------------
For DB and third party servers

Sever : Dell Power edge or Sunfire in case of Solaris
4X1.6GHz
8Gb
Solaris

Monday, October 25, 2010

Liferay Installation Checklist

I wanted to share a checklist to follow after Liferay installation to minimize portal start up failures

1>Check your JAVA_HOME variable .It`s good to use JRE available in JDK bundle
Check for compatibility of JRE required for portal version being used

2>Check LIFERAY_HOME variable This folder is one folder higher than the location of the application server itself

3>Check database connection setting & verify database JDBC driver .jar

4>Check consistency of Liferay portal bundle and dependency jars .
corrupt or incompletely downloaded jars create issues hard to investigate

4b>Check consistency of The portal-ext.properties File verify changes made as per your environment

5>Check for folder permissions (mostly this issue come in Linux/UNIX or other open source OS)

Troubleshooting
a>If server does not start check for setenv.bat
{tomcat-home}/bin/setenv.bat and point JRE_HOME to folder where you installed Java. You setenv.bat haas following entries :
set "JRE_HOME=C:\Program Files\Java\jre6"
set "JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF8 -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"

b>Check for database availability
c> Cheksum jar /portal library

Thursday, October 21, 2010

Database connection settings

I have seen numerous post around database connection not working or portal server not starting properly due to the database connections not working properly.Many post including mine are available on Liferay forum for resolving the issue however I thought of making a checklist here for database connection settings.

Developer need to keep in mind that settings have been changing for every version in lower version till 5.1X DB setting were done in Root.xml , 5.2.X onwards all the setting entries are made in portal-ext.properties file
lets discuss the different version setting first.

Version 6.X and 5.2X have same config
put JDBC setting in portal-ext.properties
location : \\webapps\ROOT\WEB-INF\classes
< 6.X or 5.X>

copy your JDBC settings from portal.properties ---> ## JDBC section
get file from the downloaded source or tomcat setup or directly from SVN
SVN location : http://svn.liferay.com/repos/public/portal/trunk/portal-impl/src/portal.properties

username is : guest and password is : leave the password field blank

e.g.
# MySQL
#
#jdbc.default.driverClassName=com.mysql.jdbc.Driver
#jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
#jdbc.default.username=
#jdbc.default.password=

Liferay 5.1.X and lower versions

Make JDBC changes in Root.xml
ROOT.xml can be found in tomcat\conf\Catalina\localhost\ROOT.xml

e.g. Sample setting get exact setting from portal.properties file
MySQL

Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8"
username=""
password=""
maxActive="20"


Set properties for schema
## Schema
##

#
# Set this to true to automatically create tables and populate with default
# data if the database is empty.
#
schema.run.enabled=true

#
# Set this to to true to populate with the minimal amount of data. Set this
# to false to populate with a larger amount of sample data.
#
schema.run.minimal=true


Checklist:
1> Make sure you have copied your database driver support
e.g. for oracle copy ojdbc14.jar to \\lib\ext

2> Test your DB availability and creation of schema
Schema name should match the schema name mentioned in jdbc.default.url

3>Check that you have correct version of driver support jar and is compatible with your your installation I have seen number of user facing problem due to incompatible version.

4> Check for proper character set settings for your database

Detailed Learning resource official documentation