Chapter 2. Installing and starting the employee rostering starter application on OpenShift
You can deploy the Red Hat Business Optimizer Employee Rostering starter application to Red Hat OpenShift Container Platform using the provision.sh shell script that is provided in the add-ons distribution.
The application source code is built and packaged locally and uploaded to the OpenShift environment for deployment. Use this preferred method when Java developer tools (Java Development Kit and Maven) and a bash shell command line are available.
The data is held in memory and lost when the pod is restarted.
2.1. Preparing deployment files
You must download and prepare the deployment files before building and deploying the application.
Procedure
-
Download the
rhpam-7.1.0-add-ons.zipfile from the Software Downloads page for Red Hat Process Automation Manager 7.1. - Unzip the downloaded archive.
-
Unzip the employee rostering zip file (
rhpam-7.1.0-employee-rostering.zip) that is extracted from the add-ons archive.
Result
When you unzip the employee rostering zip file, the optashift-employee-rostering-7.11.0.Final-redhat-00002 folder is created. This folder is the base folder in subsequent steps.
File and folder names might have higher version numbers than specifically noted in this document.
2.2. Deploying the application using the provided script
Prerequisites
You must be logged in to the target OpenShift environment using the
occommand line tool. For more information about this tool, see CLI Reference.- Java Development Kit and Maven must be installed on your local machine.
-
A
bashshell environment must be available on your local machine.
Procedure
-
Using the command line, change to the
optashift-employee-rostering-7.11.0.Final-redhat-00002/sourcesfolder. Run the provision script to build and deploy the application:
./provision.sh setup employee-rostering --binary
NoteIf the current OpenShift user name contains characters that are not letters or numbers, the deployment might fail. You can resolve this issue by providing an additional parameter:
./provision.sh setup employee-rostering --binary --project-suffix optaweb. This example uses "optaweb", but you can use any value for the suffix.Compilation and packaging might take several minutes to complete. They continually show progress on the command line output.
When the operation is completed, the following message is displayed:
Uploading file "target/ROOT.war" as binary input for the build ….- Use the OpenShift web UI to view the details for the deployed application. Click the link in the Routes section to open the starter application. The first startup can take up to a minute as additional building is completed on the OpenShift platform.
If the application does not open for more than a minute after clicking the link, perform a hard refresh of your browser page.
Optionally, you can use other actions provided by the provision script:
- Deploy updates to the code to an existing deployment:
./provision.sh deploy employee-rostering --binary
+ .. Remove the application:
./provision.sh delete employee-rostering

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.