Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/.dockerignore
/Dockerfile
/.index
/.niogit
/.niogit*
/.security
/.kie-wb-playground
.DS_STORE
Expand Down
188 changes: 121 additions & 67 deletions init.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
#!/bin/sh
#!/bin/bash
DEMO="Install Demo"
AUTHORS="Red Hat"
PROJECT="[email protected]:jbossdemocentral/rhpam7-install-demo.git"
PRODUCT="Red Hat Process Automation Manager"
JBOSS_HOME=./target/jboss-eap-7.3
JBOSS_HOME=./target/jboss-eap-7.4
SERVER_DIR=$JBOSS_HOME/standalone/deployments
SERVER_CONF=$JBOSS_HOME/standalone/configuration/
SERVER_BIN=$JBOSS_HOME/bin
SRC_DIR=./installs
SUPPORT_DIR=./support
PRJ_DIR=./projects
VERSION_EAP=7.3.0
VERSION=7.11.0
VERSION_EAP=7.4.0
VERSION_EAP_PATCH=7.4.6
VERSION=7.13.0
EAP=jboss-eap-$VERSION_EAP.zip
EAP_PATCH=jboss-eap-$VERSION_EAP_PATCH-patch.zip
RHPAM=rhpam-$VERSION-business-central-eap7-deployable.zip
RHPAM_KIE_SERVER=rhpam-$VERSION-kie-server-ee8.zip
RHPAM_ADDONS=rhpam-$VERSION-add-ons.zip
RHPAM_CASE=rhpam-$VERSION-case-mgmt-showcase-eap7-deployable.zip
RHPAM_UPDATE=rhpam-$VERSION-update

# wipe screen.
clear
clear

echo
echo "###################################################################"
echo "## ##"
echo "## ##"
echo "## Setting up the ##"
echo "## ##"
echo "## ##"
echo "## #### ##### #### # # ### ##### ##"
echo "## # # # # # # # # # # ##"
echo "## #### ### # # ##### ##### # ##"
Expand All @@ -49,17 +51,49 @@ echo "## ## ## # # ## # # # # # # # ##"
echo "## # # # ##### # # # ##### # ## ### #### ##"
echo "## # # # # # ## # # # # # # # ##"
echo "## # # # # # # # # ##### ##### # # ##"
echo "## ##"
echo "## brought to you by, ${AUTHORS} ##"
echo "## ##"
echo "## ##"
echo "## ##"
echo "## ${PROJECT} ##"
echo "## ##"
echo "## ##"
echo "###################################################################"
echo

# make some checks first before proceeding.
# Validate that the system is ready for installation.
echo "Testing Java runtime engine (JRE) availability..."
if type -p java; then
echo " - Java executable found in PATH"
export _java=java
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
echo " - Java executable found in JAVA_HOME"
export _java="$JAVA_HOME/bin/java"
else
echo "No java runtine availabie!"
echo "Please configure your system path and $JAVA_HOME environment before continuing."
echo
exit
fi

echo "Testing Java version..."
if [[ "$_java" ]]; then
export _java_version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
echo " - JAVA is version ${_java_version}"
# See: https://stackoverflow.com/a/7335524
export _java_version_numeric=$(echo "$_java_version" | awk -F. '{printf("%03d%03d",$1,$2);}')
if [ $_java_version_numeric -ge 001008 ] && [ $_java_version_numeric -le 011000 ] ; then
echo " - Java version is compatible with RHPAM"
echo
else
echo " - Java version is incompatible with RHPAM!"
echo " Please configure your Java environment before continuing with installation"
echo " More information at https://access.redhat.com/articles/3405381"
echo
exit
fi
fi

# Verify that the support directory is available at the expected path
if [ -r $SUPPORT_DIR ] || [ -L $SUPPORT_DIR ]; then
echo "Support dir is presented..."
echo "Support dir is available..."
echo
else
echo "$SUPPORT_DIR wasn't found. Please make sure to run this script inside the demo directory."
Expand All @@ -68,31 +102,41 @@ else
fi

