Joget DX Preview Release Available for Download

Check out Joget DX, the next generation successor to Joget Workflow for faster, simpler digital transformation.

Versions Compared

Key

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


Red Hat OpenShift is a  is a container application application platform that brings brings Docker and  and Kubernetes to 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 As a cloud native computing platform, OpenShift allows teams to automate the build, deployment, and management of applications. They can focus on developing apps without worrying about the underlying infrastructure, whether on physical/virtual servers, or on public/ private/hybrid cloud environments.

 As an open source no-code/low-code platform to visually build enterprise web apps for coders and non-coders,  Joget Workflow is a good complement for OpenShift.

Image Removed

Info

OpenShift Online has a free Starter plan, so you can use it to learn and experiment at no cost.

...

Step 1: Sign Up for OpenShift Online

Sign up for free at https://manage.openshift.com/ and choose the desired plan and region.

Image Removed

Image Removed

Image Removed

Image Removed

Step 2: Create OpenShift Project

In the OpenShift Web Console, create a project using the Create Project button Joget is an ideal complement to OpenShift to fill the gap. The Joget platform is now available as a Red Hat Certified Container, so it is trusted, secure and commercially supported on OpenShift. This article describes the steps in deploying the certified Joget container image running with the MySQL database.

Image Added      Image Added      Image Added


Deploy Joget using the OpenShift Web Console

Step 1: Create OpenShift Project

Access the OpenShift Web Console and login

Image Added

Create a project using the Create Project button and key in the desired Name, Display Name and Description.

Image RemovedImage Added

Step

...

2: Deploy MySQL Database

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

Image RemovedImage Added

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

 

Memory Limit

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

openshift

Database Service Name

jogetdb

MySQL Connection Username

joget

MySQL Connection Password

joget

MySQL Database Name

jwdb

 

Image RemovedImage Added

Image Removed

Step

...

3: Deploy Joget

...

Platform

To access the Red Hat Container Catalog, a valid username and password that is used to log in to the Red Hat Customer Portal is required.

Info

If you do not have an account, you can acquire one by registering for one of the following options:

Under the selected project, select select Add to Project > Deploy Imageand click on the create an image pull secret link. In the ensuing popup, select the Image Name option and key in jogetworkflow/jboss-joget-enterprise. key in the Red Hat login details for the registry.

 

 

Secret Name

registry.connect.redhat.com

Authentication Type

Image Registry Credentials

Image Registry Server Address

registry.connect.redhat.com

Username

Red Hat account username

Password

Red Hat account password

Email

Red Hat account email

Link secret to a service account

Yes

Service Account

default

 

Image Added

Once the secret has been created, select Add to Project > Deploy Image, select the Image Name option and key in registry.connect.redhat.com/joget/joget-v6-enterprise. Click on the small search icon to load the suitable Docker image hosted in Docker Hub.

Image Removed

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 Removed

Image Removed

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 Removed

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

Image Removed

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 Removed

Click on the pod to view the pod details.

Image Removed

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

Image Removed

image details from the registry, key in the desired Name then click Deploy.

 

 

Image Added

Step 4: Add Persistent Storage

The next step is to add persistent storage to the container for storing configuration files and persistent file uploads.  Under Applications > Deployments, select the application, then the Configuration tab. Scroll down to the Volumes section and click on the Add Storage link.

Image Added

In the Add storage page, click on the small create storage link. Create the new storage with the desired values e.g.

 

Name

joget-data

Access Mode

Shared Access (RWX)

Size

1GB (or as required)

 

Image Added

Back in the Add Storage page, select the newly created storage, set the Mount Path to /opt/joget/wflow, then Add.

 

 

Mount Path

/opt/joget/wflow

 

Image Added

Step 5: Create Service Route for External Access

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

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

Image RemovedImage Added

Select Select Actions > Create Route and click on , set the Path to /jw and click on Create.

Image Removed

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

Image Removed

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 Removed

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 Removed

 

Path

/jw

 

Image Added

Return to the Overview and click on the URL next to the application name to launch the Joget platform.

Image Added

Deploy Joget using the OpenShift CLI

For those more inclined to use a non-graphical command line interface, it is actually faster to use the OpenShift command line interface (CLI) to deploy the Joget platform.

The following is a Linux script to accomplish a similar Joget platform deployment. Before running this script, install the CLI and login. Change the environment variables in the script accordingly, at least the four values below:

 

PROJECT_NAME

The desired project name

REGISTRY_USERNAME

Red Hat account username

REGISTRY_PASSWORD

Red Hat account password

REGISTRY_EMAIL

