Eric D. Schabell: Code Ready Containers - Installing an HR employee rewards project using developer container catalog

Monday, May 11, 2020

Code Ready Containers - Installing an HR employee rewards project using developer container catalog

Code Ready ContainersIf you've been following along here lately, you've noticed that I'm exploring Code Ready Containers quite a bit. I've been looking at how to run an OpenShift Container Platform, self-contained on my local machine with no more than 16GB of RAM.

It's not about just starting up the container platform, it's about doing something real with it. By real I am talking about running a demo, project, or some coding solution I enjoy tinkering with for my day job.

With that in mind, I've pulled together a project that installs Code Ready Containers for your local machine using 11 GB of RAM. That's the basic setup for running any of the subsequent projects I've shared with you in the past.

After that I've started sharing how to install various developer tools using the provided developer container catalog images; Red Hat Process Automation and Red Hat Decision Manager. Now it's time to look at installing real projects that allow you to explore the usage of the tooling.

Let's take a look at installing a human resources employee rewards project using the developer container catalog on Code Ready Containers.

This tutorial walks through a few simple steps to getting both the latest Code Ready Containers started on your laptop, as well as installing a working project leveraging the provided container catalog images.

This tutorial is two parts, first installing the latest Code Ready Containers v1.9.0 to provide for an OpenShift Container Platform v4.3.10 on your local machine. Second, you're installing an HR employee rewards project on the provide Red Hat Process Automaton v7.4 authoring image from the developer catalog.

Installing the container platform

You can of course download the latest Code Ready Containers, but to ensure that you are able to actively use this with various provided images found in the developer catalog requires fine tuning. To that end, I've provided an installation project that configures all you need in just a single installation script as follows.

Code Ready Containers
First off, you don't even have to pre-download anything other that this project as it's going to check for each component and point you to the download site if you just follow the following steps:
  1. Run 'init.sh' or 'init.bat' file, then sit back. (Note: 'init.bat' should be run with Administrative privileges.)
  2. Follow displayed instructions to log in to your brand new Code Ready Containers OpenShift Container Platform on your laptop.
Paying close attention to the above init script output ensures a painless experience and you'll be up and running in just a few minutes. If you're wondering what's happening, here are the steps inside the installation if you are running it for the first time on your machine:
  1.  Your system is checked for the availability of the OpenShift client known as 'oc client', if not available or not the latest version, you'll be pointed to where you download. After downloading and installing 'oc client', restart the installation script.
  2. Your system is checked for the availability of Code Ready Containers version 1.9.0, if not you'll be pointed to the download site. Part of this download is a pull-secret file, get that too and add it's path to the SECRET_PATH variable in the installation script, it's found at the top. After installing 'crc', restart the installation script.
  3. The next check is for a valid path to your pull-secret file, it should be set in the SECRET_PATH variable, if not the installation stops until you correct this.
  4. Next the installation sets up the container platform configuration by allocating 11 GB of memory and 4 CPUs.
  5. At this time the container platform is started, you are invited to grab a coffee while you wait.
  6. As the platform starts, information is gathered to present you with an overview once the installation has completed so you can log in.
Code Ready ContainersThat's it. Using the URL provided you can log in and open the developer view to watch the second part of this article, installing the process automation tooling container image.

Installing HR employee rewards

Now it's time to install the decision management tooling, easily done by following the steps below:
  1. Run 'init.sh' or 'init.bat' file. 'init.bat' must be run with Administrative privileges:
Note that this installation does not require any product downloads, because you're installing using the provided Code Ready Containers developer container catalog entry. The exact entry is the Red Hat Process Automation v7.4.

As you watch the installation script run you can view the developer Topology view in Code Ready Containers console you logged in to above. You will see two containers starting up, one is the business central authoring environment and the other is the KIE-server deployment container.

Code Ready ContainersOnce they are both running with a dark blue circle to indicate this, you can login to the authoring environment. Either look at the authoring container by clicking on it to open the right pane with information, or easier, just use the URL provided at the end of the installation script.

Now log in to Red Hat Process Automation Manager to start exploring the containerized process automation project featuring an HR employee rewards example (the address will be generated):
  • Code Ready Container example: https://rhcs-rewards-demo-rhdmcentr-appdev-in-cloud.apps-crc.testing ( u:erics / p:redhatpam1! )
See the project readme file for details on how to run the project.

Want to build this HR employee rewards project yourself? Learn how step-by-step in this online workshop.