9 Upgrading ATA

This chapter describes how to upgrade the ATA application.

Prerequisites for Upgrading ATA

The prerequisites for upgrading ATA are:

  • ATA Schema should have a database link to the UIM schema with the name rem_schema. This is mandatory if only ATA is used with UIM. However, the database link is not required if ATA is used with some external system. The rem_schema database link is created during the first time of complete migration. If the database link is not present, the database link can be created as follows:
    ACCEPT schema CHAR PROMPT "Enter username for remote schema: "
    ACCEPT passwd CHAR PROMPT "Enter password for remote schema: " HIDE
    ACCEPT host CHAR PROMPT "Enter pingable hostname/ipaddress for remote schema database host : "
    ACCEPT port CHAR PROMPT "Enter port number for remote schema database : "
    ACCEPT service_name CHAR PROMPT "Enter SQL*Net / service for remote schema database: "
    ACCEPT commitSize CHAR PROMPT "Enter Batch/Commit size for a single parallel process(Optional): "
    ACCEPT threads CHAR PROMPT "Enter Maximum no.of total parallel process at any given time(Optional): "
    ACCEPT waitTime CHAR PROMPT "Enter Waiting interval after which the listener checks for the availabilty of jobs in Seconds(Optional): "
    
    PROMPT
    
    alter system set global_names=FALSE scope=both;
    
    CREATE DATABASE LINK rem_schema CONNECT TO &schema IDENTIFIED BY &passwd USING '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=&host)(PORT=&port))(CONNECT_DATA=(SERVICE_NAME=&service_name)))';
    
  • For ATA 1.0.0.1.0 or later versions, the installer will create an ApplicationInfo table and will update the VERSION after every upgrade. If you have ATA 1.0.0.0.0 installed, you will not be having ApplicationInfo table. Therefore, create ApplicationInfo table before running an upgrade as follows:
    CREATE TABLE APPLICATIONINFO ( ENTITYID NUMBER(19,0) NOT NULL ENABLE,
      ENTITYCLASS VARCHAR2(255 BYTE),
      BUILDDATE TIMESTAMP (6) WITH LOCAL TIME ZONE,
      CREATEDDATE TIMESTAMP (6) WITH LOCAL TIME ZONE,
      CREATEDUSER VARCHAR2(255 BYTE),
      ENDDATE TIMESTAMP (6) WITH LOCAL TIME ZONE,
      ENTITYVERSION NUMBER(10,0),
      FILENAME VARCHAR2(255 BYTE),
      LASTMODIFIEDDATE TIMESTAMP (6) WITH LOCAL TIME ZONE,
      LASTMODIFIEDUSER VARCHAR2(255 BYTE),
      NAME VARCHAR2(255 BYTE),
      STARTDATE TIMESTAMP (6) WITH LOCAL TIME ZONE,
      STATUS VARCHAR2(255 BYTE),
      TYPE VARCHAR2(255 BYTE),
      VERSION VARCHAR2(255 BYTE),
       PRIMARY KEY (ENTITYID));
        
       INSERT INTO APPLICATIONINFO VALUES (ENTITYID_SEQ.NEXTVAL, 'ApplicationInformationDAO', SYSDATE, SYSDATE, NULL, SYSDATE, 1, NULL, SYSDATE, NULL, 'Active Topology Automator', SYSDATE, 'SUCCESS', 'Topolgy', '1.0.0.0.0');

Upgrading the ATA Application

To upgrade the ATA application:

  1. Download the latest ATA Builder Tool Kit and Common Cloud Native Tool Kit into the workspace directory.
  2. Export the unzipped path to the WORKSPACEDIR environment variable.
    export WORKSPACEDIR=$(pwd)/workspace
  3. Set the COMMON_CNTK variable to the path of the common-cntk directory in the workspace.
    export COMMON_CNTK=$WORKSPACEDIR/common-cntk
  4. Set SPEC_PATH variable to the location where applications.yaml and database.yaml files are copied :
    $ export SPEC_PATH=$WORKSPACEDIR/ata_spec_dir
  5. Create ATA images using the latest ATA Builder Tool Kit. See "Prerequistes and Configuration for Creating ATA Images" for more information.
  6. Upgrade the ATA schema. See "Upgrading the ATA Schema" for more information.
  7. Upgrade the ATA instance. See "Upgrading the ATA Instance" for more information.

Upgrading the ATA Schema

To upgrade the ATA schema:

  1. Upgrade PDB by starting $UIM_CNTK/scripts/install-database.sh.
  2. To only update the model of ATA and skip the data migration:
    $COMMON_CNTK/scripts/install-database.sh -p sr -i quick -f $SPEC_PATH/sr/quick/database.yaml -a ata -c 4
  3. To update the model of ATA and also populate the data from the UIM schema:
    $COMMON_CNTK/scripts/install-database.sh -p sr -i quick -f $SPEC_PATH/sr/quick/database.yaml -a ata -c 40

Upgrading the ATA Instance

To upgrade the ATA instance:

  1. Update $COMMON_CNTK/samples/applications.yaml with the latest ATA API, ATA PGX, and ATA UI image names and the corresponding tags.
  2. Run $COMMON_CNTK/scripts/upgrade-applications.sh to upgrade the ATA instance:
    $COMMON_CNTK/scripts/upgrade-applications.sh -p sr -i quick -f $SPEC_PATH/sr/quick/applications.yaml -a ata