Sunday, July 29, 2012

Extending TSAM using Eclipse

If you have been using Tivoli Service Automation Manager (TSAM) for Cloud provisioning, the usual way for service offering customization is to write Javascript and HTMLs directly on TSAM server.   With TSAM 7.2.2, there is an Eclipse based project available for self service offering customization.   Using this Eclipse project, you can perform Javascript customization right from your Eclipse IDE.  This artcile provides a high-level technical overview of this process.

To setup the Eclipse development environment,  you need to download/setup Eclipse first.  Even thought the latest versions of Eclipse should work, according to documentation, the Eclipse projects were tested with Helios (3.6) version and it is safe to use either Helios or Galileo versions.  Once Eclipse is setup, you simply have to download the project zip from TSAM install images located under TSAMBASE7300/samples/UI directory and import two Eclipse projects viz, custom_web and custom_web_build into Eclipse using Eclipse Import wizard. 

The custom_web project is used to make any javascript changes.  The custom_web_build project contains several ANT tasks that can be used to perform deployment to TSAM Server.   Connection to TSAM server is managed through SSH and you can specify the authentication parameters in build.properties. SSH authentication can use either SSH keys or password.

For testing you can use the quickdeploy ANT task that rebuilds the custom_web.war application as you publish the changes.  You can also backout the changes using undeploy task but that basically removes the custom_web.war from the TSAM server removing all custom changes.   For production deployments, you will have to rebuild the maximo.ear file using buildmaximoear.sh/cmd command.

You can find more information about this TSAM customization in TSAM 7.2.2 Extensibility Guide available at the following location.
http://publib.boulder.ibm.com/infocenter/tivihelp/v10r1/topic/com.ibm.tsam_7.2.2.doc/ext/c_sg_extensibility.html

Hope this helps you get started with TSAM customization. If you have any questions, please feel free to post it it in the comments.

Friday, June 29, 2012

DB2 Automatic startup for Linux/Unix

For many Tivoli installations, chances are you also need to setup DB2 for database services. One of the common issue with DB2 installations is that it is not setup to start automatically on reboot in Unix/Linux systems. IIRC, this feature was there in very old DB2 installations but removed for unknown reason.  So everytime your system reboots (however rare that may be), you would have to manually bring the service up.

To address this issue, usually the DB2 DBAs write a script to run DB2 automatically during startup.  If you don't have DBA support in your site, here is a very simple startup script that can be used to start DB2 automatically.   You will need root privileges to add this script to startup.


1.  Copy the following file and save it as /etc/init.d/db2server

#!/bin/bash
#
# chkconfig: - 91 35
# description: Starts and stops db2server. \

# Source function library.
. /etc/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0


prog="DB2"
inst="db2inst1"
start() {
    echo -n $"Starting $prog: "
    su - $inst -c "db2start"
}

stop() {
    echo -n $"Shutting down $prog: "
    su - $inst -c "db2stop force"
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart|reload)
        stop
        sleep 3
        start
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart}"
        exit 1
esac

2. Run the following commands as root. (Tested on RHEL5)
# chmod a+x /etc/init.d/db2server
# ln -s /etc/init.d/db2server /etc/rc.d/rc5.d/S99Db2Server
# ln -s /etc/init.d/db2server /etc/rc.d/rc3.d/S99Db2Server
# ln -s /etc/init.d/db2server /etc/rc.d/rc1.d/K10Db2Server
# ln -s /etc/init.d/db2server /etc/rc.d/rc0.d/K10Db2Server

That is it!   The above steps should work for Linux systems.  Please note that Unix systems (AIX, Solaris and HPUX) do follow different rc.d directory structure and you may have to link it to appropriate directory structure for your operating system. 

Also the script is setup to use db2inst1 as the DB2 instance owner. If your site uses different user, change the script accordingly. 

Hope this helps.

Tuesday, May 22, 2012

Getting a UDF definition in DB2

