Thursday, October 28, 2021

Codeanywhere adventures - Getting started with developer decision management tooling (part 4)

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 a final part four of this series, we'll setup a complete decision management Java container project in Codeanywhere.

Instead of covering how to create a Java container project to get started in this article, please follow the steps outlined in part two of this series and this time name the container project DECISION MANAGEMENT  TOOLING. When you complete the creation of your container project, you should be logged in and in your Codeanywhere dashboard page. From there you can find your DECISION MANAGEMENT TOOLING container listing and use the OPEN IDE button to create a tab with the Codeanywhere IDE and your project. Make sure you give it enough time to create and start up before you proceed.

codeanywhere adventures

Now we have an empty container project, so let's load it up with our decision manager project instead of the process automation demonstrated in part two. Again, as a Gitlab user, I'm going to use that console at the bottom of my IDE tab and clone my project into the workspace:

$ git clone https://gitlab.com/bpmworkshop/rhdm-install-demo.git

You should now see the project is already in the IDE (in a new tab of your browser) and automatically recognised by the EXPLORER view of our workspace.

codeanywhere adventures

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 Decision Central 7.11 deployable (rhdm-7.11.0-decision-central-eap7-deployable.zip)
  • Red Hat Decision Manager KIE server 7.11 (rhdm-7.11.0-kie-server-ee8.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 two Red Hat Decision 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/rhdm-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 three files you downloaded above:

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

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

$ cd $HOME/workspace/rhdm-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 adventures

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 rhdm-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 decision management 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 decision management 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 adventures

While the OPEN BROWSER links for port 8080 does not exist, use the 8001 link and edit the port number in the URL. This give us the JBoss EAP server admin console, we need to add a forward slash with the decision central application added to reach the decision management tooling log in:

https://port-8080-decision-management-tooling--eric863427.preview.codeanywhere.com/decision-central

codeanywhere adventures

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 decision management project.

codeanywhere adventures

This completes the final part four of our Codeanywhere adventures, where we installed, deployed, and accessed developer decision management tooling as a cloud IDE container experience. 

As this completes the series, be sure to go back and enjoy any of the previous articles if you missed them. Happy cloud developing with Codeanywhere adventures!