Friday, August 7, 2015

BPMConfig Command line utility

BPMConfig command-line utility

I've used predecessor of 'BPMConfig' command line utility 'configureNode' available in BPM 8.0.1.1, it served the purpose of creating deployment environment with single command
Now its successor 'BPMConfig' has many features with multiple options, which I've explored below
-validate
  1. Validate the status of existing deployment environment
  2. Validate the configuration settings in configuration property file prior to creating deployment environment
  3. Verify whether database connection can be established
Validate the status of existing deployment environment
It generates the html output which clearly listing the status of all components
./BPMConfig.sh -validate -profile DmgrProfile -de De1 -outputDir /home/bpmadmin/de-validation-report-07-Aug
Stating 'outputDir' location is optional, if not specified, validation report will be generated under bin directory of BPM_INSTALLATION_ROOT, with directory name as 'html'.
Opening html file, will show the status of all components in deployment environment, it's big detailed report spans across pages

------------------------------------------------------------------------------
Validate the configuration settings in configuration property file prior to creating deployment environment
./BPMConfig.sh –validate /IBM/BPM/v85/BPM/samples/config/advanced/Advanced-PC-SingleCluster-DB2.properties
It just validates the existence of values for various configurations which are mandatory, such as password mentioned or not
But it didn't validate whether the value mentioned for any property is correct or not..

Verify whether database connection can be established
BPMConfig with db option verify the following
  • Whether connection can be established to that DATABASE defined at configuration file
  • Database version is supported or not
  • Other database parameter such as log files size


./BPMConfig.sh -validate -db /IBM/BPM/v85/BPM/samples/config/advanced/Advanced-PC-SingleCluster-DB2.properties


-export
./BPMConfig.sh -export -profile DmgrProfile -de De1 -outputDir /home/bpmadmin/
Export the configuration of deployment environment
Following files are exported
ltpa.jceks
fileRegistry.xml
resources-bpc.xml
Application-config-bpc.xml
ProcessServer_100SourceCustomMerged.xml
PDW_100SourceCustomMerged.xml
De1.properties


-stop
./BPMConfig.sh -stop /IBM/BPM/v85/BPM/samples/config/advanced/Advanced-PC-SingleCluster-DB2.properties
Stopping the deployment environment using property file, it just stops the clusters alone; deployment manager and node agent didn't get stopped
No need to mention the user name and password, hence it's already present in the property file
-start
./BPMConfig.sh -start /IBM/BPM/v85/BPM/samples/config/advanced/Advanced-PC-SingleCluster-DB2.properties


-create –sqlfiles
To generate the SQL scripts for creating database tables without creating a profile or a deployment environment, you can run the command with the -create -sqlfiles action. You can optionally specify an output directory for the generated scripts using the -outputDir parameter. If you do not specify an output directory, the scripts are generated in the dbscripts directory at the root of the profile under which you ran the command. Running the command with -create -sqlfiles does not perform any configuration

Thursday, August 6, 2015

IBM BPM Configuration editor

Configuring your environment with the IBM BPM Configuration editor

How about editing configuration files graphically?
Here I mentioned about the configuration files used as an input to BPMConfig command to create deployment environment

  • BPM installation has set of sample response files made available at 'BPM_Install_root/BPM/samples/config/' which can be edited to customize various values such as database name, deployment environment name, deployment environment user credentials etc..
  • Existing deployment environment configuration properties can be exported using BPMConfig command with export option, which can be edited in this utility as well.
IBM BPM Configuration editor located in zip archive under install_root\BPM\config\ui\
Unzip the BPMConfigurationEditor.zip
The archive contains two executable file, one for windows with .bat extension and another one for Linux with .sh extension
Change the file permission so that it can be run to open the editor
'configEditor.ini' file controls two things,
  1. Location of java
  2. Port no on which this utility will be running, by default this value is set to 8888
I didn't make any changes and left the '.ini' file as it is
Before running the 'configEditor.sh', make sure the display is set accordingly to export the screen to local machine
I've used combination of Xming and putty to transfer the screen from Linux host to local host
Run '.configEditor.sh' to launch IBM BPM Configuration Editor
If everything configured properly to transfer the session from Linux host to local host, IBM BPM Configuration editor will launch in browser window as shown below
Click on Browse button to locate the directory where sample configuration file are kept
"'BPM_INSTALL_ROOT/BPM/samples/config/advanced"
Select the file and click open
Now the file has been selected, click on Open Editor button