Recently, I was looking to change few DB2 User defined functions I developed in the past, but couldn't find
their source code even though the User Defined functions were present in the database.   Here is a simple SQL that I used to extract the UDF definition from the DB2 Catalog.

select routinename, text from syscat.routines r where routinetype = 'F' and language = 'SQL' and routinename like 'MyRoutine%'


PS: I did have problems running the above SQL in DB2 Command Editor. It showed the Text name fields as SQL0423N Locator variable "1" does not currently represent any value. SQLSTATE=0F001.   Instead, running the above SQL frrom command line worked without any issues.


Hope this helps.

Monday, May 21, 2012

Some notes on installing TBSM 6.1 FP 1

1. One of the prerequisites for TBSM 6.1 FP1 is TIP version 2.2.0.7, which you must install silently with the command:

install.sh -i silent -j $JAVA_HOME -f responsefile.txt

JAVA_HOME must NOT be set to your TIP Java directory (/opt/IBM/tivoli/tipv2/java) or anything similar. If it is, the installer will fail because it will see your install process running. So you need to point it to a DIFFERENT Java 1.6 location.

2. The FIT (Fixpack Intelligence Tool) component must be extracted into the $TIP_HOME/profiles/TIPProfile/etc directory. This means that you will have a directory named $TIP_HOME/profiles/TIPProfile/etc/fit when you're done copying.


Tuesday, May 8, 2012

PHP with WebSphere

Who knew it was possible? An open source initiative has made it possible to use PHP on WebSphere:

http://www.projectzero.org/php/

Monday, May 7, 2012

SSL Certificate Issue with Tivoli Integrated Portal

Most of the Tivoli Integrated Portal (TIP) users aware of the harmless SSL error.  Whenever one access the Tivoli Integrated Portal login screen, the browser displays a SSL error like the one below.


While it is harmless and just needs an additional click to get to the login screen, you can get rid of this error if you have administrator privileges on the workstation.

Why does this error happen?   Basically the SSL certificate provided by TIP for SSL communication is a self-signed one and therefore not trusted.   There are ways to purchase the certificate from Certificated Authority and import it into TIP but not many sites do that due to cost and maintenance efforts involved.  Here is another way to make your certifcate trusted if you have administrator privileges on client workstations.
  1. Click on "Continue to this website (Not recommended).
  2. In the login screen, click on the "Certificate Error", next to URL bar and click the "View Certificate" link.
  3. In the Certificate Windows, click on "install certificate" to run Certificate Import wizard. 
  4. Click Next and when prompted to choose the Certificate Store location, choose "Place all certificates in the following store" option.
  5. Click on Browse button and choose "Trusted Root Certification Authorities" store and click ok.
  6. Finish the wizard and confirm your selection.   
  7. Restart the browser and next time you access the web page SSL error should be gone.
The downside of the above solution is it is browser & client specific and you will have to do this on each one of your clients (and browsers).  

Hope this helps.

Monday, April 9, 2012

Overview of TEPS/e Administration

Recently there was a question in the mailing list asking if there is an eWAS server supplied with Tivoli Enterprise Portal Server. The answer to the question is Yes and this article addresses the purpose of the eWAS server in TEPS.

The ITM component that utilizes the embedded eWAS server is called TEPS/e Administration console.  The console comes disabled by default and it can be enabled from Manage Tivoli Monitoring Services.

Why would you need the TEPS/e Administration console?   The console is mainly used for LDAP integration when Portal Server Authentication is used.  When you configure TEPS and provide LDAP information (such as LDAP Bind information, hostname, LDAP search string, etc),  the eWAS server stores the information and acts as the AD integration point for ITM.   If you want to view the configuration information or configure for LDAP servers other than Microsoft Active Directory & IBM Directory Server, you will need to use the TEPS/e Administration Server.

By default, the eWAS server is listening on port 15205.  You can access the TEPS/e Administration console by using the following link.

http://teps:15205/ibm/console

The userid for the Admin Console is wasadmin and the password can be set from Manage Tivoli Monitoring Services under TEPS/e Administration. Hope this helps.