if [ -r $SRC_DIR/$EAP ] || [ -L $SRC_DIR/$EAP ]; then
echo "Product EAP sources are present..."
echo "EAP product sources are downloaded and present..."
else
echo "Product sources for $EAP package not found."
echo "Please follow the download instructions in README.md,"
echo "found in the $SRC_DIR directory to proceed..."
echo
exit
fi

if [ -r $SRC_DIR/$EAP_PATCH ] || [ -L $SRC_DIR/$EAP_PATCH ]; then
echo "EAP patch sources are downloaded and present..."
else
echo "Need to download $EAP package from https://developers.redhat.com/products/eap/download"
echo "and place it in the $SRC_DIR directory to proceed..."
echo "Product sources for $EAP_PATCH package not found."
echo "Please follow the download instructions in README.md,"
echo "found in the $SRC_DIR directory to proceed..."
echo
exit
fi

if [ -r $SRC_DIR/$RHPAM ] || [ -L $SRC_DIR/$RHPAM ]; then
echo "Product Red Hat Process Automation Manager sources are present..."
echo
echo "RHPAM product sources are downloaded and present..."
else
echo "Need to download $RHPAM package from https://developers.redhat.com/products/rhpam/download"
echo "and place it in the $SRC_DIR directory to proceed..."
echo "Product sources for $RHPAM package not found."
echo "Please follow the download instructions in README.md,"
echo "found in the $SRC_DIR directory to proceed..."
echo
exit
fi

if [ -r $SRC_DIR/$RHPAM_KIE_SERVER ] || [ -L $SRC_DIR/$RHPAM_KIE_SERVER ]; then
echo "Product Red Hat Process Automation Manager KIE Server sources are present..."
echo
else
echo "Need to download $RHPAM_KIE_SERVER package from https://developers.redhat.com/products/rhpam/download"
echo "and place it in the $SRC_DIR directory to proceed..."
echo "Product sources for $RHPAM_KIE_SERVER package not found."
echo "Please follow the download instructions in README.md,"
echo "found in the $SRC_DIR directory to proceed..."
echo
exit
fi
Expand All @@ -101,112 +145,122 @@ if [ -r $SRC_DIR/$RHPAM_ADDONS ] || [ -L $SRC_DIR/$RHPAM_ADDONS ]; then
echo "Product Red Hat Process Automation Manager Case Management sources are present..."
echo
else
echo "Need to download $RHPAM_ADDONS package from https://developers.redhat.com/products/rhpam/download"
echo "and place it in the $SRC_DIR directory to proceed..."
echo "Product sources for $RHPAM_ADDONS package not found."
echo "Please follow the download instructions in README.md,"
echo "found in the $SRC_DIR directory to proceed..."
echo
exit
fi

# Remove the old JBoss instance, if it exists.
if [ -x $JBOSS_HOME ]; then
echo " - removing existing JBoss product..."
echo "Removing existing installation from $JBOSS_HOME..."
echo
rm -rf $JBOSS_HOME
fi

# Installation.
echo "JBoss EAP installation running now..."
# JBoss EAP Installation.
echo "Extracting JBoss EAP ${VERSION_EAP}..."
echo
mkdir -p ./target
unzip -qo $SRC_DIR/$EAP -d target

if [ $? -ne 0 ]; then
echo
echo Error occurred during JBoss EAP installation!
echo Error occurred during JBoss EAP extraction!
exit
fi

echo "Red Hat Process Automation Manager installation running now..."
echo "Patching the JBoss EAP installation to ${VERSION_EAP_PATCH}..."
echo
$JBOSS_HOME/bin/jboss-cli.sh "patch apply $SRC_DIR/jboss-eap-7.4.6-patch.zip"
echo
unzip -qo $SRC_DIR/$RHPAM -d target

if [ $? -ne 0 ]; then
echo
echo Error occurred during Red Hat Process Manager installation!
echo Error occurred while patching JBoss EAP!
exit
fi

