Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Red Hat OpenShift is a container application platform that brings Docker and Kubernetes to the enterprise. OpenShift Online is a public Platform-as-a-Service (PaaS) that offers a hosted solution in the cloud. With OpenShift Online, you can quickly build, host, and scale containerized applications in the public cloud–operated and supported by Red Hat.

As an open source low code platform to visually 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 coders and mobilenon-coders,  Joget Workflow (www.joget.org) Joget Workflow is a good complement for OpenShift.

Image Added

Info

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.

Starter plan, so you can use it to learn and experiment at no cost.


In this example, we will deploy Joget Workflow on a full open source stack comprising the 
Red Hat JBoss WildFly application server and MySQL database on Linux. WildFly, formerly known as JBoss AS, is a leading lightweight application server and MySQL is the most popular open source database today.

Step 1: Sign Up for OpenShift Online

...

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

Image Removed

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:

Code Block
languagebash
# 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:

Code Block
languagebash
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="-Djava.awt.headless=true -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:

Code Block
languagebash
rhc tail -a $APP_NAME

choose the desired plan and region.

Image Added

Image Added

Image Added

Image Added


Step 2: Create OpenShift Project

In the OpenShift Web Console, create a project using the Create Project button and key in the desired Name, Display Name and Description.

Image Added


Step 3: Deploy MySQL Database

Under the selected project, select Add to Project > Browse Catalog and select the MySQL (Persistent) image.

Image Added

Key in the appropriate settings and click on Create e.g.

Memory Limit

200Mi (This value is suitable for the OpenShift Starter plan which limits total memory to 1GB)

Database Service Name

jogetdb

MySQL Connection Username

joget

MySQL Connection Password

joget

MySQL Database Name

jwdb

Image Added

Image Added

Step 4: Deploy Joget Workflow on JBoss WildFly Application Server

Under the selected project, select Add to Project > Deploy Image, select the Image Name option and key in jogetworkflow/jboss-joget-enterprise. Click on the small search icon to load the suitable Docker image hosted in Docker Hub.

Image Added

Add Environment Variables to match the previously configured database settings for the MySQL container and click on Deploy e.g.

MYSQL_HOST

jogetdb

MYSQL_PORT

3306

MYSQL_DATABASE

jwdb

MYSQL_USER

joget

MYSQL_PASSWORD

joget

Image Added

Image Added

By default, the created pod (a pod is a group of one or more containers) is only allocated 512 MiB memory so we will need to allocate more resources to avoid memory errors.

Click on Applications > Deployments and select the jboss-joget-enterprise container. Reduce the running pods to zero by clicking on the down arrow.

Image Added

Select Actions > Edit Resource Limits, set the Memory Limit to 800 MiB and click on Save.

Image Added

Return to Applications > Deployments and select the latest jboss-joget-enterprise version. Adjust the running pod back to one by clicking on the up arrow. At this point, a new pod will start up and the status should change to Active.

Image Added

Click on the pod to view the pod details.

Image Added

You can also view the running logs for the pod via the Logs tab.

Image Added

Step 5: Create Service Route for External Access

At this point, the pod is running but is not accessible from an external web browser so you will need to create a route, which exposes a service at a host name.

Click on Applications > Services and select jboss-joget-enterprise.

Image Added

Select Actions > Create Route and click on Create.

Image Added

And that’s it. Click on the host name link to access the application.

Image Added

For example, in the screenshot above the URL http://jboss-joget-enterprise-joget.8188.starter-us-west-2.openshiftapps.com/ returns the WildFly welcome page.

Image Added

Access Joget Workflow by adding /jw to the URL e.g. http://jboss-joget-enterprise-joget.8188.starter-us-west-2.openshiftapps.com/jw

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