Monday, October 11, 2021

Codeanywhere adventures - Getting started with developer process automation tooling (part 3)

Codeanywhere

In the previous article in this series, we introduced the world of Codeanywhere, a cloud IDE and container development experience all available in just your browser. 

Are you ready for some more amazing, easy to use, developer tooling that requires not a single tooling installation and no configuration? 

That's what the team at Codeanywhere are promising us when I stumbled on their website last week. They "...don't require you to engage in complex installations and configuration setups. Simply access our in-browser IDE for everything you need to build amazing websites in a productive and more developer-friendly way."

In part three of this series, we'll finish the setup of our process automation Java container project in Codeanywhere.

From the previous article, you should be logged in and in your Codeanywhere dashboard page to get started. From there you can find your PROCESS AUTOMATION TOOLING container listing and use the OPEN IDE button to create a tab with the Codeanywhere IDE and your project.

Codeanywhere

You see the project is already in the IDE and automatically recognised by the EXPLORER view of our workspace.

If we view the READM in this project we'll see that there are setup steps that install it on a local machine or you have the option to install it in a container using Podman on your local machine. As we are using the cloud IDE for this, we are going to consider our container project the local machine and use those instructions.

Having already cloned the project to our IDE, we then see that it's going to require a few Red Hat products that we can pull from the Red Hat Developers site. The products we need to install process automation tooling are listed in the installs/README file and include:

  • JBoss EAP 7.3.0 (jboss-eap-7.3.0.zip)
  • Red Hat Process Automation Manager 7.11 deployable (rhpam-7.11.0-business-central-eap7-deployable.zip)
  • Red Hat PAM KIE server 7.11 (rhpam-7.11.0-kie-server-ee8.zip)
  • Red Hat PAM 7.11 add ons (rhpam-7.11.0-add-ons.zip)

We can pull these into the project by finding the products on developers.redhat.com, needing only to have a registered user to access them. Locate the correct JBoss EAP 7.3.0 and three Red Hat Process Automation Manager downloads, and pull them to your local machine by clicking on their download buttons. 

After that we need to push them with secure copy to the project installs directory in our container project. This is done by finding out what user I am on this container in the cloud IDE console:

$ whoami

cabox

Now assuming you are in the same directory as the downloaded product files on your local machine, from a console run the following to copy the files to your container project installs directory:

$ scp -P 31828 jboss-eap-7.3.0.zip cabox@host31.codeanyhost.com:~/workspace/rhpam-install-demo/installs/
cabox@host31.codeanyhost.com: Permission denied (publickey).
lost connection

This means we do not have access until we share our public key with the hosting container. Generating SSH keys is beyond the scope of this article, but assuming you have one, copy and past it into the file via your cloud IDE console in the file ~/.ssh/authorized_keys. 

Once that's done you can now again try to copy the file securely and should see successful results so copy over all four files:

$ scp -P 31828 *.zip cabox@host31.codeanyhost.com:~/workspace/rhpam-install-demo/installs/

At this point, you're ready to install the process automation developer tooling, so in your Codeanywhere IDE console make sure you're in the root directory of the rhpam-install-demo project and run the following:

$ cd $HOME/workspace/rhpam-install-demo; ./init.sh

You should see the installation script run and end with the login details... but we have to remember we are using the Codeanywhere IDE container project and refer back to the GETING STARTED page that was opened originally that included special URL's to access our applications.

Codeanywhere

Before we start the server, note that there is a line in the GETTING STARTED page in our IDE project that stated "To access your web application make sure your application server is running and listening on 0.0.0.0 address..." This indicates that the normal setup for a JBoss EAP server needs to be adjusted as it's default configuration is to listen on 127.0.0.1 or localhost. 

Open the file rhpam-install-demo/target/jboss-eap-7.3/standalone/configuration/standalone.xml and change all instances of 127.0.0.1 to 0.0.0.0, then close and save the file.

Now we're ready to start the process automation tooling with the following command:

$ ./target/jboss-eap-7.3/bin/standalone.sh

We have to wait on the complete startup of the server, and then instead of localhost:8080 we need to replace the presented URL with the GETTING STARTED suggestions. This means we should find our process automation tooling on the following handy links that are provided as the server starts listening to ports (note you can find these under the PREVIEW PORTS link at the bottom right of the IDE):

Codeanywhere

While the OPEN BROWSER links for port 8080 does give us the JBoss EAP server admin console, we need to add a forward slash with the business central application to reach the process automation tooling log in.

https://port-8080-process-automation-tooling--eric863427.preview.codeanywhere.com/business-central

process automation tooling

Follow the rest of the project README file to find out how to log in to the tooling and for links to workshops that help you get started with developing your first real process automation project.

This completes part three of the Codeanywhere adventures, where we installed, deployed, and accessed developer process automation tooling as a cloud IDE container experience. 

Next up, part four takes us through the installation and deployment of decision management tooling for developers.