Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Installing the CAST-RestAPI.war requires the following:

(tick)

Java JRE

Must be installed on the machine that will host the Application Server. Please see

:

Supported Platforms about JRE support.

  • Appendix - Apache Tomcat - IBM Websphere - Java JDK-JRE installation and application server memory configuration for more information about installing this item.
  • (tick)

    Application Server

    Must be installed

    on a compatible machine. Please see: InfoNote that the application server can run

    on

    either the Unix/Linux or Windows operating systems (this document describes an installation in a Windows environment)

    a compatible machine. Please see Supported Platforms about Application Server support.

    (tick)

    Dashboard Service or Measurement Service

    A single CAST Dashboard Service or Measurement Service or multiple CAST Dashboard Services / Measurement Services.

    To ensure compatibility, except when working with the CAST Report Generator, you must only use a CAST Dashboard Service or Measurement Service installed with a version of CAST AIP that exactly matches the major, minor or Service Pack release number of the CAST RestAPI WAR that you are installing.

    The RestAPI can interact with CAST Dashboard Services or Measurement Services installed on all supported host CSS2/RDBMS.

    Info
    When using the CAST-RestAPI.war with the CAST Report Generator, CAST highly recommends configuring connections to the CAST Dashboard Service ONLY.

    (tick)

    WAR file

    The CAST-RestAPI.war can be retrieved from the WARS folder located in the CAST installation folder:

    Image Modified

    (tick)

    License KeyAccess to data in the CAST Dashboard Services is governed by a license key - see CAST-AED-RESTAPI - Dashboard Service license key configuration. You must have a valid license key in your possession before you begin if you wish to configure access to a CAST Dashboard Service - for example when using the CAST Report Generator.

    Pre-installation check list

    Before beginning the installation process, please ensure that you have carried out all of the following tasks and that the following requirements have been met:

    (tick)

    Ensure you have read all Release Notes accompanying CAST products for any last-minute information.

    (tick)

    Decide where the CAST-RESTAPI.war will be installed - CAST Administration workstation, separate dedicated machine or existing machine used for the CAST Application Analytics or Engineering Dashboards/CAST AIC Portal.

    (tick)

    Ensure that your user login on the target machine has sufficient user privileges to install applications (see Appendix - CAST Administration workstation installation and hardware requirements)

    (tick)

    Make sure you have the required .WAR file ready for deployment

    Installation procedure

    Info
    This document assumes you are using Apache Tomcat in a Windows environment to host the CAST-RESTAPI. If you are using IBM Websphere Application Server in a Linux environment, please see Appendix - AAD - AED - RestAPI - Deployment on IBM WebSphere Application Server.

    The installation process is divided into various steps:

    Step 1Deploy and configure the CAST-RESTAPI.war file on your application server
    Step 2Configure access security
    Step 3
    Upload snapshot data for display
    Step 4Configure data authorization

    Step 1 - deploy and configure the CAST-RestAPI.war file on your application server

    ...

    No Format
    <Resource name="jdbc/domains/AAD" url="jdbc:postgresql://localhost:2280/postgres"
      
        initConnectionSqls="SET search_path TO [DashboardMeasure Schema];"
           username="operator" password="CastAIP" 
    
     
    
        auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
      
        validationQuery="select 1"
      
        initialSize="5" maxActive="20" maxIdle="10" maxWait="-1"/>
    
    <Resource name="jdbc/domains/ADGAED" url="jdbc:postgresql://localhost:2280/postgres"
     "
         initConnectionSqls="SET search_path TO [Dashboard Central Schema];"
           username="operator" password="CastAIP"  
    
          auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
      
        validationQuery="select 1"
      
        initialSize="5" maxActive="20" maxIdle="10" maxWait="-1"/>
    • First comment one of the templates by adding <!-- and --> around the section.
    • Change the name parameter to something other than "jdbc/domains/AAD" or ""jdbc/domains/ADGAED" - CAST recommends using the name of your target Dashboard Service or Measurement Service - for example "jdbc/domains/V80_CENTRAL_CSS2"
    • Set the URL parameter to the server on which the Dashboard Service or Measurement Service is located. Usually you just need to alter the "localhost" to the name of the server on which the host RDBMS is located.
    • Change [Measure Schema] or [Dashboard Schema] to the name of the Dashboard Service or Measurement Service.
    • Ensure the password parameter is correct
    • You should end up with a section like this - this is for a CSS2 connection:

    ...

    Info
    Note that if your Dashboard / Measurement Service is located on CSS1, you simply need to alter the port number from 2280 (CSS2) to 2278 (CSS1).

    Tomcat 8 / 8.5 - configuration for a single Dashboard / Measurement Service on CSS

    If you are using Tomcat 8 or 8.5 to host the CAST RestAPI and CSS to host your CAST Dashboard/Measurement Services, please follow these instructions:

    ...

    No Format
    <Resource name="jdbc/domains/AAD" url="jdbc:postgresql://localhost:2280/postgres"
    
          initConnectionSqls="SET search_path TO [DashboardMeasure Schema];"
           username="operator" password="CastAIP" 
    
           auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
      
        validationQuery="select 1"
     
         initialSize="5" maxActive="20" maxIdle="10" maxWait="-1"/>
    
    <Resource name="jdbc/domains/ADGAED" url="jdbc:postgresql://localhost:2280/postgres"
      
        initConnectionSqls="SET search_path TO [Dashboard Central Schema];"
      
        username="operator" password="CastAIP" 
    
     
    
        auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
     "
         validationQuery="select 1"
           initialSize="5" maxActive="20" maxIdle="10" maxWait="-1"/>

    ...

    No Format
    <!--
    <Resource name="jdbc/domains/AAD" url="jdbc:postgresql://localhost:2280/postgres"
           initConnectionSqls="SET search_path TO [DashboardMeasure Schema];"
      
        username="operator" password="CastAIP" 
    
     
    
        auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
           validationQuery="select 1"
      
        initialSize="5" maxActive="20" maxIdle="10" maxWait="-1"/>
    
    <Resource name="jdbc/domains/ADGAED" url="jdbc:postgresql://localhost:2280/postgres"
      
        initConnectionSqls="SET search_path TO [Dashboard Central Schema];"
      
        username="operator" password="CastAIP" 
     
    
         auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
           validationQuery="select 1"
           initialSize="5" maxActive="20" maxIdle="10" maxWait="-1"/>
    -->

    ...

    No Format
    <!--  For Tomcat 8 : http://tomcat.apache.org/tomcat-8.0-doc/jndi-datasource-examples-howto.html & http://commons.apache.org/proper/commons-dbcp/configuration.html
    
    template for resources on CSS :
    <Resource name="jdbc/domains/${domainName}" 
            url="jdbc:postgresql://${host}:${port}/postgres"
            connectionInitSqls="SET search_path TO ${schema};"
            username="${user}" password="${password}" 
    
            auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
            validationQuery="select 1" initialSize="5" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/>
    
    template for resources on Oracle :            
    <Resource name="jdbc/domains/{domainName}"
            url="jdbc:oracle:thin:@{server}:{port}:{instance}"
            connectionInitSqls="ALTER SESSION SET CURRENT_SCHEMA={schema}"
            username="{user}"   password="{password}"
    
            auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
            validationQuery="select 1 from DUAL" initialSize="5" maxTotal="20" maxIdle="10" maxWaitMillis="-1" />
    
    template for resources on MS SQL Server :
    <Resource name="jdbc/domains/{domainName}"
            url="jdbc:jtds:sqlserver://{host};instance={instance}"
            connectionInitSqls="use {database}"
            username="{user}" password="{password}"
    
            auth="Container" type="javax.sql.DataSource" driverClassName="net.sourceforge.jtds.jdbc.Driver"
            validationQuery="select 1" initialSize="5" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/>
    -->
    
    
    • Copy the Tomcat 8 for CSS2 template into uncommented white space:

    ...

    No Format
    <Resource name="jdbc/domains/AADV80_CENTRAL_CSS2" 
            url="jdbc:postgresql://NEFYN:$22802280/postgres"
            connectionInitSqls="SET search_path TO V80_CENTRAL_CSS2;"
            username="operator" password="CastAIP" 
    
            auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
            validationQuery="select 1" initialSize="5" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/>
    • Following any changes you make, save the context.xml file and then restart your application server so that the changes are taken into account.

    Dashboard / Measurement Services located on a Microsoft SQL Server or Oracle Server for Tomcat 7/8/8.5

    If your target Dashboard Service is located on a Microsoft SQL Server or Oracle Server, you need to:

    • Remove or re-comment the uncommented template for CSS2/Tomcat 7 from the context.xml file
    • Copy the commented template for Microsoft SQL Server or Oracle into uncommented space - ensure you chose the correct template for Tomcat 7 or Tomcat 8 / 8.5.
    • Make the same configuration changes as suggested above:
      • First change the {domainName} parameter from name="jdbc/domains/{domainName}" - CAST recommends using the name of your target Dashboard Service or Measurement Service - for example name="jdbc/domains/V80_CENTRAL_CSS2"
      • Set the URL parameter to the server on which the Dashboard Service or Measurement Service is located. Please see http://jtds.sourceforge.net/faq.html#urlFormat for more information about the Microsoft SQL Server jTDS JDBC driver URL format.
      • Set the initConnectionSqls parameter to the name of the Dashboard Service or Measurement Service {database} or {schema}

      • Ensure the username and password parameters are correct - these must provided access the to Dashboard Service or Measurement Service database or schema.
    • Following any changes you make, save the context.xml file and then restart your application server so that the changes are taken into account.

    Configuring connections to multiple Dashboard / Measurement Services for Tomcat 7/8/8.5

    The above information describes how to configure a connection to one single Dashboard Service or Measurement Service. It is also possible to configure connections to multiple Dashboard or Measurement Services, simply by adding in an uncommented template for each target Dashboard or Measurement Service.

    You can mix Dashboard Services with Measurement Services and/or you can mix Services stored on legacy releases of CAST AIP starting 7.0.x and with the CAST RestAPI stored on Tomcat 7 or 8 / 8.5. Following any changes you make, save the context.xml file and then restart your application server so that the changes are taken into account.

    ...