Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be 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 UG Running the Example"

(Content)
 
(11 intermediate revisions by 2 users not shown)
Line 21: Line 21:
 
== Outline ==
 
== Outline ==
  
 +
Please use the content from this wiki page: [[COSMOS_DEMO_i11]]
  
 
+
<!--
  
  
Line 31: Line 32:
 
==Installation==
 
==Installation==
 
===Download COSMOS Demo and Prerequisites ===
 
===Download COSMOS Demo and Prerequisites ===
 +
This section provides instructions for installing and running the demo program that is provided in the COSMOS i9 build. 
 +
# Install [http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.25/bin/ Tomcat 5.5.25]. The directory where the Tomcat server is installed will be referred to as the <tomcat_install_dir> in this document.
 +
# From the [http://www.eclipse.org/cosmos/downloads/ COSMOS download page], click on the link of the release candidate build for version 1.0.  Download the zip file under the "COSMOS Demo" section. 
 +
# Unzip the demo zip file to a directory.  You will see a directory called "cosmos-demo". This directory will be referred to as <cosmos-demo> in this document.
 +
# Copy all directories under <cosmos-demo>\webapps to <tomcat_install_dir>\webapps.
 +
 
=== Configurations ===
 
=== Configurations ===
 +
* At a Windows command prompt, enter <cosmos-demo>\bin.
 +
* Run configDemo.bat to update some configuration files according to your system environment. 
 +
* The configDemo program assumes:
 +
** You have copied the cosmos directory to the webapps directory in Tomcat by following the instructions in the previous section.
 +
** Your <cosmos-demo> directory and the tomcat installation are on the same host.
 +
* The program will prompt you for some input.  You will see something like the following in a successful execution of the config program. 
 +
<pre>
 +
This program will configure some environment variables for the COSMOS demo to run.
 +
We assume that the Tomcat server and the directory where you unzipped the demo program are on the same computer.
 +
Apache Tomcat install directory: D:\Program Files\apache-tomcat-5.5.25
 +
Hostname of the Tomcat server (e.g. www.eclipse.org): mydomain.com
 +
Tomcat port number: 8080
 +
COSMOS Demo install directory: D:\cosmos\i9\cosmos-demo
 +
Set management domain EPR for broker successfully.
 +
Set management domain EPR for Example MDR successfully.
 +
Set management domain EPR for SML MDR successfully.
 +
Set management domain EPR for logging data manager successfully.
 +
Set CBEData.dir for logging data manager successfully.
 +
Set management domain EPR for stat data manager successfully.
 +
Set derby.system.home for statistical data manager successfully.
 +
Updated SML MDR config file successfully.
 +
</pre>
 +
=== Configuring the Web Console===
 +
* Download the dojo toolkit indicated in the requirements section of the download page.
 +
* Unzip the dojo toolkit under <tomat>/webapps/COSMOSUI
 +
* Download the BIRT runtime indicated in the requirements section of the download page.
 +
* Unzip the BIRT runtime to a temporary folder.
 +
* Copy the contents of the <birt-runtime-dir>\WebViewerExample to <tomat>/webapps/COSMOSReportViewer.  Make sure you don't overwrite any files during this step.
 +
 
== Running the Program ==
 
== Running the Program ==
 
=== Starting COSMOS components ===
 
=== Starting COSMOS components ===
=== Get Brokers registered at the Management Domain ===
+
After you have configured the program by following instructions in the previous section, start Tomcat by running <tomcat_install_dir>/bin/startup.bat.  By starting the web server, the management domain, broker, data managers, reporting and user interface will be started.  The broker and data managers will be registered with the management domain and the broker respectively automatically on start up. This activity may take a few seconds and you can monitor it by viewing the tomcat console.
=== Get Data Managers Registered at the Broker ===
+
 +
'''Note:''' You need to set JRE_HOME or JAVA_HOME before running startup.bat.
 +
 
 +
After the COSMOS components have successfully started, you can use the COSMOS command line demo application and/or the COSMOS UI to interact with the COSMOS components.
 +
 
 +
=== Query for Brokers Registered at the Management Domain ===
 +
* Execute <cosmos-demo>\bin\domainEPR.bat.  This program will ask you for your hostname and port number of the Tomcat server, and prints out the EPR (Endpoint Reference) of the management domain; this reference is expressed in XML format.  Copy the EPR of the management domain to a scratch editor window, such as in Notepad.  You will use it later.
 +
* If COSMOS command line client has not started, execute <cosmos-demo>\cosmos-client\cosmosClient.bat.
 +
* Get a list of brokers at the management domain with the "domain getBrokers" command:
 +
<pre>
 +
COSMOS> domain getBrokers
 +
Management Domain EPR (terminate by an empty line):
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
    <wsa:Address>http://localhost:8080/cosmos/services/domain</wsa:Address>
 +
</wsa:EndpointReference>
 +
 
 +
EPR of brokers:
 +
Broker 1:
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
    <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing"/>
 +
    <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8080/cosmos/services/broker</wsa:Address>
 +
</wsa:EndpointReference>
 +
</pre>
 +
 
 +
=== Query for Data Managers Registered at the Broker ===
 +
* At the COSMOS prompt, type "broker getDataManagers".  When prompted for the broker EPR, paste in the broker EPR that you got from the previous step.  You will get a list of EPRs of data managers registered at the broker. 
 +
<pre>
 +
COSMOS> broker getDataManagers
 +
Broker EPR (terminate by an empty line):
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
    <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing"/>
 +
    <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://___:8080/cosmos/services/broker</wsa:Address>
 +
</wsa:EndpointReference>
 +
 
 +
EPR of data mangers:
 +
