Showing posts with label was. Show all posts
Showing posts with label was. Show all posts

Friday, 8 February 2013

IBM Installation Manager tips


Update IM

=========
Example 1.5 to 1.5.2
The package com.ibm.cic.agent_1.5.0.20110909_1200 is IM itelf
Download from http://www-01.ibm.com/support/docview.wss?uid=swg24032358#downloads
The install instructions here didn't work at all for me, instead I just unpacked the downloaded ZIP into /opt/bpm/src8/im
Then ran /opt/bpm/src8/im/userinstc -acceptlicense -installationDirectory /opt/IBM/InstallationManager/eclipse
(I believe this worked out where the existing IM was installed by going
to the installing users home dir and looking in ~/.bim/.niff or ~/var/ibm/InstallationManager)

IM command line
===============
/opt/bpm/im/eclipse/tools/imcl

No args gives help page

IM persisted repositories and other prefs
==================================
/opt/bpm/var/ibm/InstallationManager/.settings/com.ibm.cic.agent.core.prefs - you can edit this file as a quick way of removing repositories that IM has "remembered" from past installations (which I find to be really annoying given that I'm specifying the repos I need in my response file and it's complaining about stuff I've long deleted to save disk space).
Alternatively you can run imcl -consoleMode and delete them from here if you want to be picky .... (It's all just files on disks though, no magic :-)



Uninstalling a package and specifying it's path
====================================

First list full details of everything that's installed:
/opt/IBM/InstallationManager/eclipse/tools/imcl listInstalledPackages -long


Then uninstall the relevant package 
/root/IBM/InstallationManager/eclipse/tools/imcl uninstall  com.ibm.websphere.ND.v70_7.0.19.20110814_1205 -installationDirectory /opt/ibm/BPM/v7.5

Finding out which repo was used to install a package
=========================================
/opt/IBM/InstallationManager/eclipse/tools/imcl listInstalledPackages -verbose



Tuesday, 8 January 2013

Changing ports on IBM BPM 7.5.1





Step 1 - Create DMGR and Node profiles with desired ports


This is done by using -portsfile option with the manageprofile.sh -create command

manageprofiles.sh -response myRespFile.resp

.. and the response file is as follows .. note the last line in bold

create
profileName=dmgr001
nodeName=saturn001Node
hostName=saturn-appserver
cellName=saturncell001
serverType=DEPLOYMENT_MANAGER
profilePath=/opt/bpm/bpm751/profiles/dmgr001
templatePath=/opt/bpm/profileTemplates/BPM/dmgr.procsvr.adv
enableAdminSecurity=true
adminUserName=admin
adminPassword=BPM123bpm
dbCreateNew=false
dbDesignEnabled=false
dbDelayConfig=true
dbDriverType=ORACLE_THIN
dbHostName=jupiter-dbserver
dbJDBCClasspath=/opt/bpm/jdbcdrivers/Oracle
dbName=BPM1
dbServerPort=1725
dbType=Oracle
dbCommonUserId=SIT_COMM
dbCommonPassword=myPass
dbBSpaceUserId=SIT_BSP
dbBSpacePassword=myPass
personalCertValidityPeriod=15
signingCertValidityPeriod=15
keyStorePassword=foobar
portsFile=dmgr.ports

.. and the dmgr.ports file is as follows..

BOOTSTRAP_ADDRESS=11004
SOAP_CONNECTOR_ADDRESS=11005
SAS_SSL_SERVERAUTH_LISTENER_ADDRESS=11006
CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS=11007
CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS=11008
WC_adminhost=11000
WC_defaulthost=11001
DCS_UNICAST_ADDRESS=11009
WC_adminhost_secure=11002
WC_defaulthost_secure=11003
SIP_DEFAULTHOST=11010
SIP_DEFAULTHOST_SECURE=11011
SIB_ENDPOINT_ADDRESS=11012
SIB_ENDPOINT_SECURE_ADDRESS=11013
SIB_MQ_ENDPOINT_ADDRESS=11014
SIB_MQ_ENDPOINT_SECURE_ADDRESS=11015
ORB_LISTENER_ADDRESS=11016
CELL_DISCOVERY_ADDRESS=11017
IPC_CONNECTOR_ADDRESS=11018
NODE_DISCOVERY_ADDRESS=11019
NODE_IPV6_MULTICAST_DISCOVERY_ADDRESS=11020
NODE_MULTICAST_DISCOVERY_ADDRESS=11021
DataPowerMgr_inbound_secure=11022

you'll need to take the same approach for your node profiles


Step 2 - Change WAS Cluster Ports

The script below will do this

import sys;

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Functions
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def modPorts ( cName,startPort ):

  # Get a list of hostnames
  dict = {}
  for node in AdminConfig.list('Node').split():
    nHost = AdminConfig.showAttribute(node, 'hostName')
    nName = AdminConfig.showAttribute(node, 'name')

    # Tie the hostname to the nodename and store in a hashtable for later use
    dict[nName] = nHost

  try:

    clusterId=AdminConfig.getid('/Cell:'+cellName+'/ServerCluster:'+cName)
    members=AdminConfig.list('ClusterMember',clusterId).splitlines()
    for member in members :
      sPort = startPort
      nodeName=AdminConfig.showAttribute(member,"nodeName")
      memberName=AdminConfig.showAttribute(member,"memberName")

portNames = [
'WC_defaulthost','WC_adminhost','WC_defaulthost_secure',
'WC_adminhost_secure',
'BOOTSTRAP_ADDRESS',
'SOAP_CONNECTOR_ADDRESS',
'SAS_SSL_SERVERAUTH_LISTENER_ADDRESS',
'CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS',
'CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS',
'DCS_UNICAST_ADDRESS',
'SIB_ENDPOINT_ADDRESS',
'SIB_ENDPOINT_SECURE_ADDRESS',
'SIP_DEFAULTHOST','SIP_DEFAULTHOST_SECURE',
'SIB_MQ_ENDPOINT_ADDRESS',
'ORB_LISTENER_ADDRESS',
'SIB_MQ_ENDPOINT_SECURE_ADDRESS',
'IPC_CONNECTOR_ADDRESS']


      host = dict[nodeName]
      print "INFO: Cluster member is "+memberName+" and hostname is "+host
      for portName in portNames:
        print "INFO: Setting "+portName+" to "+str(sPort)
        AdminTask.modifyServerPort(memberName, '[-nodeName '+nodeName+' -endPointName '+portName+' -host '+host+' -port '+str(sPort)+' -modifyShared true ]')
        sPort=sPort+1

  except:
    print "ERROR - problem settign ports for "+cName
    print sys.exc_info()[0]

  else:
    AdminConfig.save()
    print "Complete"

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Main
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
envName=sys.argv[0]
startPort=int(sys.argv[1])
clusterLabel=sys.argv[2]

cell = AdminConfig.list('Cell')
cellName = AdminConfig.showAttribute(cell, 'name')
print "INFO: Setting "+clusterLabel+" ports"
modPorts(envName+"."+clusterLabel, startPort)


Step 3 - Now generate 100Custom.xml files for Process Centre / Process Server and Performance Data Warehouse

Something like this will do the job .. for the Process Centre / Process Server - You'll need to copy this to both nodes under ...../config/cells

<properties>
        <event-manager merge="mergeChildren">
                <jndi>
                        <!-- the bootstrap port for AppTarget -->
                        <env merge="replace" key="java.naming.provider.url" value="corbaname:iiop:saturn-appserver:11204" />
                </jndi>
        </event-manager>

        <server merge="mergeChildren">
                <email>
                        <mail-template>
                                <client-link merge="replace">https://saturn-webserver:11680/teamworks</client-link>
                        </mail-template>
                </email>

                <repository-server-url merge="replace">https://saturn-webserver:11680/ProcessCenter</repository-server-url>
                <repository-server-user-auth-alias merge="replace">BPMAdmin_Auth_Alias</repository-server-user-auth-alias>
                <repository-server-interval merge="replace">10</repository-server-interval>


                <server-name merge="replace">SIT001</server-name>
                <server-description merge="replace">A running process server</server-description>
                <server-host merge="replace">saturn-webserver</server-host>
                 <server-port merge="replace">11680</server-port>
                <environment-type merge="replace">Development</environment-type>

                <cache>
                        <!-- the bootstrap port for AppTarget -->
                        <provider-url merge="replace">corbaname:iiop:saturn-appserver:11204</provider-url>
                </cache>

                <jndi-url merge="replace">corbaname:iiop:saturn-appserver:11204</jndi-url>
        </server>

        <authoring-environment merge="mergeChildren">
                <images-prefix merge="replace">https://saturn-webserver:11680/teamworks</images-prefix>
                <portal-prefix merge="replace">https://saturn-webserver:11680/portal</portal-prefix>
                <repository-prefix merge="replace">https://saturn-webserver:11680/ProcessCenter</repository-prefix>
                <servlet-prefix merge="replace">http://frbpmwebsit.gslb.db.com:11680/teamworks</servlet-prefix>
                <use-portal-for-preview merge="replace">true</use-portal-for-preview>
                <webapi-prefix merge="replace">https://saturn-webserver:11680/webapi</webapi-prefix>
                <process-help-wiki-url-view merge="replace">https://saturn-webserver:11680/processhelp/en/%TITLE%?teamworksTitle=%TEAMWORKS_TITLE%</process-help-wiki-url-view>
                <process-help-wiki-url-edit merge="replace">https://saturn-webserver:11680/processhelp/en/Special:Edit?topic=%TITLE%&amp;teamworksTitle=%TEAMWORKS_TITLE%</process-help-wiki-url-edit>
        </authoring-environment>

        <common merge="mergeChildren">
                <portal-prefix merge="replace">https://saturn-webserver:11680/portal</portal-prefix>
                <process-admin-prefix merge="replace">https://saturn-webserver:11680/ProcessAdmin</process-admin-prefix>
                <teamworks-webapp-prefix merge="replace">https://saturn-webserver:11680/teamworks</teamworks-webapp-prefix>

                <webservices merge="mergeChildren">
                        <base-url merge="replace">http://frbpmwebsit.gslb.db.com:11680/teamworks/webservices</base-url>
                </webservices>
                <environment-name merge="replace">SIT001</environment-name>
                <xml-serialization>
                        <default-namespace-uri merge="replace">http://frbpmwebsit.gslb.db.com:11680/schema/</default-namespace-uri>
                </xml-serialization>
                <coach-designer-xsl-url merge="replace">https://saturn-webserver:11680/teamworks/coachdesigner/transform/CoachDesigner.xsl</coach-designer-xsl-url>
        </common>
</properties>


... and the PDW 100Custom.xml


<properties>
    <server merge="mergeChildren">
        <jndi-url merge="replace">corbaname:iiop:saturn-appserver:11504</jndi-url>
    </server>
</properties>



Step 4 - Last but not least.. change REST endpoints

Login to the Websphere Administrative Console and navigate to Services > REST Services > Rest service providers. The resultant screen will look similar to the example shown below























1.  Select each REST provider in turn (with the exception of the REST Services Gateway 
Dmgr) and on the resultant form set the values as follows...
•        Protocol – https
•        Hostname of virtual host – Load Balancer Hostname
•        Port – Load Balancer HTTPS Port Number (e.g. 11680)
All other parameters should remain as default.

The above steps will also automatically update the REST endpoints for the Cluster where BPC Explorer is installed, however the other clusters need to be configured manually as follows

2. For each cluster, navigate to Servers > Clusters > WebSphere application server clusters > CLUSTER_NAME > REST services
3. Set Protocol, host and port to be the same as the REST Gateway settings configured in step 2 above.
4. Repeat for each cluster
5. Click OK, and select Save to save the configuration.

Lastly, set the HTM and BFM API URL's for BPC explorer as follows..

6. Navigate to Servers > Clusters > WebSphere application server clusters > WEBAPP_CLUSTER_NAME > Business Process Choreographer >  Business Process Choreographer Explorer > BPCExplorer_<WEBAPP_CLUSTER_NAME>
7. Set Business Flow Manager REST API URL and Human Task Manager REST API URL to https://<load balancer hostname>:<load balancer port>/rest/bpm/bfm







For example https://saturn-webserver:11680/rest/bpm/bfm

8. Synchronise the Cell
9. Restart the Clusters in the following order
     -  Messaging, AppTarget, Support, WebApp



Saturday, 8 December 2012

Nodeagent compaining about port in use - even though the port in question is free



When starting a nodeagent (I imagine any other WAS JVM would also complain in the same way) a "port in use" error is displayed and the JVM will not start. However, when you have a look with netstat -an the port is clearly not in use (OK it'll be in TIME_WAIT for a minute because your JVM did try to initialize it but if you wait a while you'll see the TIME_WAIT will dissapear) 

Simple slip-up when doing an automated build which resulted in the hostname in serverindex.xml being incorrect. Change all occurrences to the correct hostname (i.e the hostname of the nodeagent) and all will be well.


Don't forget to change it in the DMGR profile also, otherwise next time you sync you'll distribute the dodgy serverindex.xml

PermGen OutOfMemory when running addNode

Carrying out a straightforward Node federation today and I got a PermGem OutOfMemory error... first time I've seen that one!.

Anyway, to solve it, simply give the JVM under addNode.sh some more Permanent Generation space as follows:

./addNode.sh -javaoption -XX:PermSize=128m <dmgr hostname> <dmgr SOAP port> -user <user name> -password <password>



Sunday, 2 December 2012

Set proxy details for a Websphere (WAS) JVM


The three properties required are...
  • http.proxyHost
  • http.proxyPort
  • http.nonProxyHosts
These are specified as generic JVM arguments using the -D option as follows...
-Dhttp.proxyHost=stack1.com

This can be set either via the WAS admin console by navigating to...
Application servers > myServer > Process definition > Java Virtual Machine > genericJvmArguments

Or using wsadmin as follows...
AdminConfig.modify(jvm, [['genericJvmArguments', '-Dhttp.proxyHost=stack1.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts="localhost|stack1.com|127.0.0.1"']])

Where jvm is the reference to the relevant JavaVirtualMachine configID

Emergency upgrade of WebSphere JVM to 64 bit

Should you accidentally install a 32 bit JVM under your BPM stack (doh!!) ... here's how to upgrade it without tearing down the whole thing and re-installing 

1./ Create a new Installation Manager new response file as below. Set the path and the offering profile to be different from any existing installations on the target machine. what you're doing here is just installing a new temporary version of WAS and you'll only be using the bin, java and lib directories.

For this example we'll use an install dir of /opt/bpm/WAS_64 and an Installation Manager profile of WAS_64 

<?xml version="1.0" encoding="UTF-8"?>
<agent-input>
<server>
        <repository location='/opt/bpm/install/repository'/>
</server>
<profile installLocation='/opt/bpm/WAS_64' id='WAS_64'>
        <data key='eclipseLocation' value='/opt/bpm/WAS_64' />
        <data key="cic.selector.nl" value="en" />
        <data key='user.import.profile' value='false'/>
        <data key='user.select.64bit.image,com.ibm.websphere.ND.v70' value='true'/>
</profile>
<install>
        <offering profile="WAS_64" id="com.ibm.websphere.ND.v70" features='core.feature,import.productProviders.feature,import.configLauncher.feature' installFixes='none'/>
    <!--
        ANy WAS patches that you need also need to be installed
    -->   

</install>
<preference name='com.ibm.cic.common.core.preferences.eclipseCache' value='/opt/bpm/eclipsecache'/>
<preference value="30" name="com.ibm.cic.common.core.preferences.connectTimeout" />
<preference value="30" name="com.ibm.cic.common.core.preferences.readTimeout" />
<preference value="0" name="com.ibm.cic.common.core.preferences.downloadAutoRetryCount" />
<preference value="true" name="offering.service.repositories.areUsed" />
<preference value="false" name="com.ibm.cic.common.core.preferences.ssl.nonsecureMode" />
<preference value="false" name="com.ibm.cic.common.core.preferences.http.disablePreemptiveAuthentication" />
<preference value="true" name="com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts" />
<preference value="false" name="PassportAdvantageIsEnabled" />
<preference value="true" name="com.ibm.cic.common.core.preferences.searchForUpdates" />
<preference value="true" name="com.ibm.cic.common.core.preferences.import.enabled" />
</agent-input>


2./ Now run Installation Manager using the response file created above as the input.
  • /opt/bpm/im/eclipse/IBMIM -acceptLicense -input <response file> -silent -nosplash
3./ Save versionInfo (for version comparison later on)
  • /opt/bpm/<original BPM install>/versionInfo.sh -maintenancePackageDetail > /tmp/bpm-version32
4./ Shut down all JVM's and carry out the following moves in the EXISTING install:
  • mv /opt/bpm/<original BPM install>/java /opt/bpm/<original BPM install>/java_32
  • mv /opt/bpm/<original BPM install>/bin /opt/bpm/<original BPM install>/bin_32
  • mv /opt/bpm/<original BPM install>/lib /opt/bpm/<original BPM install>/lib_32
5./ Recursively copy the java, bin and lib directories fron the new 64 bit install:
  • cp -rp /opt/bpm/WAS_64/java /opt/bpm/<original BPM install>
  • cp -rp /opt/bpm/WAS_64/bin /opt/bpm/<original BPM install>
  • cp -rp /opt/bpm/WAS_64/lib /opt/bpm/<original BPM install>
5./ Re-instate any lib/ext libraries you may have
  • cp -rp /opt/bpm/<original BPM install>/lib_32/ext/* /opt/bpm/<original BPM install>/lib/ext
  • cp -rp /opt/bpm/<original BPM install>/lib_32/task* /opt/bpm/<original BPM install>/lib
6./ Re-instate CACerts (I'm assuming you've worked out that BPM 7.5.* and 8.0.* both use CACerts in 2 cases... a.) The Process Centre uses it for a trust store when it needs to trust a remote process server and b.) the RAL (Remote Artifact Loader) uses it as a trust store and as a keystore if it needs to use an SSL key to authenticate to any endpoints where you may have enabled client SSL auth)
  • cp -p /opt/bpm/<original BPM install>/java_32/jre/lib/security/cacerts /opt/bpm/<original BPM install>/java/jre/lib/security
7./ Save new versionInfo (see step 3) 

/opt/bpm/<original BPM install>/bin/versionInfo.sh -maintenancePackageDetail > /tmp/bpm-version64
8./ Compare versionInfo outputs
  • diff /tmp/bpm-version32 /tmp/bpm-version64
9./ If this is Solaris, you'll need to add the -d64 flag to all jvm parameters (under Generic JVM args)

You now have a 64 bit stack ... phew :-)  

Friday, 9 November 2012

Getting help from Installation Manager

Sounds like it should be easy, but I don't think the person who developed IM was feeling very helpful the day he/she implemented the -help function. If you dont add the -nosplash and -silent options (in the correct order) you end up with a bunch of X11 errors because the program is trying to reach an Xserver (duh!)

The command below will print out the help text to STDOUT
./IBMIM -nosplash -silent -help