Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
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.
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.
...
Sign up for free at https://wwwmanage.openshift.com/app/account/new and follow the instructions
Run the following commands in your Ubuntu client to install the prerequisite tools to manage OpenShift applications:
Code Block | ||
---|---|---|
| ||
# 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 |
Run the following script in your Ubuntu client to create an OpenShift application and install Joget Workflow v5 Enterprise Edition:
Code Block | ||
---|---|---|
| ||
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-*" |
Deployment may take some time so be patient, check the OpenShift app logs using:
Code Block | ||
---|---|---|
| ||
rhc tail -a $APP_NAME
|
choose the desired plan and region.
In the OpenShift Web Console, create a project using the Create Project button and key in the desired Name, Display Name and Description.
Under the selected project, select Add to Project > Browse Catalog and select the MySQL (Persistent) image.
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 |
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.
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 |
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.
Select Actions > Edit Resource Limits, set the Memory Limit to 800 MiB and click on Save.
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.
Click on the pod to view the pod details.
You can also view the running logs for the pod via the Logs tab.
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.
Select Actions > Create Route and click on Create.
And that’s it. Click on the host name link to access the application.
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.
Access Joget Workflow by adding /jw to the URL e.g. http://jboss-joget-enterprise-joget.8188.starter-us-west-2.openshiftapps.com/jw
Once the deployment is complete, browse to your Joget Workflow installation at http://joget5-Your_OpenShift_Account.rhcloud.com/jw