Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "COSMOS TEST i13"

(COSMOS Command Line Client)
(COSMOS Web User Interface)
Line 27: Line 27:
 
== Running COSMOS Test Web Application ==
 
== Running COSMOS Test Web Application ==
 
*Now open FireFox 2.0  or IE 6+ and type http://localhost:8080/COSMOSUITests/?page=tests.  You should see the COSMOS UI Test Page.  This page provides several configured test pages that tests widgets and various data visualization components.  One can click on a link to view the various widgets used in the COSMOS UI.  Testers would visually verify whether the widgets are rendered and behave correctly.
 
*Now open FireFox 2.0  or IE 6+ and type http://localhost:8080/COSMOSUITests/?page=tests.  You should see the COSMOS UI Test Page.  This page provides several configured test pages that tests widgets and various data visualization components.  One can click on a link to view the various widgets used in the COSMOS UI.  Testers would visually verify whether the widgets are rendered and behave correctly.
 
== COSMOS Web User Interface ==
 
 
Once you have started the COSMOS components as described above, point your web browser to http://localhost:8080/COSMOSUI/?page=cosmos
 
=== Layout of the User Interface ===
 
The initial page of the COSMOS Web User Interface displays three main panes.  The left pane shows a list of data managers that are registered with the broker.  The top right pane shows the details view that is initially blank.  The bottom right pane shows a properties view that is initially blank. 
 
 
=== Data Managers View ===
 
The pane on the left is the "Data Managers" view.  It lists all data managers registered at the broker.  There are initially six data managers that are registered with the broker. 
 
* A Statistical Data Manager that displays reports on some runtime statistics ("StatDataManager")
 
* A Logging Data Manager that displays reports on log files based on the Common Based Event format. ("LoggingDataManager")
 
* An Example Federating CMDB ("Sample Repository with Registration")
 
* An Example MDR that contains information related to students and teachers ("Sample Repository with Query")
 
* An Asset Repository that contains asset information that is modelled using the Service Modeling Language (SML) ("Resource Repository")
 
* An MDR for making queries on storage management data from Aperi using JDBC ("AperiMdr")
 
 
The end user can select a particular data manager to display properties associated with the data manager.  The properties are shown in the bottom right pane in the Properties view.
 
 
=== Security Properties ===
 
For all data managers registered at the broker, COSMOSUI provides a way to set security information with the help of properties dialog window.
 
 
* Select any Data Manager, say "Sample Repository with Query"
 
* On right click it shows popup menu with option as "Properties...",Click on it
 
* It then displays properties dialog window and enables user to enter Security information data
 
* Enter Username,Password and Soap Version details and click on Ok
 
* Again do a right click and select "Properties..." it will retrieve the saved data and allows user to modify it
 
 
=== Creating Query Folder ===
 
COSMOS UI supports creation of customer query folders for all MDR's and it can be created with the following steps:
 
 
* Right click the "Sample Repository with Query" node in the Data Managers pane.  Select the "New Folder..." menu option.
 
* This will bring up a dialog box.  Enter "MyFolder" in the text box and click "Ok".
 
* A node containing a folder icon should show up under the "Sample Repository with Query" node.
 
 
COSMOS UI also supports renaming of existing folder by doing right click on any existing folder and selecting "Rename" option.
 
 
=== Creating Named Query ===
 
COSMOS UI supports creation of named Queries with the option of "Query Name:" under CMDBf Submit Query dialog window.
 
 
COSMOS UI also supports renaming of existing queries by right clicking on any existing CMDBf query and selecting "Rename Query" option.
 
 
=== Saving Queries ===
 
COSMOS UI provides option to save user defined queries with the help of Configuration parameters -RESPONSE_HISTORY_LIMIT and QUERY_SAVE.
 
 
Steps to Configure and enable option for saving Queries:
 
* Edit apache-tomcat-5.5.26\webapps\COSMOSUI\config\configuration.properties
 
* Set RESPONSE_HISTORY_LIMIT=5 and QUERY_SAVE= true as shown below:
 
<pre>
 
# @name Response History Limit
 
# @description The graph response history limit size.  (-1 signifies unlimited)
 
RESPONSE_HISTORY_LIMIT=5
 
# @name Auto Save Queries
 
# @description A flag that determines if the queries should be automatically saved on the server machine.
 
QUERY_SAVE=true
 
</pre>
 
* Restart tomcat.
 
* Now create some named query on any of the MDR using Submit Query option.
 
* Open a new browser window and open COSMOSUI http://localhost:8080/COSMOSUI/
 
