Difference between revisions of "Usage Tracker Installation"

From Gcube Wiki
Jump to: navigation, search
(Prerequisites)
Line 57: Line 57:
 
Connect to ''<nowiki>http://<deployhost>:8080/usagetracker/rest/usagerecords</nowiki>'' you should get an empty XML result:
 
Connect to ''<nowiki>http://<deployhost>:8080/usagetracker/rest/usagerecords</nowiki>'' you should get an empty XML result:
 
<pre><rawUsagerecords/></pre>
 
<pre><rawUsagerecords/></pre>
 +
 +
==IS integration==
 +
 +
The Usage Tracker service must be registered as a Runtime Resource on the IS, using the Resources Management portlet.
 +
Below is an example of the resource configuration:
 +
 +
<pre>
 +
 +
<Resource version="...">
 +
   
 +
  <ID>...</ID>
 +
   
 +
  <Type>RuntimeResource</Type>
 +
   
 +
  <Scopes>
 +
       
 +
      <Scope>...</Scope>
 +
   
 +
  </Scopes>
 +
   
 +
  <Profile>
 +
       
 +
      <Category>Service</Category>
 +
       
 +
      <Name>UsageTracker</Name>
 +
       
 +
      <Description />
 +
       
 +
      <Platform>
 +
           
 +
        <Name>UsageTracker</Name>
 +
           
 +
        <Version>2</Version>
 +
           
 +
        <MinorVersion>2</MinorVersion>
 +
           
 +
        <RevisionVersion>2</RevisionVersion>
 +
           
 +
        <BuildVersion>2</BuildVersion>
 +
       
 +
      </Platform>
 +
       
 +
      <RunTime>
 +
           
 +
        <HostedOn>hostname</HostedOn>
 +
           
 +
        <GHN UniqueID="" />
 +
           
 +
        <Status>READY</Status>
 +
       
 +
      </RunTime>
 +
       
 +
      <AccessPoint>
 +
           
 +
        <Description>UsageTracker Interface</Description>
 +
           
 +
        <Interface>
 +
               
 +
            <Endpoint EntryName="usageTrackerInterface">http://hostname:8080/usagetracker/rest</Endpoint>
 +
           
 +
        </Interface>
 +
           
 +
        <AccessData>
 +
               
 +
            <Username />
 +
               
 +
            <Password>...</Password>
 +
           
 +
        </AccessData>
 +
       
 +
      </AccessPoint>
 +
   
 +
  </Profile>
 +
 +
</Resource>
 +
</pre>

Revision as of 16:21, 19 September 2013

System requirements

  • Java runtime environment (openjdk)
  • Apache Tomcat version 5.0 or higher

Download

Binaries of the Usage Tracker are available in .deb and .rpm format. Packages can be downloaded from:

Install

Once you've downloaded the package format suitable for your system, the Usage Tracker can be installed by running:

  • dpkg -i venusc-mab-usagetracker-«version».deb

or

  • rpm -i venusc-mab-usagetracker-«version».noarch.rpm

Prerequisites

The Usage Tracker adopts a document-oriented database (MongoDB in the current implementation) to persist records. A running instance of MongoDB is expected by the Usage Tracker. The instance can either run on the local machine or a remote one.

Configuration

Configuration of the usage tracker is entirely property-file-based. The pre-defined location for configuration files is /opt/venus-c/etc/. Two configuration files are expected by the usage tracker:

/opt/venus-c/etc/venusc-mab-usagetracker.properties
/opt/venus-c/etc/venusc-mab-usagetracker-log4j.properties

The first one provides connection parameters (e.g. location, db name, username, password) for the records database. The second one just configures logging facilities.

You should disable the Usage Tracker internal security by editing the first configuration file in this way:

authn.enabled = false
authz.enabled = false

Deploying the Usage Tracker in Tomcat

The service should be deployed automatically during installation. However, in case of trouble or manual (un)deployment, it can be done by:

  • copying the context file (i.e. /opt/venus-c/etc/usagetracker.xml) to /etc/tomcat«ver»/conf/Catalina/localhost/
  • make sure Tomcat is up and running

Testing your installation

Connect to http://<deployhost>:8080/usagetracker/rest/usagerecords you should get an empty XML result:

<rawUsagerecords/>

IS integration

The Usage Tracker service must be registered as a Runtime Resource on the IS, using the Resources Management portlet. Below is an example of the resource configuration:


<Resource version="...">
    
   <ID>...</ID>
    
   <Type>RuntimeResource</Type>
    
   <Scopes>
        
      <Scope>...</Scope>
    
   </Scopes>
    
   <Profile>
        
      <Category>Service</Category>
        
      <Name>UsageTracker</Name>
        
      <Description />
        
      <Platform>
            
         <Name>UsageTracker</Name>
            
         <Version>2</Version>
            
         <MinorVersion>2</MinorVersion>
            
         <RevisionVersion>2</RevisionVersion>
            
         <BuildVersion>2</BuildVersion>
        
      </Platform>
        
      <RunTime>
            
         <HostedOn>hostname</HostedOn>
            
         <GHN UniqueID="" />
            
         <Status>READY</Status>
        
      </RunTime>
        
      <AccessPoint>
            
         <Description>UsageTracker Interface</Description>
            
         <Interface>
                
            <Endpoint EntryName="usageTrackerInterface">http://hostname:8080/usagetracker/rest</Endpoint>
            
         </Interface>
            
         <AccessData>
                
            <Username />
                
            <Password>...</Password>
            
         </AccessData>
        
      </AccessPoint>
    
   </Profile>

</Resource>