You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

OpenShift Online (www.openshift.com) is an application hosting platform by Red Hat (www.redhat.com) that makes it easy to run container-based web applications in the cloud. As an open source platform to easily build enterprise web apps for cloud and mobile, Joget Workflow (www.joget.org) is a good complement for OpenShift.


OpenShift Online has a free monthly plan that allows you to host up to 3 web applications in the cloud for free. As such, you can run a basic Joget Workflow deployment without any cost!

 


This article describes the steps required to deploy Joget Workflow on OpenShift Online using an Ubuntu Linux client. Just follow the steps below and you can get a running Joget Workflow installation very quickly. You can also manage OpenShift using other OS platforms (e.g. Windows, OSX, etc) by adapting the commands accordingly.

Step 1: Signup for OpenShift

Sign up for free at https://www.openshift.com/app/account/new and follow the instructions

Step 2: Install Prerequisites i.e. Git, Ruby and OpenShift Client Tools

Run the following commands in your Ubuntu client to install the prerequisite tools to manage OpenShift applications:

# install git and ruby
echo === Install Git and Ruby ===
sudo apt-get install git ruby

# install openshift client tools
echo === Install OpenShift Client Tools ===
sudo gem install rhc

# run openshift setup
echo === Run OpenShift Setup ===
rhc setup

Step 3: Create OpenShift App and Deploy Joget Workflow

Run the following script in your Ubuntu client to create an OpenShift application and install Joget Workflow v5 Enterprise Edition:

export JOGET_VERSION=5.0.1
export APP_NAME=joget5

echo === Create OpenShift Tomcat MySQL App ===
rhc app-create $APP_NAME tomcat7 mysql-5.5 phpmyadmin

echo === Configure Java VM and Environment Variables ===
export OPENSHIFT_DATA_DIR=$(rhc ssh $APP_NAME 'echo $OPENSHIFT_DATA_DIR');\
rhc env-set JAVA_OPTS_EXT="-Dwflow.home=${OPENSHIFT_DATA_DIR}wflow/" --app $APP_NAME;\
export OPENSHIFT_MYSQL_DB_HOST=$(rhc ssh $APP_NAME 'echo $OPENSHIFT_MYSQL_DB_HOST');\
export OPENSHIFT_MYSQL_DB_USERNAME=$(rhc ssh $APP_NAME 'echo $OPENSHIFT_MYSQL_DB_USERNAME');\
export OPENSHIFT_MYSQL_DB_PASSWORD=$(rhc ssh $APP_NAME 'echo $OPENSHIFT_MYSQL_DB_PASSWORD');\
export OPENSHIFT_DATA_DIR=$(rhc ssh $APP_NAME 'echo $OPENSHIFT_DATA_DIR')

echo === Restart OpenShift App ===
rhc app restart $APP_NAME

echo === Deploy Joget Workflow $JOGET_VERSION ===
rhc ssh $APP_NAME "cd ~/app-root/data;\
echo '--- Download Bundle ---';\
wget http://dev.joget.org/downloads/enterprise/joget-enterprise-linux-$JOGET_VERSION.tar.gz;\
echo '--- Extract Bundle ---';\
tar xvfz joget-enterprise-linux-$JOGET_VERSION.tar.gz;\
cd joget-enterprise-linux-$JOGET_VERSION;\
echo '--- Setup Datasource ---';\
apache-ant-1.7.1/bin/ant setup -Dprofile.name=default -Ddb.name=jwdb -Ddb.host=$OPENSHIFT_MYSQL_DB_HOST -Ddb.port=3306 -Ddb.user=$OPENSHIFT_MYSQL_DB_USERNAME -Ddb.password=$OPENSHIFT_MYSQL_DB_PASSWORD;\
cp -rf wflow/ $OPENSHIFT_DATA_DIR/;\
echo '--- Setup WARs ---';\
mv apache-tomcat-8.0.20/webapps/jw* ~/jbossews/webapps/;\
echo '--- Clean Bundle ---';\
cd ..;\
rm -r joget-enterprise-linux-*"

Step 4: Access Joget Workflow installation

Deployment may take some time so be patient, check the OpenShift app logs using:

rhc tail -a $APP_NAME

Once the deployment is complete, browse to your Joget Workflow installation at http://joget5-Your_OpenShift_Account.rhcloud.com/jw



  • No labels