* The queries that were created and renamed should show up in the view.
 
* Also, query execution histories can be seen under "Response History..." option.
 
 
=== Query Properties ===
 
COSMOS UI provides an option to view CMDBf query properties under botton right section of page as "Query Document".
 
 
For Example,
 
* Expand the "Sample Repository with Query" node and click on the "Get All Students" node.
 
* The bottom right section of the page should show the following query document:
 
<pre>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<!-- Copyright (c) 2007 IBM Corporation. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM - Initial API and implementation-->
 
<!-- This query selects all students taught by the teacher with -->
 
<!-- the id: "staff01" -->
 
<s:query xmlns:s="http://cmdbf.org/schema/1-0-0/datamodel">
 
<s:itemTemplate id="teacher">
 
<s:instanceIdConstraint>
 
<s:instanceId>
 
<s:mdrId>org.eclipse.cosmos.samples.cmdbf.XMLRepository
 
</s:mdrId>
 
<s:localId>staff02
 
</s:localId>
 
</s:instanceId>
 
</s:instanceIdConstraint>
 
</s:itemTemplate>
 
<s:itemTemplate id="students">
 
<s:recordConstraint>
 
<s:recordType namespace="" localName="student"/>
 
</s:recordConstraint>
 
</s:itemTemplate>
 
<s:relationshipTemplate id="reference">
 
<s:sourceTemplate ref="teacher"/>
 
<s:targetTemplate ref="students"/>
 
</s:relationshipTemplate>
 
</s:query>
 
</pre>
 
 
=== Graph Response Viewer ===
 
COSMOS UI provides CMDBf Graph Response Viewer to view the results of CMDBf query. Results can be viewed in two ways:
 
* Tabular View
 
* Hierarchical View
 
 
Steps to view the result of CMDBf Query :
 
* For Tabular View, right click on CMDBf query,select Open With >> Tabular View
 
* For Hierarchical View,right click on CMDBf query,select Open With >> Hierarchical View
 
 
=== Statistical Data Manager ===
 
Use the COSMOS UI to query the Statistical data manager for a list of data collection sessions and generate reports on statistical observation that have been previously collected and saved within a database.
 
 
==== Displaying statistical data sources ====
 
* Expand the "StatDataManager" node in the Data Managers pane to show a list of recorded statistical data sessions.  Note that two data collection sessions have been recorded and saved.  The report of the statistical data is displayed in the details view.
 
* By selecting a data collection session under the StatDataManager node in the Data Managers pane, the properties of the selected data collection session is displayed in the Properties pane. 
 
 
==== Generating the statistical data reports ====
 
* Generate a report on the collected data by right-clicking the session they want to generate the report on.  A popup menu with a "Statistical Report" will be displayed.  Click on the "Statistical Report" option to generate the statistical report, that will be displayed in the "Details" pane.
 
 
=== Logging Data Manager ===
 
The CBE data manager manages a set of log files that have been previously collected.  The user can use the COSMOS UI to query the CBE data manager for a list of log files and generate reports on the log data.
 
 
The user can expand the "LoggingDataManager" node in the left pane to show a list of log files managed by the data manager.  When a log file is selected, the properties view shows the properties of the log file.
 
 
To generate a report on a log file, right click on the node under "LoggingDataManager" that corresponds to the log file.  A menu option will be displayed with the "Top 10 Log Report" option.  Select the "Top 10 Log Report" menu option and the report will be generated in the "Details" pane in the top right pane.
 
 
=== SML MDR (Resource Repository) ===
 
The SML MDR manages a repository that contains asset data that is modeled using the Service Modeling Language.  The repository contains asset information about a rack unit that has a set of mounted CPUs connected by cables and switches.  Users can construct a CMDBf query to acquire asset information on these resources.
 
 
To submit a query on the SML Repository, right click on "Resource Repository" from the "Data Managers" view.  A pop-up menu should be shown with a "Submit Query..." and "Submit Query as Text" options.  Click on any of the option to bring up a dialog box that will allow the user to enter a CMDBf query.  You may submit any well-formed CMDBf queries here.  For illustration purpose, submit the following CMDBf query, which will get information on a cable. 
 
 
<pre source="xml">
 
<?xml version="1.0" encoding="UTF-8"?>
 
<s:query xmlns:s="http://cmdbf.org/schema/1-0-0/datamodel">
 
<s:itemTemplate id="cableTemplate">
 
<s:instanceIdConstraint>
 
<s:instanceId>
 