echo "Red Hat Process Automation Manager Kie Server installation running now..."
# RHPAM Installation.
echo "Extracting Red Hat Process Automation Manager..."
echo
unzip -qo $SRC_DIR/$RHPAM_KIE_SERVER -d $JBOSS_HOME/standalone/deployments
unzip -qo $SRC_DIR/$RHPAM -d target

if [ $? -ne 0 ]; then
echo
echo Error occurred during Red Hat Process Manager Kie Server installation!
echo Error occurred during Red Hat Process Manager extraction!
exit
fi

# Set deployment Kie Server.
echo "Extracting Red Hat Process Automation Manager - Kie Server..."
echo
unzip -qo $SRC_DIR/$RHPAM_KIE_SERVER -d $JBOSS_HOME/standalone/deployments
touch $JBOSS_HOME/standalone/deployments/kie-server.war.dodeploy

echo "Red Hat Process Automation Manager Case Management installation running now..."
if [ $? -ne 0 ]; then
echo
echo Error occurred during Red Hat Process Manager Kie Server installation!
exit
fi

echo "Extracting Red Hat Process Automation Manager - Case Management Showcase..."
echo
unzip -qo $SRC_DIR/$RHPAM_ADDONS $RHPAM_CASE -d $SRC_DIR
unzip -qo $SRC_DIR/$RHPAM_CASE -d target
rm $SRC_DIR/$RHPAM_CASE
touch $JBOSS_HOME/standalone/deployments/rhpam-case-mgmt-showcase.war.dodeploy

if [ $? -ne 0 ]; then
echo
echo Error occurred during Red Hat Process Manager Case Management installation!
exit
fi

# Set deployment Case Management.
touch $JBOSS_HOME/standalone/deployments/rhpam-case-mgmt-showcase.war.dodeploy
echo " - setting up standalone.xml configuration adjustments..."
echo
mv $SERVER_CONF/standalone.xml $SERVER_CONF/standalone-original.xml
cp $SERVER_CONF/standalone-full.xml $SERVER_CONF/standalone.xml

echo " - enabling demo accounts role setup..."
echo " - setting up data storage folders..."
echo
echo " - adding user 'pamAdmin' with password 'redhatpam1!'..."
$JBOSS_HOME/bin/jboss-cli.sh --file=$SUPPORT_DIR/data_folders.cli
echo
$JBOSS_HOME/bin/add-user.sh -a -r ApplicationRealm -u pamAdmin -p redhatpam1! -ro analyst,admin,manager,user,kie-server,kiemgmt,rest-all --silent

echo " - adding user 'adminUser' with password 'test1234!'..."
echo " - enabling the KIE Server to be managed by Business Central..."
echo
$JBOSS_HOME/bin/add-user.sh -a -r ApplicationRealm -u adminUser -p test1234! -ro analyst,admin,manager,user,kie-server,kiemgmt,rest-all --silent

echo " - adding user 'kieserver' with password 'kieserver1!'..."
$JBOSS_HOME/bin/jboss-cli.sh --file=$SUPPORT_DIR/managed_kie.cli
echo
$JBOSS_HOME/bin/add-user.sh -a -r ApplicationRealm -u kieserver -p kieserver1! -ro kie-server,rest-all --silent

echo " - adding user 'caseUser' with password 'redhatpam1!'..."
# Create our demo user accounts
echo " - setting up demo user accounts and roles..."
echo
$JBOSS_HOME/bin/add-user.sh -a -r ApplicationRealm -u caseUser -p redhatpam1! -ro user --silent

echo " - adding user 'caseManager' with password 'redhatpam1!'..."
# Optional - uncomment the line below to use the file system instead of property files
# $JBOSS_HOME/bin/elytron-tool.sh filesystem-realm --users-file application-users.properties --roles-file application-roles.properties --output-location kie-fs-realm-users
$JBOSS_HOME/bin/jboss-cli.sh --file=$SUPPORT_DIR/user_data.cli
echo
$JBOSS_HOME/bin/add-user.sh -a -r ApplicationRealm -u caseManager -p redhatpam1! -ro user,manager --silent