Data Manager 1:
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
    <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://____:8080/stat/services/org.eclipse.cosmos.dc.stat.datamgr.StatisticalDataManager</wsa:Address>
 +
    <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
        <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">StatDataManager</muse-wsa:ResourceId>
 +
    </wsa:ReferenceParameters>
 +
</wsa:EndpointReference>
 +
Data Manager 2:
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
    <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://____:8080/smlmdr/services/org.eclipse.cosmos.rm.sml.mdr.impl.SmlRepositoryMdr</wsa:Address>
 +
    <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
        <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">SML_REPO_ID</muse-wsa:ResourceId>
 +
    </wsa:ReferenceParameters>
 +
</wsa:EndpointReference>
 +
Data Manager 3:
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
    <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://____:8080/examplemdr/services/org.eclipse.cosmos.example.mdr.ExampleMdr</wsa:Address>
 +
    <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
        <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">Example</muse-wsa:ResourceId>
 +
    </wsa:ReferenceParameters>
 +
</wsa:EndpointReference>
 +
Data Manager 4:
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
    <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://____:8080/logging/services/org.eclipse.cosmos.dc.logging.datamgr.LoggingDataManager</wsa:Address>
 +
    <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
        <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">LoggingDataManager</muse-wsa:ResourceId>
 +
    </wsa:ReferenceParameters>
 +
</wsa:EndpointReference>
 +
</pre>
 +
 
 
=== Executing CMDBf Queries ===
 
=== Executing CMDBf Queries ===
 
==== Using a command line client ====
 
==== Using a command line client ====
 +
* We can execute CMDBf queries using the command line client. 
 +
* At the COSMOS prompt, type "smlmdr query" followed by the path to the query file to run a query against the SML MDR.  If you are querying the Example MDR, the command is instead "examplemdr".
 +
* The query files for the SML MDR are located in <cosmos-demo>\cosmos-client\cmdbf-queries\SMLMDR.
 +
* The query files for the Example MDR are located in <cosmos-demo>\cosmos-client\cmdbf-queries\ExampleMDR.
 +
* When prompted for the EPR for the SML MDR or the Example MDR, you can copy the EPR from the output of the "broker getDataManagers" command you did in the previous section. 
 +
 +
<pre>
 +
COSMOS> smlmdr query _______\cosmos-demo\cosmos-client\cmdbf-queries\SMLMDR\testInstanceIdQuery.txt
 +
EPR of SML Repository MDR (terminate by an empty line):
 +
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
    <wsa:Address>http://____:8080/cosmos/services/org.eclipse.cosmos.rm.sml.mdr.impl.SmlRepositoryMdr</wsa:Address>
 +
    <wsa:ReferenceParameters>
 +
        <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">SML_REPO_ID</muse-wsa:ResourceId>
 +
    </wsa:ReferenceParameters>
 +
</wsa:EndpointReference>
 +
 +
Query response:
 +
<?xml version="1.0" encoding="UTF-8"?><dyn:queryResponseType xmlns:dyn="http://www.eclipse.org/cosmos/mdrquery">
 +
        <dyn:queryResponseType xmlns="http://cmdbf.org/schema/1-0-0/datamodel">
 +
                <nodes templateId="cableTemplate">
 +
........ Content omitted .........
 +
                </nodes>
 +
            </dyn:queryResponseType>
 +
        </dyn:queryResponseType>
 +
</pre>
 +
* You can invoke queries on the Example MDR using the command line client. 
 +
<pre>
 +
COSMOS> examplemdr query _______\cosmos-demo\cosmos-client\cmdbf-queries\ExampleMDR\all-students.txt
 +
EPR of SML Repository MDR (terminate by an empty line):
 +
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
    <wsa:Address>http://_____:8080/examplemdr/services/org.eclipse.cosmos.example.mdr.ExampleMdr</wsa:Address>
 +
    <wsa:ReferenceParameters>
 +
        <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">Example</muse-wsa:ResourceId>
 +
    </wsa:ReferenceParameters>
 +
</wsa:EndpointReference>
 +
 +
Query response:
 +
<?xml version="1.0" encoding="UTF-8"?><dyn:queryResponseType xmlns:dyn="http://www.eclipse.org/cosmos/mdrquery">
 +
            <dyn:queryResponseType xmlns="http://cmdbf.org/schema/1-0-0/datamodel">
 +
                <nodes templateId="items">
 +
........ Content omitted .........
 +
                </nodes>
 +
            </dyn:queryResponseType>
 +
        </dyn:queryResponseType>
 +
</pre>
 +
 
==== Using the COSMOS Web User Interface ====
 
==== Using the COSMOS Web User Interface ====
=== Register configuration items with a federating CMDB===
+
=== Register Configuration Items with a Federating CMDB===
 +
 
 +
=== Querying the Federating CMDB ===
 +
 
 
=== Collect Log Events from the Logging Data Manager ===
 
=== Collect Log Events from the Logging Data Manager ===
 
==== Using a command line client ====
 
==== Using a command line client ====
Line 46: Line 202:
 
==== Using a command line client ====
 
==== Using a command line client ====
 
==== Using the COSMOS Web User Interface ====
 
==== Using the COSMOS Web User Interface ====
 
+
-->
  
 
[[Category:COSMOS_Users_Guide]]
 
[[Category:COSMOS_Users_Guide]]

Latest revision as of 16:00, 4 June 2008

COSMOS Wiki > COSMOS Document Plan > COSMOS Manual Guide

COSMOS User's Guide Running the Example section

Category: User's Guide

Owner Hubert Leung
Bug # 219120
Due dates Schedule

Outline

Please use the content from this wiki page: COSMOS_DEMO_i11

Back to the top