<s:mdrId>http://cosmos.org/rm/sml/repository</s:mdrId>
 
<s:localId>Cable1.xml</s:localId>
 
</s:instanceId>
 
</s:instanceIdConstraint>
 
</s:itemTemplate>
 
</s:query>
 
</pre>
 
 
Enter the above CMDBf query in the dialog box and click the "Submit" button.  The graph response viewer should be shown in the details pane.
 
 
You should see one row in the table under the "Node and Edges" section.  Click on the cell under the "Source" column.  The Records section of the view will show information about the cable.  Note that the asset information is displayed as a SML structure as follows:
 
<pre>
 
<s:cable name="0001" xmlns:conn="connection" xmlns:ft="facetModel"    xmlns:it="http://www.cosmos.rm/dataCenter/core"   
 
xmlns:pm="propertyModel" xmlns:s="cable"    xmlns:sml="http://schemas.serviceml.org/sml/2007/02" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
 
<it:facets>        <it:facet>            <it:properties>                <pm:connector format="RJ45"/>            </it:properties>        </it:facet>       
 
<it:facet>            <ft:location>                <it:properties>                    <ft:position coordinate="in use"/>                </it:properties>           
 
</ft:location>        </it:facet>        <it:facet>            <it:properties>                <conn:connection>                   
 
<conn:source sml:ref="true">                        <sml:uri>
 
/DataCenterSample/hardware/networking/Switch1.xml#xpointer(/switch[@name="switch1"]/facets/facet/ports[@input="true"]/port[@number="0"])
 
</sml:uri>                    </conn:source>                    <conn:target sml:ref="true">                        <sml:uri>
 
/DataCenterSample/hardware/networking/Router1.xml#xpointer(/router[@name="router1"]/facets/facet/ports[@input="false"]/port[@number="1"])                    
 
</sml:uri>                </conn:target>                </conn:connection>            </it:properties>        </it:facet>   
 
</it:facets></s:cable>
 
</pre>
 
 
=== Example MDR (Sample Repository with Query) ===
 
The Example MDR manages a repository containing information on a set of students and teachers.  The repository contains information such as the student's name, teacher's name and which students are taught by a particular teacher.  Users can construct a CMDBf query to acquire the student or teacher information.
 
==== To submit a query ====
 
To submit a query on the Example MDR right click the "Sample Repository with Query" from the "Data Manager" view.  A pop-up menu should be shown with a "Submit Query..." option. Click on the menu option.  This will bring up a query builder dialog box that will allow the user to construct a CMDBf query.  Let us build the following CMDBf query using the query builder.  This query will get a list of students.
 
<pre>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<s:query xmlns:s="http://cmdbf.org/schema/1-0-0/datamodel">
 
<s:itemTemplate id="items">
 
<s:recordConstraint>
 
<s:recordType namespace="" localName="student"/>
 
</s:recordConstraint>
 
</s:itemTemplate>
 
</s:query>
 
</pre>
 
 
The query builder is composed of three panes.  The top level pane allows the user to create itemTemplate and relationshipTemplate nodes.  Right click the "query" node in the top pane and select 'Add Item'.
 
 
This will bring up a second dialog box that allows the user to enter the template id.  Enter the word 'items' in the text box.
 
 
Notice that we constructed the following 'itemTemplate' node in the CMDBf query as illustrated in the XML shown in the previous step. 
 
<pre><s:itemTemplate id="items"></pre>
 
 
Select the 'itemTemplate' node in the bottom left pane to view the properties on the element.  If we look at the XML structure of the CMDBf query we can notice that the query contains a 'recordContraint' element under the itemTemplate.  Therefore, we need to add a recordConstraint element under the 'itemTemplate' node by right clicking the 'itemTemplate' node and selecting the 'add recordConstraint' menu option.
 
 
Next we need to add a 'recordType' element under the 'recordConstraint' node.  This time we right click the 'recordConstraint' node in the bottom left pane and select the 'add recordType' menu option.
 
 
Now we need to set the localName on the recordType element to 'student'.  Click on the cell next to the 'localName' cell in the bottom right table.  This will allow you to edit the attribute value.  Enter the word 'student' in the text box and click enter.
 
 
At this point we constructed the CMDBf query and we are ready to submit the query to the Example MDR.  We can click the "Preview XML" button to look at the CMDBf query we constructed. 
 
 
Click the 'Submit' button.
 
 
The graph response viewer should be shown in the details pane in the top right pane as shown below.  The view will show a list of three students.
 
 
Click on the "Source" cell in the "Nodes and Edges" section of the view.  The Record section of the view should show the information on a particular student.  Note that the student information is displayed as a XML structure as follows:
 