Red Hat account email

Code Block
languagebash
#!/bin/sh

export PROJECT_NAME=joget-openshift
export REGISTRY_USERNAME=email@domain
export REGISTRY_PASSWORD=password
export REGISTRY_EMAIL=email@domain
export REGISTRY_SERVER=registry.connect.redhat.com
export IMAGE_NAMESPACE=joget
export IMAGE_NAME=joget-v6-enterprise
export IMAGE_TAG=latest
export APP_NAME=joget-v6-enterprise
export DB_APP_NAME=joget-mysql
export STORAGE_NAME=joget-data
export MYSQL_DATABASE=jwdb
export MYSQL_USER=joget
export MYSQL_PASSWORD=joget

echo === deploy Joget on OpenShift ===
echo PROJECT_NAME: $PROJECT_NAME
echo REGISTRY_SERVER: $REGISTRY_SERVER
echo REGISTRY_USERNAME: $REGISTRY_USERNAME
echo REGISTRY_EMAIL: $REGISTRY_EMAIL
echo IMAGE_NAMESPACE: $IMAGE_NAMESPACE
echo IMAGE_NAME: $IMAGE_NAME
echo IMAGE_TAG $IMAGE_TAG
echo IMAGE_NAME: $IMAGE_NAME
echo APP_NAME: $APP_NAME
echo DB_APP_NAME: $DB_APP_NAME
echo STORAGE_NAME: $STORAGE_NAME
echo MYSQL_DATABASE: $MYSQL_DATABASE
echo MYSQL_USER: $MYSQL_USER
echo MYSQL_PASSWORD: $MYSQL_PASSWORD

echo === create project ===
oc new-project $PROJECT_NAME

echo === deploy MySQL ===
oc new-app openshift/mysql:5.7 --name $DB_APP_NAME -e MYSQL_USER=$MYSQL_USER -e MYSQL_PASSWORD=$MYSQL_PASSWORD -e MYSQL_DATABASE=$MYSQL_DATABASE

echo === create and bind secret to pull Joget image ===
oc create secret docker-registry $REGISTRY_SERVER --docker-server=$REGISTRY_SERVER --docker-username=$REGISTRY_USERNAME docker-password=$REGISTRY_PASSWORD --docker-email=$REGISTRY_EMAIL
oc secrets link default $REGISTRY_SERVER --for=pull

echo === import Joget image ===
oc import-image $PROJECT_NAME/$IMAGE_NAME --from=$REGISTRY_SERVER/$IMAGE_NAMESPACE/$IMAGE_NAME --confirm

#echo === grant pull permission if from different project ===
#oc policy add-role-to-user system:image-puller system:serviceaccount:$PROJECT_NAME:default -n $IMAGE_NAMESPACE

echo === deploy Joget ===
oc new-app $PROJECT_NAME/$IMAGE_NAME:$IMAGE_TAG -e GC_MAX_METASPACE_SIZE=300 --name $APP_NAME

echo === create persistent storage claim ===
cat <<EOF > pvc.yaml
apiVersion: "v1"
kind: "PersistentVolumeClaim"
metadata:
name: "$STORAGE_NAME"
spec:
accessModes:
  - "ReadWriteMany"
resources:
  requests:
    storage: "1Gi"
EOF
oc create -f pvc.yaml
rm pvc.yaml

echo === mount storage ===
oc set volume dc/$APP_NAME --add --type=persistentVolumeClaim --claim-name=$STORAGE_NAME --mount-path=/opt/joget/wflow

echo === expose service route for external excess ===
oc expose svc $APP_NAME --path=/jw
oc annotate route $APP_NAME --overwrite haproxy.router.openshift.io/timeout=60s
oc get route
echo URL: http://$(oc get route $APP_NAME --template='{{ .spec.host }}')/jw


Setup Database

The first time the Joget platform is accessed, the Database Setup page will be displayed. Configure the database settings using the values defined when deploying the MySQL database previously e.g.

 

Database Host

jogetdb

Database Port

3306

Database Name

jwdb

Database User

joget

Database Password

joget

 

Image Added

Upon successful configuration, the Joget App Center will be loaded.

Image Added

 

Warning

NOTE: If you encounter a 504 Gateway Timeout during the database setup, it is caused by the database initialization taking longer than the default OpenShift Route timeout. You can actually ignore the error and wait a couple of minutes before accessing the Application URL from the Overview page again.

You can also increase the route timeout using the OpenShift CLI i.e.

oc annotate route $APP_NAME --overwrite haproxy.router.openshift.io/timeout=60s