Wednesday, December 9, 2009

How can we integrate with HP CMDB - part 3

Here are some code to interact with HP SM7 Web Services. It uses an AXIS library generated from the WSDL file, available at iTunes or the following link: HP SM7 Axis Library.

ci = new Packages.com.hp.schemas.SM._7.Common.StringType (work.getString ("NAME"));

keys = new Packages.com.hp.schemas.SM._7.DeviceKeysType ();
keys.setConfigurationItem (ci);

instance = new Packages.com.hp.schemas.SM._7.DeviceInstanceType ();
status = new Packages.com.hp.schemas.SM._7.Common.StringType ("In use");
instance.setStatus (status);
computer = new Packages.com.hp.schemas.SM._7.Common.StringType ("computer");
instance.setConfigurationItemType(computer);
application = new Packages.com.hp.schemas.SM._7.Common.StringType ("application");
instance.setAssignmentGroup (application);

messageType = new Packages.com.hp.schemas.SM._7.Common.MessageType();
messageTypes = [messageType];

type = new Packages.com.hp.schemas.SM._7.DeviceModelType (keys, instance, messageTypes, "query");
booleanf = new java.lang.Boolean (false);
booleant = new java.lang.Boolean (true);

request = new Packages.com.hp.schemas.SM._7.CreateDeviceRequest (type, booleanf, booleanf, booleant);

task.logmsg ("request: " + request);

locator = new Packages.com.hp.schemas.SM._7.Device_ServiceLocator ();

device = locator.getDevice ();

device.setUsername ("falcon");

response = device.createDevice (request);

task.logmsg ("response: " + response + " message: " + response.getMessage());
messages = response.getMessages ();
for (message in messages) {
    task.logmsg ("messages: " + message);
}

Wednesday, December 2, 2009

How can we integrate with HP CMDB? - Part 2

 Nothing like having the opportunity to touch an HP Service Management 7 installation and see first hand what's possible and what's not.

The bottom line is that, like any 'modern' application, HP SM7 makes available Web Service for interacting with the module, like Change Management and Configuration Items.

So, forget what I said before, because it's possible to load data directly into HP SM7 using the Web Service interface.

I didn't find a way to reconcile the data coming from multiple data sources, but at least the parable of not being able to load data into HP SM7 is not true.

Thursday, November 19, 2009

How can we integrate with HP CMDB?

HP CMDB (HP CMDB link) is HP's solution for the Configuration Management System (CMS).It's a re-brand of the Mercury uCMDB product. As with any CMDB, it has the ability to import or federate data.

Although not clearly stated, it seems that the only provider of imported data is HP Discovery and Dependency Manager (HP DDM), another Mercury product.

So the only remaining alternative is to federate data, which represents a real compelling solution, as it doesn't require to ETL (extract, transform and load) the data.

The issue arrives when multiple data sources (including HP DDM) are referring to the same resource. Although not clearly stated, HP CMDB doesn't seem to provide a way to reconcile the data, but it defers this job to HP SM7 (HP SM7), another suite of products that can consume HP CMDB data.

Bottom line: although not state clearly, there seems to be no way to load data into HP CMDB, neither there is a way to reconcile federated data.

Hard to believe? Tell me if you know anything different...

Monday, November 16, 2009

How to delete all CCMDB Authorized CI classification

Here is the script to delete all CCMDB Authorized CI classification:

delete from select classstructure where classstructureid in (select classstructureid from classusewith where objectname = 'CI')

Wills, do it at your own risk.

Wednesday, September 30, 2009

How to make TPM 5.1.1 configure a Ubuntu machine properly

As you know, TPM 5.1.1 can deploy RedHat and SuSE. What about the popular distro Ubuntu? The answer is: the TPM 5.1.1 workflow, as the hostname is not properly changed in Ubuntu.

To fix that, you just have to add the following line to the script /opt/ibm/tivoli/tpm/repository/vmware-vi3-scripts/config_linux.sh:


#Password setup
echo "${rootpassword}" | passwd --stdin root


# EP start
echo ${hostname} > /etc/hostname


# EP end


# Shutdown
shutdown -h now

With that, TPM 5.1.1 can successfully define the hostname in Ubuntu.

Friday, September 25, 2009

Creating Extended Attributes with the TDI IdML Connector


As you know, the IdML Connector can be used to create (guess what...) an IdML!

The tags in the IdML comply to the Common Data Model, and when they are written to the XML file, they are preceded with the "cdm:".

TADDM has the concept of Extended Attribute. The question is: how to specify an extended attributes using the IDML Connector?

The answer is simple, Vince: In the Attribute Connector area, create an attribute whose name starts with "extattr:". The IDML Connector treats these attributes differently: it doesn't try to find a corresponding attribute in the Common Data Model, but simply copies them to the XML file.

Go, have fun with the IDML Connector!

Monday, April 27, 2009

Federation and TPAE

Introduction


This document describes how the Tivoli Process Automation Engine (TPAE) can be configured to use a federated data source.






Assumptions:


This document assumes that DB2 Enterprise Edition Server is being used as a backend database for the TPAE.

Configuration:


Run the following command to enable the federation in a DB2 instance:

DB2 update dbm cfg using FEDERATED YES


Scenario

