Monday, March 6, 2017

How To Access JBoss BPM Internal Git Repo in a Container

The world has changed quite a bit over the last few years.

Application delivery and application development has gone from working with local installations to leveraging Cloud-based solutions and tooling.

When working on JBoss BPM applications I have shared with you how to connect to the internal git repository with your external development tooling for read-write access to your projects.

After showing you how to deploy your JBoss BPM Suite in a container and on OpenShift Container Platform, did you notice that something was missing?

It was not yet configured to give you that all important external access to your BPM projects that you created inside the container. Well, as of today you can.

Accessing BPM projects

The example project to run JBoss BPM Suite in a container on OpenShift Container Platform has been updated to include the proper configuration file adjustment. There are two things that need to be adjusted:

  1. Dockerfile 
    • There is a line that exposes the ports that the container will allow you to access from an external source. It has been updated to include the port 8001 which is the one you need.
  2. standalone.xml
    • In this file you find the server configuration with system properties to help. A new system property is added to allow external access from the JBoss BPM Suite internal git repository; <property name="org.uberfire.nio.git.ssh.host" value="0.0.0.0"/>
With these in place you are now ready to login to the JBoss BPM Suite, create a new project and clone this to your local machine for development work.

Let's imagine you have a repository called BackOffice and you want clone it for development on your local machine. When you do this you can then push any changes back into the container based BPM project shared with users working in the JBoss BPM Suite console.

First, you need to forward the OpenShift Cloud Platform hosted container's port 8001 to your local machines 8001 port, making the connection from your local machine to the container. This is done with the following command from the OpenShift command line tool which is finding the container based on it's name:

  1. # Read-write access to repo on port 8001.
    #
    $ oc port-forward $(oc get pod \
       -l=deploymentconfig=rhcs-bpms-install-demo \
       --template='{{ range .items }} {{ .metadata.name }} \
       {{ end }}') 8001:8001
    
Now you can clone the BackOffice repository with the following:

# Read-write access to repo on port 8001.
#
$ git clone git://localhost:8001/BackOffice
You now have a copy of the BackOffice repository on your machine with read-write access.

Enjoy!