Lab 1. It takes 9 months to...
Introduction to Discovery Library Adapter (DLA)
Objective
Create a simple DLA that reads some Computer System information and populates them in Tivoli Application Dependency Discovery Manager
|
Exercise 1.1 - Install Tivoli Directory Integrator (TDI)
- Go to IBM Extreme Leverage (Extreme Leverage URL)
- Search for Part Number CR70BML
- Download the product corresponding to your machine's architecture (this might take 1+ hours)
- Unzip the downloaded file
- Run the appropriate launchpad application
- Follow the options in the GUI to install TDI
Exercise 1.2 - Install TDI 6.1.1 FixPack 3
Exercise 1.3 - Download TADDM SDK
The IDML Connectors require some JAR files, shipped with TADDM:
- It's assumed the machine is running Windows
- Map the following directory \\<machine>\TDIClass, user: tdi, pwd: taddmtdi
- Download the file TADDM\sdk.zip
- Unzip the file in any directory in your machine
Exercise 1.4 - Install the IDML Connectors
- Go to the following URL: https://cs.opensource.ibm.com/frs/?group_id=2505
- Download the latest IdMLConnectors.zip
- Unzip the file above in any directory
- Follow the instructions on the file doc/ReleaseNotes.txt to install these Connectors in TDI
Exercise 1.5 - Create the data source
This exercise uses a simple spreadsheet with a list of Computers and their IP addresses
Exercise 1.6 - Create the AssemblyLine and Read from the CSV File
This exercise shows how to read the data from a CSV file and to create an IDML file.
- Open TDI Config Editor
- Create a new Configuration File (call it Lab1.xml, for example)
- Create a new Assembly Line (do you need a suggestion for name? what about MyFirstDLA?)
- Right-click Feed and select Add Connector component...
- Choose ibmdi.FileSystem, give it a name, select the mode an Iterator and click OK.
- In the Connector Configuration, specify the Path for the CSV file you created in Exercise 1.5
- Click the tab Parser
- Click the button Inherit from: [parent] at the bottom
- Select system:/Parsers/ibmdi.CSV
- Change the Field Separator to , (comma)
- Click the tab Input Map
- Click the button Connect to the data source
- Click the button Read the next entry
- Drag the attributes ip_address and machine to the Work Attribute area
Exercise 1.7 - Create the IDML file
Continuing the previous exercise, this exercise uses the data in the Work Entry to create an IDML file
- Right-click Flow and select Add Function Component...
- Select idml.OpenIDML, give it a name and click OK
- In the Configuration tab, fill the parameters:
- Application Code: a short name (usually 3 letters) for the source application
- Directory Name: an existing directory in your local machine
- Book Name: the value that will link the other Components to this file
- Manufacturer Name: any value
- Product Name: any value
- Hostname: any value
- Select the option Refresh
- Right-click Flow and select Add Connector component...
- Select idml.IDMLConfigurationItem, give it a name and click OK.
- In the Class Type, type cdm:sys.ComputerSystem
- In the Book name, specify the same value put in the OpenIDML
- Click the tab OutputMap
- Drag the work entry machine and rename as id
- Drag again the entry machine and rename as cdm:Signature
Exercise 1.8 - Run the Assembly Line
- Click the button Run AssemblyLine
- If everythings goes well, you should see an XML file in the directory specified in the OpenIDML
- Congratulations: you are a DLA expert!
Exercise 1.9 - Validate the IDML
It's possible to validate the generated IDML inside TDI. The validation performs a series of tests to ensure the IDML can be loaded into TADDM.
- Click the OpenIDML component
- Select the option Validate
- Run again the Assembly Line
Exercise 1.10 - Import the IDML into TADDM
If you have access to a TADDM server, feel free to use it to load your IDML there.
Otherwise, copy the IDML to the directory
\\<machine>\TDIClass\pub and notify the instructor to load the IDML (which needs to be done one at a time)
After the IDML has been loaded, open the TADDM Server and check for your Computer Systems
| Bonus question: why doesn't the Physical Topology show the new Computers ? |
Lab 2: There is a Creepy Data Monster under my bed!
Understanding the Common Data Model
Exercise 2.1 - Where is the CDM?
- Go to the directory where TADDM SDK was unzipped
- Go to directory sdk/doc/model
- Unzip the file CDMWebsite.zip
- With a browser, open the file sdk/doc/model/WebsiteFiles/misc/CDM.htm
Exercise 2.2 - Pop Quizz
Given the Naming Rules for a ComputerSystem, describe how many CIs TADDM will create for each snippet of IDML:
Rule
| Attributes
|
CSSignature
| Signature
|
CSProduct
| Manufacturer, Model, SerialNumber, NOT VMID
|
CSUUID
| SystemBoardUUID
|
PrimaryMACAddress
| PrimaryMACAddress
|
VMIDInHost
| HostSystem(virtualizes), VMID
|
ITMMSN
| ManagedSystemName
|
VMIDMMSN
| VMID, Manufacturer, Model, SerialNuber
|
1.
<cdm:sys.ComputerSystem id="comp1"><cdm:Name>johan</cdm:Name></cdm:sys.ComputerSystem>2.
<cdm:sys.ComputerSystem id="comp1">
<cdm:Signature>johan</cdm:Signature>
</cdm:sys.ComputerSystem>
3.
<cdm:sys.ComputerSystem id="comp1">
<cdm:Signature>johan</cdm:Signature>
<cdm:PrimaryMACAddress>1234567890</cdm:PrimaryMACAddress>
</cdm:sys.ComputerSystem>
4.
<cdm:sys.ComputerSystem id="comp1">
<cdm:Manufacturer>ibm</cdm:Manufacturer>
<cdm:Model>reallygood</cdm:Model>
</cdm:sys.ComputerSystem>
5.
<cdm:sys.ComputerSystem id="comp1">
<cdm:VMID>johan</cdm:VMID>
</cdm:sys.ComputerSystem>
6.
<cdm:sys.ComputerSystem id="comp1">
<cdm:Signature>johan</cdm:Signature>
</cdm:sys.ComputerSystem>
<cdm:sys.ComputerSystem id="comp2">
<cdm:Signature>eddie</cdm:Signature>
</cdm:sys.ComputerSystem>
7.
<cdm:sys.ComputerSystem id="comp1">
<cdm:Signature>johan</cdm:Signature>
<cdm:ManagedSystemName>MyMSN</cdm:ManagedSystemName>
</cdm:sys.ComputerSystem>
<cdm:sys.ComputerSystem id="comp2">
<cdm:Signature>eddie</cdm:Signature>
<cdm:ManagedSystemName>MyMSN</cdm:ManagedSystemName>
</cdm:sys.ComputerSystem>
8.
<cdm:sys.ComputerSystem id="comp1">
<cdm:Signature>johan</cdm:Signature>
</cdm:sys.ComputerSystem>
<cdm:sys.ComputerSystem id="comp2">
<cdm:Signature>eddie</cdm:Signature>
</cdm:sys.ComputerSystem>
<cdm:sys.ComputerSystem id="comp3">
<cdm:Signature>johan</cdm:Signature>
<cdm:ManagedSystemName>MyMSN</cdm:ManagedSystemName>
</cdm:sys.ComputerSystem>
<cdm:sys.ComputerSystem id="comp4">
<cdm:Signature>eddie</cdm:Signature>
<cdm:ManagedSystemName>MyMSN</cdm:ManagedSystemName>
</cdm:sys.ComputerSystem>
Lab 3: Never Leave a CI Alone
Creating Relationships
Exercise 3.1: Create IP Addresses
- Open the Assembly Line creating in Lab 1
- Right-click Flow and select Add Connector component...
- Select idml.IDMLConfigurationItem, give it a name and click OK
- In the Class Type, specify cdm:net.IpAddress
- In the Book name, specify the same value put in the OpenIDML
- Click the tab Output Map
- Drag the work entry ip_address to the Connector Attribute area and rename it as id
- Select the Connector Attribute id
- Change the Type to Expression
- Add the sufix _ia to the Expression, resulting in the following value: {work.ipaddress}_ia
- Drag the same work entry as cdm:DotNotation
| Bonus question: If you run the AL, will the IDML be valid? |
Exercise 3.2: Create the IP Interface
- Add the IDMLConfigurationItem Connector one more time to create the IpInterface (class cdm:net.IpInterface)
- Define the attribute id, specifying a suffix, as it was done in Exercise 3.1
| Question: If you run the AL, will the IDML be valid? |
Exercise 3.3: Associate the IpInterface with IpAddress
- Right-click Flow and click Add Connector component...
- Select idmlIDMLReln this time, give it a name and click OK
- In the Relationship Class Type, specify cdm:bindsTo
- Drag the work entry ip_address to the Connector Attribute area and rename it as source
- Select the attribute source and change the type to Expression
- Specify the same suffix defined in the previous exercise
- Drag the work entry ip_address again and rename it as target
- Select the attribute target and change the type to Expression
- Specify the same suffix defined in Exercise 3.1
Exercise 3.4: Associate the IpInterface with ComputerSystem
- Create another IDMLReln, specifying
- Relationship Class Type: cdm:contains
- source: the work entry machine (which represents the ComputerSystem id)
- target: the IpInterface id (including the suffix defined in Exercise 3.2)
- Ensure the validation works this time!
Exercise 3.5: Loading the IDML into TADDM
Follow the same procedure as in Exercise 1.10 to have the IDML loaded.
Lab 4: If every IBMer were a Computer, how'd bring them to TADDM?
Exploring Delta
Exercise 4.1: Enable Delta
- Click the Assembly Line Feed
- Go to the tab Delta
- Select Enable Delta
- Define machine as the Unique Attribute Name
Exercise 4.2: Change the IDML to create
The IDML file being created is defining the Refresh option, which means the file specifies all the components associated with the Management Software System.
- Click the OpenIDML component
- Uncheck the option Refresh
Exercise 4.3: Add more entries to the data source
- Open the CSV file with an editor
- Add a few more lines
- Run the Assembly Line again and check that generated IDML only contains the new entries
- Run the Assembly Line again and check it generates an empty IDML
Exercise 5: Breaking the TADDM Wall
Using the TADDM Connector
Objective
Extract data from TADDM and export as a text file
|
Exercise 5.1: Install TADDM Connector
- Go to the following URL: https://cs.opensource.ibm.com/frs/?group_id=2530
- Download the latest version
- Unzip the file in any directory in your machine
- Follow the instructions in the file doc/ReleaseNotes.txt to install these Connectors in TDI. Note that Installation step 3) was already done as part of the IDML Connector.
- Pay particular attention to step 4) in the Instalation.
Exercise 5.2: Extract data from TADDM
- Create a new Assembly Line
- Right-click Feeds and click Add Connector component...
- Select ibmtaddm.TADDMConnector, give it a name, change the mode to Iterator and click OK.
- In the Configuration tab, fill the following information:
- Host Name: <machine>
- User name: administrator
- Password: collation
- CI Type: ComputerSystem (select from the drop-down list)
- TADDM SDK: specify the directory where sdk.zip was unzipped (for example, c:\TADDM\sdk)
- Click the tab Input Map
- Click Connect to the data source button
- Click the button Discover the schema of the data source
- Drag a few attributes to the Work Attribute area
Exercise 5.3: Export the data
- Add a FileSystem component to the AssemblyLine, to generate a CSV file with the attributes from TADDM
- Run the AssemblyLine and check the resulting file
Exercise 5.4: Extract relationships
By default, the TADDM Connector retrieves only the direct attributes of a certain CI type. If you want to get the attributes for the nested CIs, follow these steps
- In the Configuration of the TADDM Connector, change the Search Depth to 2
- In the Input Map tab, click the button Connect to the data source
- Click the button Read the next entry. You'll the attributes from the nested CI are listed.
Exercise 5.5: Be lazy!
TADDM doesn't provide a "GetNext" method, as a JDBC interface. Instead, when TDI retrieves the first record, TADDM API returns the entire array of results, and the Connector provides one at a time. Hence, if the number of results is big (especially when Depth greater than 1 is specified), the TADDM Connector accumulates the entire result in memory (ouch!).
To alleviate this problem, the Connector provides a Lazy mode, where just the GUIDs for matching record is stored, then the Connector calls the API again for each record. Although with a small database, the behavior is not perceived, the difference is huge with a big database.
- Check the Lazy Mode option and re-run the Assembly Line
Exercise 5.6: Lookup Mode
TADDM Connector also supports the Lookup Mode. To allow you to go home before Friday evening, no exercise is provided for the Lookup Mode.
Lab 6: Who's Afraid of IDML?
Creating CIs without an IDML
Objective
Populate TADDM directly through its API
|
Exercise 6.1: Define the data source
- Duplicate the Assembly Line created in Exercise 1
- Delete all the Components in the Flow area
- Disable the Delta feature for now
Exercise 6.2: Create CI
- Right-click Flow, click Add Connector component...
- Select ibmtaddm.TADDMConnector, give it a name, select Mode as AddOnly and click OK
- Fill the information in the Configuration tab, specifying ComputerSystem and the CI Type
- Drag the work entry machine to the Connector Attribute area and rename as signature
Exercise 6.3: Create Relationship
- There is a way to create relationship using the TADDMConnector. For now, just trust me...
Lab 7: BS Talk
Creating Business Applications
Objective
Create a Business Application containing the CI you loaded in Lab 1
|
Exercise 7.1: Extract from TADDM
- Duplicate the Assembly Line created in Lab 5
- Delete the FileSystem Connector
- In the Configuration of the TADDMConnector, specify an MQL Select query to retrieve only the GUID of the ComputerSystems you created. Tip the operator contains the specify the unique domain you specified in the CSV file.
- Drag the attribute guid to the Connector Attribute area
Exercise 7.2: Associate with a Business Application
- Right-click flow and select Add Connector component...
- Select ibmtaddm.BusinessAssociatorConnector, give it a name and click OK
- Fill the information in the Configuration tab
- Go to the OutputMap tab
- Define an attribute called Application, and specify a value (using Type Expression)
- Define an attribute named FunctionalGroup and specify a value.
- Drag the guid work entry and rename it as GUID
Exercise 7.3: Run the Assembly Line
- Run the Assembly Line and check the result in the TADDM Product Console
Lab 8: I can ride a bicycle with no hands
IDML Parser
Objective
Given an IDML file, filter the records before loading it
|
This lab will show how to use TDI to parse an IDML and create
another one with just a subset of the CIs. Assume the criteria to
filter the CI is that the machine name must contain the letter 'c'.
Exercise 8.1: Parse an IDML
- Create a new Assembly Line
- Right-click Feeds and click Add Connector component...
- Select ibmdi.FileSystem, give it a name, change the mode to Iterator and click OK.
- In the File Path, specify an IDML generated in exercise 1
- Select the Parser tab
- Click the Inherit from: [parent] button at the bottom
- Select system:/Parsers/idml.IDMLParser
- Click the Input Map tab
- Click the Connect to the Data Source button
- Click the Read next entry button
- Click again the Read next entry button
- Drag the cdm:Signature attribute to the Work Attribute area
Bonus question:
Why did you have to click the button Read next entry twice to see the cdm:Signature attribute ?
|
Exercise 8.2: Open the IDML file
- Similar to exercise 1.7, add the OpenIDML Function Component to your Assembly Line.
Exercise 8.3: Determine whether the entry matches the criteria
- Right-click Flow and select Add branch..
- Give it a name and click OK
- Add a condition to check whether the attribute cdm:Signature contains a certain pattern (letter 'c', for example)
Exercise 8.4: Output the matching CIs
- Right-click the branch and choose Add Connector component...
- Select idmlIDMLConfiguration, give it a name and click OK
- Fill the information in the Configuration tab, specifying cdm:sys.ComputerSystem as the Class Type
- Specify the required attributes for the CI type
Exercise 8.5: Run the Assembly Line
- Run the Assembly Line and ensure the validation succeeds!
Bonus Exercise:
Repeat this exercise with the IDML from Lab 3 in such a way that the IpInterface and IpAddress of a Computer matching the criteria are also copied to the resulting IDML
|
Lab 9: Now Forget about TDI!
Introducing DLA Development Tool
The DLADT is available at
https://cs.opensource.ibm.com/projects/dladt/. No exercise is provided here.