<pre>
 
<student>
 
  <identity firstName="Mike" id="03" lastName="Lee"/>
 
</student>
 
</pre>
 
 
COSMOS UI also provides additional option to submit query as textual data using "Submit Query as Text" option
 
 
=== Using the Registration Example CMDBf (Sample Repository with Registration) ===
 
 
==== To register configuration items with the test Federating CMDB ====
 
 
* start the COSMOS UI
 
* right-click on the "Sample Repository with Registration" Data Manager
 
* select "Register Configuration Items..." on the popup menu
 
* In the "Register MDR Configuration Items" window, select the "Example MDR"
 
* Press the "Register" button
 
* A list of configuration items will be displayed showing status results
 
 
==== To Deregister configuration items from the test Federating CMDB ====
 
 
* start the COSMOS UI
 
* right-click on the "Sample Repository with Registration" Data Manager
 
* select "Deregister Configuration Items..." on the popup menu
 
* In the "Deregister MDR Configuration Items" window, select the "Example MDR"
 
* Press the "Deregister" button
 
* A list of configuration items will be displayed showing status results
 
 
 
=== Using the Aperi MDR (Storage Repository) ===
 
Before you can use the Aperi MDR, make sure that you have started the Aperi Derby database. For example: type "start derby" from the <Aperi install directory>\db directory.
 
 
The Aperi MDR contains the following configuration items:
 
* StoragePool
 
* StorageSystem
 
* StorageVolume
 
* Disk
 
* HostPort
 
 
The Aperi MDR contains the following relationships:
 
* StorageSystemStoragePools (Storage Pools associated with a Storage System)
 
* StoragePoolStorageVolumes (Storage Volumes associated with a Storage Pool)
 
* StorageSystemStorageVolumes (Storage Volumes associated with a Storage System)
 
* StorageSystemDisks (Disks associated with a Storage System)
 
* StorageSystemHostPorts (Host Ports associated with a Storage System)
 
 
 
 
==== To submit a query ====
 
There are several ways to submit a query to the Aperi MDR:
 
* Use a web service client application
 
* Write a COSMOS client application (refer to the COSMOS User Guide for details)
 
* Use the COSMOS UI Query Builder to construct and execute the query
 
* Use the COSMOS UI "Submit Query as Text" option to execute the query
 
* Use the COSMOS client application to execute a query from a file
 
 
==== Query usage and samples ====
 
 
The Aperi MDR supports instance id constraints and record constraints (with record types and/or property value constraints).
 
 
The configuration item name is specified as the localName attribute of a recordType element in a recordConstraint.
 
The property name is specified as the localName attribute of a propertyValue element in a recordConstraint. 
 
The relationship name is specified as the localName attribute of a recordType element in a recordConstraint.
 
 
The queryService metadata (in the WSDL) lists the supported property value operators in the query capabilities.
 
 
 
For example, to query all the StorageSystem configuration items:
 
 
<pre>
 
<?xml version="1.0" encoding="UTF-8" ?>
 
<s:query xmlns:s="http://cmdbf.org/schema/1-0-0/datamodel">
 
  <s:itemTemplate id="items" suppressFromResult="false">
 
      <s:recordConstraint>
 
        <s:recordType namespace="http://schemas.aperimdr.org/schema/AperiMDR" localName="StorageSystem" />
 
      </s:recordConstraint>
 
  </s:itemTemplate>
 
</s:query>
 
</pre> 
 
 
 
You can further constrain the query using the graphQuery operators of a propertyValue element of a recordConstraint.
 
 
For example, to query all the StorageSystem configuration items with a display_name value beginning with "DS", use the "like" operator:
 
 
<pre>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<s:query xmlns:s="http://cmdbf.org/schema/1-0-0/datamodel">
 
  <s:itemTemplate id="items" suppressFromResult="false" >
 
      <s:recordConstraint >
 
        <s:recordType namespace="http://schemas.aperimdr.org/schema/AperiMDR" localName="StorageSystem" >
 
        </s:recordType>
 
        <s:propertyValue namespace="StorageSystem" localName="display_name" >
 
            <s:like negate="false" caseSensitive="false" >DS%</s:like >
 
        </s:propertyValue>
 
      </s:recordConstraint>
 
  </s:itemTemplate>
 
</s:query></pre> 
 
 
 