Once file opened in editor, you can witness the following
Name of file 'Advanced-PC-SingleCluster-DB2.properties'
Type of profile (Process Server or Process Center) along with BPM edition and version 'IBM BPM Advanced 8.5.6.0 Process Center'
Horizontal bar with headers Topology, Security, Performance, Summary and Save
Each header can be selected to show the associated properties associated with it
When Topology is selected, the following properties are highlighted,
All these fields are editable, by default the name of the cell is 'PCCell1' which can be modified by highlighting and selecting,
Once you select and highlight PCCell1 on top left hand corner, another window opens up where the cell name can be changed
Here I've changed the value from PCCell1 to ProcessAdminCell
And you have two small icons on right hand corner, to reset and to finish
Reset
Finish
When you click on 'Aliases' you can enter values for CellAdmin, DeAdmin and BPM_DB_Alias
Database values can be changed by selecting appropriate database in the screen
Node values can be changed by selecting the node1 rectangle box
Same like all other tab can be selected and values can be modified
Summary section reflects the values changed so far


Intermediately you can click save button to save the changes to configuration file
After making changes, deployment environment can be created by passing this configuration file as an input to 'BPMConfig' command

Overall I like this utility; it helps you in visualizing the deployment environment by graphically showing the various parameters

Tuesday, August 4, 2015

setting up sand box for IBM BPM

Setting up IBM BPM sandbox 

Having your own BPM installation provides you flexibility from all perspective, it's your playground to try out anything as you like

To begin with, I've documented steps what I've followed to setup IBM BPM Sandbox locally.

IBM BPM will be installed on Red hat virtual machine running on windows machine

Following are the list of tasks involved in setting up IBM BPM sandbox

  • Installing VMWare work station and creating RHEL virtual machine
    • Identify the IP Address of virtual machine and update the host name
  • Preparing for IBM BPM installation
    • download and extract the BPM executables
    • Mount the RHEL ISO image to install RHEL libraries required to meet the pre-requisites
    • Preparing Linux systems for installation (WebSphere Application Server Network Deployment 8.5.5)
    • Preparing Red Hat Enterprise Linux 6 for installation
  • Install BPM silently using a response file
  • Installing DB2 as non-root user
    • Create new user/group
    • Validate pre-requisites 
    • Modify kernel parameters
    • Install DB2 using response file
  • Configure DB2
    • run db2profile command
    • setup service name
    • enable root based features in non-root installation (db2rfe)
    • Enable TCP IP communication
  • Disable firewall on Linux host
  • Creating Deployment Environment using 'BPMConfig' command
    • Create database required to create BPM profile
    • Creating BPM process center deployment environment using BPMConfig command
    • Running the generated DB2 database scripts
    • Bootstrap process server data
    • Starting the deployment environment
    • Accessing IIS console of Process Center deployment environment

Installing VMWare work station and creating RHEL virtual machine

You would require VMWare work station executable and an ISO image of RHEL or it's equivalent cent OS community edition

I haven't captured the screens while doing VMWare installation on Windows machine hence it's straight forward

After Installing VMWare work station, Create new RHEL virtual machine using ISO image

launch the 'New Virtual Machine Wizard' from File menu, proceed with default option Typical Configuration



  • Choose the RHEL ISO image file,
  • Create new user name 'bpmadmin' which will be used to install IBM BPM


  • Provide appropriate name for Virtual Machine
  • Also choose the location to keep the virtual machine files

  • Choose radio button to store virtual disk as a single file


You have the option to customize hardware, increase RAM, Disk Size as required
make sure you've selected check box, power on this virtual machine after creation



Ignore the warning 'Unsupported Hardware Detected', and proceed with 'OK'
Press space bar to accept this warning
RHEL is getting installed
OS is getting started post installation


RHEL installed and you've been prompted to login




By default the RAM allocated for virtual machine is 2GB, which will not be sufficient to run IBM BPM, hence I've increased the RAM size from 2GB to 4GB
Shut down the RHEL to increase the memory allocation from 2 GB to 4 GB
Edit virtual machine settings to increase the RAM size to 4 GB

Identify the IP Address of virtual machine and update the hostname

Note: Make sure that you change the host name as required prior to installing BPM, changing host name post BPM installation is not advisable hence it's not straight forward
Power on the virtual machine
Login and navigate to menu
Applications > System Tools > Terminal
In terminal window type command 'ifconfig' to identify the IP address of RHEL virtual machine
Login via putty
'su' as root
update the host name as 'rhelvm'
Update the hosts file (/etc/hosts) to include hostname as 'rhelvm'
Update the network file to include the 'hostname'
Restart the network
Logoff and login
Make sure the host name is shown as 'rhelvm' after logging in
Update the hosts file in windows
On windows 7 'hosts' file is write protected, file can be edited by launching notepad as administrative user
To launch notepad as admin user
On windows explorer, go to location 'C: \Windows\System32' and search for notepad.exe
Right click on 'notpead.exe' and choose option 'Run as administrator'
Once notepad is open, navigate to directory 'C: \Windows\System32\drivers\etc' and open file 'hosts' to include entry as highlighted below
Tip:
Directory location ''C: \Windows\System32\drivers 'can be opened at explorer directly by entering drivers in Run window
Make sure that 'rhelvm' hosts is reachable from local machine by pinging from command window as shown below

Preparing for IBM BPM installation

download the following eAssembly for IBM BPM
Downloadable parts for Linux on x86
Required software
eAssembly
Image
Description
CRVC5MLhttp://www-01.ibm.com/support/docview.wss?uid=swg24038621&aid=1
CN4RXML
IBM Business Process Manager Advanced V8.5.6 Quick Start Guide
CN4S5ML
CN4S6ML
CN4S7ML
IBM Business Process Manager Advanced V8.5.6 for Linux x86, 64-bit, Multilingual 
Make sure that you download all of the images and extract them to the same location. 
Includes:
  • IBM Business Process Manager Advanced Version 8.5.6
  • IBM WebSphere Application Server Network Deployment V8.5.5 Fix Pack 5
  • DB2 Express V10.1.0 Fix Pack 1


Transfer the downloaded files to '/home/bpmadmin/Downloads'
Here I've used FileZilla to transfer the files from local machine to VM host
Create new directory bpm856 and unzip files in it

Mount the RHEL ISO image

We might require to install additional libraries while validating the pre-requisites for IBM BPM installation,
you can mount the ISO image of RHEL as repository to install those libraries as needed
how to mount ISO image, follows the steps below
Copy the red hat ISO image to '/home/bpmadmin/Downloads'
Su as root and Create new directory '/mnt/disk'
Change directory to '/home/bpmadmin/Downloads'
Mount the ISO image as loopback device as shown below
'mount -o loop ./rwd-rhel64x64.iso /mnt/disk'
Modify the 'rhel-source.repo' to include entry for mounted ISO image
rhel –source.repo file located in /etc/yum.repos.d
Include the following entry
[RHEL-CD]
name=RHEL 6.4
baseurl=file:///mnt/disk/Server
enabled=1
gpgcheck=0



enter command 'yum clean all' to refresh the cache



Preparing Linux systems for installation (WebSphere Application Server Network Deployment 8.5.5)


Validate and verify the pre-requisites as shown below
Check the existence of following 3 packages
Install the missing package 'libXp' using yum install
Ensure that the default shell for your Linux operating system is /bin/bash. Use the following command to ensure that your default shell is bash and not dash:
Check Firefox installed or not
Verify the UMASK value (should be 022)
Set the ulimit on your Linux command shells by adding the command to your shell profile script. The shell profile script is usually found under your home directory:
  1. cd ~
  2. vi .bashrc
  3. ulimit -n 8192

Preparing Red Hat Enterprise Linux 6 for installation


Check the existence of following packages and install them if not installed already
compat-libstdc++-33-3.2.3-69
compat-db-4.6.21-15
ksh-20100621-2
Disable SELINUX
Édit file '/etc/sysconfig/selinux' to change the value for SELINUX=disabled
Reboot the server for the SELINUX change to take effect
Modify the '/etc/security/limits.conf' to increase the limit
# - stack - maximum stack size (KB)
bpmadmin soft stack 32768
bpmadmin hard stack 32768
# - nofile - maximum number of open files
bpmadmin soft nofile 65536
bpmadmin hard nofile 65536
# - nproc - maximum number of processes
bpmadmin soft nproc 16384
bpmadmin hard nproc 16384
# - fsize - maximum file size
bpmadmin soft fsize 6291453
bpmadmin hard fsize 6291453

Check for the existence of a file named /etc/security/limits.d/90-nproc.conf, which overrides the nprocvalue set in the limits.conf file. If the 90-nproc.conf file exists, edit it and set the nproc values that are specified in the previous step.
Modify the value against * to 16384
Check the existence of package rpm-build and install
Set the umask value to 077 using the following command:
  • umask 077

Install BPM silently using a response file


BPM can be installed no of ways,
  • using imcl command line
  • using response file
  • using GUI
Here I've detailed the BPM installation using response file, 

response files are located in the following directory where files are extracted
/home/bpmadmin/Downloads/bpm856/responsefiles/BPM'
bpm will be installed under non root user account, 'bpmadmin', choose response file 'bpmAdv_linux_response_nonroot_64bit.xml' and modify the file as follows
response file requires 3 details
  1. location of repository
  2. location where the IBM BPM component will be installed
  3. list of features will be installed


