Upgrading from version 4.2.1.x to version 4.2.1.5

This document will guide the users on how to upgrade to version 4.2.1.5 from older 4.2.1.x versions.

Before starting your upgrade, an add-on .zip file must be downloaded from download.openiam.com resource. Place the file in the /root/ folder.

Follow the steps below to upgrade.

  1. Extract the addon file using the below command.
tar -xvf add-on.tar.gz -C ./ --strip-components 1

The output of the command above is to be as follows:

add-on/env.conf
add-on/upgrade.sh
add-on/openiam-cli
add-on/install.sh
  1. Before running the install.sh command, take a backup of the existing env.sh by executing the command below.
cp -rf /usr/local/openiam/env.conf /usr/local/openiam/env_backup.conf.bak
  1. Run install.sh to copy all files to the correct directories.
sudo ./install.sh

Install.sh copies the extracted files to the OpenIAM folder.

sudo openiam-cli stop
  1. Compare the previously backed up env.sh file with the newly copied env.conf file.

If there are any custom settings saved previously in the backed up env.conf, make the same changes in the new env.conf file.

Add the below mentioned lines in the new env.conf if missing.

########################## UPGRADING #############################
# This variable is used by upgrade script only
export UPGRADE_TO_VERSION=""

Define the value for export UPGRADE_TO_VERSION="4.2.1.5"

  1. Run the following commands to make the changes.
cd /usr/local/openiam/
sudo nano env.conf

Command output

Note: If you are using out-of-the-box configurations for the database, replace the value for the following parameters:

export FLYWAY_ACTIVITI_HOST=database
export FLYWAY_OPENIAM_HOST=database

Replace “database” with localhost. After replacing it, it should look like this.

# host of the activiti database.
export FLYWAY_ACTIVITI_HOST=localhost
**host of the openiam database.**
export FLYWAY_OPENIAM_HOST=localhost
  1. After making the changes, check the services and stop them if they are running.
sudo openiam-cli status
sudo openiam-cli stop

Make sure all the services are stopped. Services stopped

  1. Run the upgrade command.
sudo openiam-cli upgrade

The output must look as follows: Upgrade command output

Upgrade command output

  1. Check all the services are up and running.
sudo openiam-cli status

Services up and running

  1. Once all the services are up and running, login to OpenIAM and navigate to Administration -> About OpenIAM.

The build version must be updated to 4.2.1.5.

Note: As an additional step, please replace the content of the conf/activiti/revokeAccess.bpmn20.xml file with the following.

<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti="http://activiti.org/bpmn"
targetNamespace="REVOKE_ACCESS">
<process id="REVOKE_ACCESS">
<startEvent id="start" name="Initialize Process" />
<sequenceFlow id="subProcessFlow" sourceRef="start" targetRef="subProcess" />
<subProcess id="subProcess" name="Start Approval Flow">
<multiInstanceLoopCharacteristics isSequential="true">
<loopDataInputRef>ApproverCardindality</loopDataInputRef>
<inputDataItem name="cardinalityObject" />
<completionCondition>${!IsTaskApproved}</completionCondition>
</multiInstanceLoopCharacteristics>
<startEvent id="subProcessStart" />
<sequenceFlow id="subProcessStartFlow" sourceRef="subProcessStart" targetRef="sendRequests" />
<serviceTask id="sendRequests" activiti:class="org.openiam.workflow.activiti.delegate.user.access.request.SendRevokeAccessRequestDelegate" name="Send Requests to Candidate Users" />
<sequenceFlow id="makeRequestDecisionFlow" sourceRef="sendRequests" targetRef="makeRequestDecision">
<conditionExpression xsi:type="tFormalExpression">
<![CDATA[${!IsTaskApproved}]]>
</conditionExpression>
</sequenceFlow>
<sequenceFlow id="automaticApprove" sourceRef="sendRequests" targetRef="subProcessEnd">
<conditionExpression xsi:type="tFormalExpression">
<![CDATA[${IsTaskApproved}]]>
</conditionExpression>
</sequenceFlow>
<userTask id="makeRequestDecision" name="Make Decision" activiti:owner="${TaskOwner}">
<extensionElements>
<activiti:taskListener event="create" class="org.openiam.workflow.activiti.tasklistener.RevokeAccessRequestCandidateTaskListener" />
</extensionElements>
</userTask>
<sequenceFlow id="preSubProcessEnd" sourceRef="makeRequestDecision" targetRef="subProcessEnd" />
<endEvent id="subProcessEnd" />
</subProcess>
<sequenceFlow id="afterSubProcess" sourceRef="subProcess" targetRef="approveOrRequestGateway" />
<exclusiveGateway id="approveOrRequestGateway" name="Perform Service task based on Decision" />
<sequenceFlow id="gateflow1" sourceRef="approveOrRequestGateway" targetRef="entitlementsOperation">
<conditionExpression xsi:type="tFormalExpression">
${IsTaskApproved}
</conditionExpression>
</sequenceFlow>
<serviceTask id="entitlementsOperation" activiti:class="org.openiam.workflow.activiti.delegate.user.access.request.RevokeAccessRequestDelegate" name="Revoke Access" />
<sequenceFlow id="gateflow2" sourceRef="approveOrRequestGateway" targetRef="rejectRequest">
<conditionExpression xsi:type="tFormalExpression">
${!IsTaskApproved}
</conditionExpression>
</sequenceFlow>
<serviceTask id="rejectRequest" activiti:class="org.openiam.workflow.activiti.delegate.entitlements.RejectEntitlementsNotifierDelegate" name="Task Rejected" />
<sequenceFlow id="acceptRequestJoin" sourceRef="entitlementsOperation" targetRef="notifyAccepted" />
<serviceTask id="notifyAccepted" activiti:class="org.openiam.workflow.activiti.delegate.entitlements.AcceptEntitlementsNotifierDelegate" name="Send Notifications" />
<sequenceFlow id="rejectRequestJoin" sourceRef="rejectRequest" targetRef="finish" />
<sequenceFlow id="afterNotifyAccepted" sourceRef="notifyAccepted" targetRef="finish" />
<endEvent id="finish" name="Task Completed" />
</process>
</definitions>