echo " - adding user 'caseSupplier' with password 'redhatpam1!'..."
echo
$JBOSS_HOME/bin/add-user.sh -a -r ApplicationRealm -u caseSupplier -p redhatpam1! -ro user,supplier --silent
# Setting up Setup LDAP based authentication in JBoss EAP 7.1 or later using Elytron
# See https://access.redhat.com/solutions/3220741

echo " - setting up standalone.xml configuration adjustments..."
echo
cp $SUPPORT_DIR/standalone-full.xml $SERVER_CONF/standalone.xml
# TODO

# Elytron Failover Realm allows to failover the Identity Lookup to another Identity Store in case of a failure
# See https://access.redhat.com/solutions/6290451

# TODO

echo " - setup email task notification users..."
echo " - provisioning email task notification users..."
echo
cp $SUPPORT_DIR/userinfo.properties $SERVER_DIR/business-central.war/WEB-INF/classes/


echo " - setup system property for jpa marshaller"
echo
$JBOSS_HOME/bin/jboss-cli.sh <<EOT
embed-server
embed-server --std-out=echo
/system-property=org.kie.server.xstream.enabled.packages:add(value="org.drools.persistence.jpa.marshaller.*")
EOT


echo

# Add execute permissions to the standalone.sh script.
echo " - making sure standalone.sh for server is executable..."
Expand All @@ -215,7 +269,7 @@ chmod u+x $JBOSS_HOME/bin/standalone.sh

echo "=============================================================="
echo "= ="
echo "= $PRODUCT $VERSION setup complete. ="
echo "= $PRODUCT $VERSION setup complete. ="
echo "= ="
echo "= Start $PRODUCT with: ="
echo "= ="
Expand All @@ -229,6 +283,7 @@ echo "= ="
echo "= Log in: [ u:pamAdmin / p:redhatpam1! ] ="
echo "= ="
echo "= http://localhost:8080/rhpam-case-mgmt-showcase ="
echo "= http://localhost:8080/kie-server/docs ="
echo "= ="
echo "= Others: ="
echo "= [ u:kieserver / p:kieserver1! ] ="
Expand All @@ -237,5 +292,4 @@ echo "= [ u:caseManager / p:redhatpam1! ] ="
echo "= [ u:caseSupplier / p:redhatpam1! ] ="
echo "= ="
echo "=============================================================="
echo

echo
13 changes: 0 additions & 13 deletions installs/README

This file was deleted.

24 changes: 24 additions & 0 deletions installs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Before running the installation script, download the RHPAM and EAP product sources from the Red Hat Customer Portal.
Note that you will be required to login using valid portal credentials in order to download enterprise software.

After downloading, copy or move the zip files into this folder (installs) to make them accessible to the installation script.


Download EAP from https://access.redhat.com/jbossnetwork/restricted/listSoftware.html?product=appplatform&downloadType=distributions&version=7.4

* Red Hat Enterprise Application Platform archive
(jboss-eap-7.4.0.zip)

* Red Hat JBoss Enterprise Application Platform 7.4 Update 06
(jboss-eap-7.4.6-patch.zip)

Download RHPAM from https://access.redhat.com/jbossnetwork/restricted/listSoftware.html?product=rhpam&downloadType=distributions

* Red Hat Process Automation Manager 7.13.0 Business Central Deployable for EAP 7
(rhpam-7.13.0-business-central-eap7-deployable.zip)

* Red Hat Process Automation Manager 7.13.0 Process Server for All Supported EE8 Containers
(rhpam-7.13.0-kie-server-ee8.zip)

* Red Hat Process Automation Manager 7.13.0 Add-Ons
(rhpam-7.13.0-add-ons.zip)
File renamed without changes.
8 changes: 8 additions & 0 deletions support/data_folders.cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# These properties define where the various data directories are located

embed-server --std-out=echo

/system-property=org.uberfire.nio.git.dir:add(value="${jboss.server.data.dir}")
/system-property=org.kie.server.repo:add(value="${jboss.server.data.dir}")
/system-property=org.uberfire.metadata.index.dir:add(value="${jboss.server.data.dir}")
/system-property=org.guvnor.m2repo.dir:add(value="${jboss.server.data.dir}")
Loading