**highlighted below is the location of repository for IBM Installation Manager and repository for BPM installation
<server> <!-- ==================== IBM Installation Repository Location =====================--> <repository location='/IBM/bpm856/IM64/' temporary='true'/> <!-- ======= IBM Business Process Manager Advanced, WebSphere Application Server ND =======--> <repository location="/IBM/bpm856/repository/repos_64bit/" /> </server>
**highlighted below is the location where IM eclipse will be installed
<profile kind='self' installLocation='/IBM/InstallationManager/eclipse' id='IBM Installation Manager'>
<data key='eclipseLocation' value='/IBM/InstallationManager/eclipse'/>
</profile>
**highlighted below is the directory location where shared cache will be located
<preference value="/IBM/IMShared" name="com.ibm.cic.common.core.preferences.eclipseCache" />
**highlighted below is the feature denotes the Installation Manager
<install> <offering features='agent_core,agent_jre' id='com.ibm.cic.agent'/> </install>
**highlighted below is the install location where IBM BPM will be installed
<profile installLocation='/IBM/BPM/v85' id='IBM WebSphere Application Server Network Deployment V8.5'> <data key='eclipseLocation' value='/IBM/BPM/v85' /> <data key="cic.selector.nl" value="en" /> <data key='user.import.profile' value='false'/> <data key='user.select.64bit.image,com.ibm.websphere.ND.v85' value='true'/>
</profile>
**highlighted below is the list of BPM features that will be installed
<install>
<offering profile="IBM WebSphere Application Server Network Deployment V8.5" id="com.ibm.websphere.ND.v85" features='core.feature,ejbdeploy,thinclient,embeddablecontainer,samples,com.ibm.sdk.6_64bit'/> <offering profile="IBM WebSphere Application Server Network Deployment V8.5" id="com.ibm.websphere.IBMJAVA.v70" features='com.ibm.sdk.7'/> <offering profile="IBM WebSphere Application Server Network Deployment V8.5" id="com.ibm.bpm.ADV.v85" features='AdvancedProcessCenter'/>
</install>
Save the file and install BPM using command 'userinstc'
'userinstc' command located in IM64 directory
./userinstc -acceptLicense input /IBM/bpm856/responsefiles/BPM/bpmAdv_linux_response_nonroot_64bit.xml -log /IBM/BPM/slient_install.log
screen shot shows the list of components installed sucessfuly
verify the log file 'silen_install.log' it should be empty
<?xml version='1.0' encoding='UTF-8'?>
<result/>







Installing DB2 as non-root user

BPM Package downloaded earlier has DB2 express installation packages which can't be installed as non-root user.
Here I've detailed the procedure to be followed to install DB2 as non-root user
download the DB2 enterprise edition, here I've used 'DB2 ESE 10.1'
Create new user and group as follows
The pre-requisites to install IBM DB2 can be verified using the following commmand
make sure you mention the appropriate version name, else this command will generate the report for multiple DB2 version
Run the './db2prereqcheck –v 10.1.0.0'
Modifying kernel parameters (Linux)
Run the ipcs -l command to list the current kernel parameter settings.
Modify the kernel parameters that you have to adjust by editing the /etc/sysctl.conf file
With reference to the page above following values are amended/added as highlighted in the screen shot below
Run sysctl with -p parameter to load in sysctl settings from the default file /etc/sysctl.conf:


Installing DB2 using response file as a non-root user db2admin
Edit the sample response file 'db2ese.rsp' located at /IBM/DB2/ese/db2/linuxamd64/samples
Modify the file permission so that it can be edited
Following sections were changed at response file
Earlier it was not commented out
Earlier the value of LIC_AGREEMENT kept as DECLINE
Earlier it was not commented out



Save the response file
Run the db2setup command with input as response file as shown below
db2setup command is in /IBM/DB2/ese directory
./db2setup -r /IBM/DB2/ese/db2/linuxamd64/samples/db2ese.rsp -l /tmp/db2setup.log -t /tmp/db2setup.trc
Installation failed with following comments
Edit the response file
Earlier it was not commented out
Earlier it was commented out
Earlier it was not commented out



Install again

Installation successful
As mentioned above run the 'db2profile' command as shown below
Followed by setup service name
update dbm cfg using SVCENAME db2c_db2admin
after that login as root and update /etc/services to include
db2service name as 'db2c_db2admin', corresponding protocol as 'tcp' and port as '50000'

Enabling root-based features in non-root installations with db2rfe

There are several features and abilities in non-root installations that are initially unavailable but can be enabled by running the db2rfe command.
db2rfe.config was located in /home/db2admin/sqllib/instance
edit the file to enable OS authentication
Make sure the instance is stopped
Run the db2rfe command with input file as db2rfe.cfg


Enable TCPIP communication as shown below