7 Upgrading UTIA

This chapter describes how to upgrade the UTIA application.

Prerequisites for Upgrading UTIA

The prerequisites for upgrading UTIA are:

  • UTIA Topology Schema should have a database link to the UIM schema with the name rem_schema. This is mandatory if only UTIA is used with UIM. However, the database link is not required if UTIA 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 UTIA 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 UTIA 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, 'Unified Topology for Inventory and Automation', SYSDATE, 'SUCCESS', 'Topolgy', '1.0.0.0.0');

Upgrading the UTIA Application

To upgrade the UTIA application:

  1. Download the latest Unified Topology 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/utia_spec_dir
  5. Create UTIA images using the latest Unified Topology Builder Tool Kit. See "Creating UTIA Images" for more information.
  6. Upgrade the UTIA schema. See "Upgrading the UTIA Schema" for more information.
  7. Upgrade the UTIA instance. See "Upgrading the UTIA Instance" for more information.

Upgrading the UTIA Schema

To upgrade the UTIA schema:

  1. Upgrade PDB by starting $UIM_CNTK/scripts/install-database.sh.
  2. To only update the model of UTIA and skip the data migration:
    $COMMON_CNTK/scripts/install-database.sh -p sr -i quick -f $SPEC_PATH/sr/quick/database.yaml -a unified-topology -c 4
  3. To update the model of UTIA 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 unified-topology -c 40

Upgrading the UTIA Instance

To upgrade the UTIA instance:

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