Skip to content

An Openshift Quick start project for running Liferay Portal on OpenShift

License

Notifications You must be signed in to change notification settings

ahmadabuTaha/jbossas7-liferay-quickstart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Liferay on OpenShift

This git repository helps you get up and running quickly with Liferay Portal installation on OpenShift.

By default the backend database is MySQL/Postgresql and the database name is the same as your application name (using $_ENV['OPENSHIFT_APP_NAME']). You can name your application and database name to whatever you want.

However, per default the name of the database will always match the application so you might have to update .openshift/action_hooks/deploy.

Running on OpenShift

If you don't have an Openshift account you can create an account at http://openshift.redhat.com/

Create a JBoss AS 7.1 or JBoss EAP 6.0 server

  **`JBoss AS 7.1`**

    rhc app create -a $Your-App-Name -t jbossas-7  mysql-5.1 -g medium

    rhc app create -a $Your-App-Name -t jbossas-7  postgresql-8.4  -g medium
                    
  **`JBoss EAP 6.0`**

    rhc app create -a $Your-App-Name -t jbosseap-6.0 mysql-5.1 -g medium

    rhc app create -a $Your-App-Name -t jbosseap-6.0 postgresql-8.4  -g medium

Add DB Web Console to your application

      rhc cartridge add -a $Your-App-Name -c phpmyadmin-3.4 (optional)

Application Info

      rhc app show -a $Your-App-Name

Add this upstream jbossas7-liferay-quickstart repo

    cd $Your-App-Name
    git remote add upstream -m master git://github.com/kameshsampath/jbossas7-liferay-quickstart
    git pull -s recursive -X theirs upstream master

Then push the repo to your openshift cloud repo dir

    git push

That's it, you can now checkout your application at:

    http://$Your-App-Name-$yournamespace.rhcloud.com

Note : _Sometimes it takes longer time for the server to start and deploy, please watch the status of server on $OPENSHIFT_LOG_DIR/server.log.

Default Credentials

Default Admin Username: [email protected]

Default Admin Password: test

Repo layout

customization/

All Liferay Portal customizations

 portal-ext.properties           - the standard customizations that will be done for Liferay installations
jboss-deployment-structure.xml   - the updated jboss-deployment-structure for JBoss As 7.1

.openshift/action_hooks/deploy

Script that gets run every push deploying your application

.openshift/action_hooks/deploying-war-info

The war file information of liferay that will be deployed

Liferay Portal Database configuration

The JBoss AS 7.1 or JBoss EAP 6.0 cartridge will create two datasources by default one for MySQL and another for Postgesql. The following are the JNDI names for the dataources MySQL - java:jboss/datasources/MysqlDS PostgreSQL - java:jboss/datasources/PostgreSQLDS

By default this quick start will configure either MySQL/Postgresql database as database for the Portal depending on the DB cartridge that was added during the application creation.

This is configured in the $REPO_DIR/customization/ROOT.war/WEB-INF/classes/portal-ext.properties entry,

jdbc.default.jndi.name=java:jboss/datasources/MysqlDS

If you want to change it to Postgresql then you need to update the $REPO_DIR/customization/ROOT.war/WEB-INF/classes/portal-ext.properties

jdbc.default.jndi.name=java:jboss/datasources/PostgreSQLDS

Note :

The datasources name could be changed by updting the file $APP_NAME/.openshift/config/standlone.xml and doing a git push

Upgrade the Portal

Right now the quick start supports only Liferay Portal 6.1.1-CE.GA2

In order to update or upgrade to the latest liferay portal, you'll need to re-pull and re-push.

    Pull from upstream
    ------------------

     cd $Your-App-Name/
     git pull -s recursive -X theirs upstream master

    Push the new changes upstream
    -----------------------------

    Update the file and modify the first line with correct war file name that will be used for upgrade default is liferay-portal-6.1.1-ce-ga2-20120731132656558.war, but during update you will change this to something like liferay-portal-6.1.1-ce-ga2-xxxxxxxxx.war

    .openshift/action_hooks/deploying-war-info - the war file of liferay that will be deployed

     git push

The deploy script will then automatically pull the Liferay Portal war file from the sourceforge site and explode the same over the liferay-portal-6.1.1-ce-ga2-xxxxxx.war

Upcoming features

  • Standard maven based directory structure for the application and maven deployment

About

An Openshift Quick start project for running Liferay Portal on OpenShift

Resources

License

Stars

Watchers

Forks

Packages

No packages published