You can also query for an particular instance of a configuration item by specifying the localId of an instanceId element in an instanceIdConstraint.
 
 
For example, to query for the StorageSystem configuration item with localId "StorageSystem=2307":
 
 
<pre>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<s:query xmlns:s="http://cmdbf.org/schema/1-0-0/datamodel">
 
  <s:itemTemplate id="items" suppressFromResult="false" >
 
      <s:instanceIdConstraint >
 
        <s:instanceId>
 
            <s:mdrId>AperiMDRID</s:mdrId>       
 
    <s:localId>StorageSystem=2307</s:localId>
 
        </s:instanceId>
 
      </s:instanceIdConstraint>
 
  </s:itemTemplate>
 
</s:query>
 
</pre> 
 
 
 
You can query for a specific relationship between two configuration items by specifying the relationship template and two item templates with constraints.
 
 
For example, to query the relationship between the StorageSystem with Subsystem_ID equal to "2307" and the StoragePool instance of "StoragePool=2660":
 
 
<pre>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<s:query xmlns:s="http://cmdbf.org/schema/1-0-0/datamodel">
 
  <s:itemTemplate id="subsys" suppressFromResult="false" >
 
      <s:recordConstraint >
 
        <s:recordType namespace="http://schemas.aperimdr.org/schema/AperiMDR" localName="StorageSystem" >
 
        </s:recordType>
 
        <s:propertyValue namespace="StorageSystem" localName="Subsystem_ID" >
 
            <s:equal negate="false" caseSensitive="false" >2307</s:equal >
 
        </s:propertyValue>
 
      </s:recordConstraint>
 
  </s:itemTemplate>
 
  <s:itemTemplate id="pool" suppressFromResult="false" >
 
      <s:recordConstraint >
 
        <s:recordType namespace="http://schemas.aperimdr.org/schema/AperiMDR" localName="StoragePool" >
 
        </s:recordType>
 
      </s:recordConstraint>
 
      <s:instanceIdConstraint >
 
        <s:instanceId>
 
            <s:mdrId>AperiMDRID</s:mdrId>       
 
    <s:localId>StoragePool=2660</s:localId>
 
        </s:instanceId>
 
      </s:instanceIdConstraint>
 
  </s:itemTemplate>
 
  <s:relationshipTemplate id="hasPool" suppressFromResult="false" >
 
      <s:sourceTemplate ref="subsys" minimum="0" maximum="0" >
 
      </s:sourceTemplate>
 
      <s:targetTemplate ref="pool" minimum="0" maximum="0" >
 
      </s:targetTemplate>
 
      <s:recordConstraint >
 
        <s:recordType namespace="http://schemas.aperimdr.org/schema/AperiMDR" localName="StorageSystemStoragePools" >
 
        </s:recordType>
 
      </s:recordConstraint>
 
  </s:relationshipTemplate>
 
</s:query>
 
</pre> 
 
 
 
 
 
 
[[Category: COSMOS]]
 

Revision as of 13:25, 14 August 2008

This page provides instructions on how to install and run the COSMOS demo for i12.

Objective of the Demo

The COSMOS Demo illustrates the main features of COSMOS.

Installation

Download COSMOS Test Web Application and Prerequisites

This section provides instructions for installing and running the demo program that is provided in the COSMOS i13 build.

  1. Install Tomcat 5.5.26. The directory where the Tomcat server is installed will be referred to as the <tomcat_install_dir> in this document.
  2. Download Axis2 war file for Tomcat from this page: http://ws.apache.org/axis2/download/1_3/download.cgi. Download the zip file for "WAR (Web Archive) Distribution".
  3. Download DOJO.
  4. From the COSMOS download page, click on the link of the latest candidate build for i13. Download the zip file under the "Data Reporting Web Application" section.

Installing COSMOS Test Web application

  1. Copy the "COSMOSUITests" directory to the tomcat server webapps directory
  2. Next copy dojo 1.1 under apache-tomcat-5.5.26\webapps\COSMOSUITests

The resulting file structure should be as follows

apache-tomcat-5.5.26\webapps\COSMOSUITests
apache-tomcat-5.5.26\webapps\COSMOSUITests\dojo-release-1.1.0

Running COSMOS Test Web Application

  • Now open FireFox 2.0 or IE 6+ and type http://localhost:8080/COSMOSUITests/?page=tests. You should see the COSMOS UI Test Page. This page provides several configured test pages that tests widgets and various data visualization components. One can click on a link to view the various widgets used in the COSMOS UI. Testers would visually verify whether the widgets are rendered and behave correctly.

Back to the top