Assume there is a DB2 database containing information about Computer System, to be federated with the Authorized CI space in the Change and Configuration Management Database (CCMDB). Here is the DB2 table definition:

COMPUTER_OWNER table





























Column Name


Column Type


Length

COMPUTER_OWNER_ID
INTEGER


COMPUTER_NAME


VARCHAR


50


OWNER


VARCHAR


50



with the following contents:

COMPUTER_OWNERID
COMPUTER_NAME
OWNER
16
bush.my.com
Dan Quayle
18
bushw.my.com
Dick Chenney
14
carter.my.com
Walter Mondale
17
clinton.my.comAl Gore
5
coolidge.my.com
Charles Dawes
9
eisenhower.my.comRichard Nixon
13
ford.my.comNelson Rockfeller
7
froosevelt.my.comJohn Garner
4
harding.my.comCalvin Colidge
6
hoover.my.comCharles Curtis
11
johnson.my.com
Hubert Humphrey
10
kennedy.my.comLyndon Johnson
12
nixon.my.comSpiro Agnew
19
obama.my.com
Joe Biden
15
reagan.my.comGeorge Bush
2
taft.my.com
James Sherman
1
troosevelt.my.com
Charles Fairbanks
8
truman.my.com
Alben Barkley
3
wilson.my.comThomas Marshall




Configuring TPAE

Creating New Database Object


Although the COMPUTER_OWNER table will be federated from an external database, in order to use this table in TPAE, it needs to be defined using the Database Configuration application (under System Configuration -> Platform Configuration).

  • In the Database Configuration application, click New Object:



  • Type COMPUTER_OWNER in the Object field, and Computer Owner in the Description:


  • In the Attributes tab, add the attributes COMPUTER_NAME and OWNER and delete the attribute DESCRIPTION:



  • Save the new Database Object.

Applying the Database Change


  • Make a backup of the TPAE database
  • Go back to the List tab
  • In the Select Action pull down menu, choose Manage Admin Mode
  • Click Turn Admin Mode ON

  • Click the Refresh Status button until the Admin Mode is set to ON:


  • Close the Turn Admin Mode ON dialog
  • In the Select Action pull down menu, click Apply Configuration Changes
  • Select the Do you have a current backup? checkbox
  • Click the Start Configuring the Database button:

  • Click the Refresh Status button until the End ConfigDB message is displayed:


  • Close the Structural Database Configuration dialog.

Creating the Relationship

  • Select the CI Object:

  • Click the Relationships tab
  • Add the new Relationship, specifying the following information:
    • Relationship: COMPUTER_OWNER
    • Child Object: COMPUTER_OWNER
    • Where Clause: computer_name = :cinum



  • Save the new Relationship
  • Go back to the List tab

Modifying TPAE GUI to show the federated information


In this step, we'll add the Computer Owner to the TPAE GUI.

  • Go to Application Designed (under System Configuration -> Platform Configuration).
  • Select the CI application:


  • Click the Configuration Item tab
  • Select the Organization attribute:


  • Right-click the CI Location attribute and click Copy
  • Click the section containing the CI Location attribute:
  • Right click the section and select Paste. A copy of the Organization attribute is put in the section.
  • Right-click the new Organization field and select Properties
  • In the Attribute field, type COMPUTER_OWNER.OWNER
  • Define a value in the Label field:


  • Save your work in the Application Designer



Configuring Database Nickname


So far, the database still contains a table (created through the Database Configuration application). We'll redefine it as a nickname to the table in another database.

Registering the Federated Database in the TPAE Database Server


If the federated database is in another database instance, the database needs to be registered in the TPAE database server.
  • Run the following command to register the node:
    db2 catalog tcpip node federate remote <remote_db_server> server <remote_db_port>
  • Run the following command to register the instance:
    db2 catalog db <remote_db> at node federate

Creating the Database Nickname


  • In the DB2 Control Center, expand the options under MAXDB71 and select Tables
  • The application shows all tables. Right-click the table COMPUTER_OWNER and select Drop

  • In the left side, under MAXDB71, right-click Nicknames and select Create..
  • In the Introduction screen, click Next
  • In the Specify the data source and the wrapper, select DB2.
  • Click the Create... button in the Wrappers area.
  • Click OK in the Create Wrapper dialog.
  • Click Next.
  • In the Specify the server definition for the data source, click the Create... button
  • In the Create Server Definitions dialog, click the Discover.. button
  • Select the federated database and define the Type and Version:
  • Click Properties...
  • In the Server Definition Properties dialog, type the User ID and Password:
  • Click OK to close the Server Definition Properties
  • Click OK to close the Create Server Definitions
  • In the Create Nicknames dialog, click Next twice
  • In the Define Nicknames windows, click Discover...
  • In the Discover dialog, filter by Schema name
  • Select the table and click Properties...
  • In the Nickname schema, select MAXIMO and click OK
  • Click Finish to close the Create Nicknames dialog.


Create User Mappings

  • Expand the Federated Database Objects
  • Expand DRDA
  • Expand Server Definitions
  • Expand the Server name
  • Select User Mappings

  • Click Create New User Mapping
  • In the Create User Mapping dialog, select the MAXIMO user:
  • On the Settings tab, specify the remote user and password and click OK:

Viewing the Federated Data


After the nickname has being configured, the federated data can be seen in the Authorized CI application: