X

Oracle Spatial and Graph – technical tips, best practices, and news from the product team

Upgrading to Oracle Spatial Studio 20.1

Daniel Cuadra
Principal Member of Technical Staff

Oracle Spatial Studio is a self-service web tool for accessing the spatial features of Oracle Database. The release of Spatial Studio 20.1 introduces many valuable enhancements. This article explains the process of upgrading an existing deployment to version 20.1, and is intended for those with a general understanding of JEE deployments.

The following are the steps to upgrade an existing Spatial Studio deployment to version 20.1.

Part 1 - Prepare for Upgrade

  1. Stop all Spatial Studio instances.
  2. Make a full backup of the following artifacts:
    • Repository database schema
    • Working-directory, typically ~/.sgtech
    • sgtech_config.json configuration file, typically located in the working-directory
  3. Download Spatial Studio 20.1 from the Spatial Studio downloads page to the host to be upgraded
    • i.e., local computer, Oracle Cloud Marketplace instance, cluster server

Part 2 - Upgrade Spatial Studio Deployment

There are two scenarios for upgrading: in-place, when upgrading an existing host; and out-of-place, when deploying to a new host. In both cases, the upgraded Spatial Studio deployment uses the existing repository database schema.

In-place upgrade

  1. Remove all pre-cached tiles by deleting the cache subfolder from Spatial Studio's working-directory
    • i.e., rm -R ~/.sgtech/cache
  2. Redeploy the app
    • If EAR deployment, follow the instructions of your application server to delete the old deployment version, deploy the new version and start the application.
    • If Quick Start, rename the old Quick Start folder, expand the downloaded ZIP file and execute start.sh (Linux) or start.cmd (Windows).

Out-of-place upgrade

  1. Create the working-directory in new host
    • i.e., mkdir ~/.sgtech
  2. To preserve the master_seed property, copy over the sgtech_config.json configuration file from old host into the new host's working-directory
    • i.e., cp old/sgtech_config.json ~/.sgtech
    • If master_seed is lost, all Connection passwords will be broken. If this occurs,  proceed with the upgrade, then log into the upgraded Spatial Studio instance later and edit each connection to re-connect.
  3. Deploy the app
    • If EAR deployment, follow the instructions of your application server to deploy the new version and start the application.
    • If Quick Start, simply expand the downloaded ZIP file and execute start.sh (Linux) or start.cmd (Windows).

Upon starting Spatial Studio 20.1, the repository database schema will automatically be upgraded. This should be completed within a couple of minutes.

Part 3 - Refreshing Dataset statistics

  1. You must refresh statistics for all Datasets.
  2. If you have a small number of Datasets, you can simply click Update statistics on each dataset:

    [Update statistics]

  3. Alternatively, if you have access to Bash shell, you can update all statistics using an automation script.
    1. Download the script from here and unzip update_datasets.sh
    2. Log into Studio as admin, and generate an Access Token with read-write permissions as explained in this post.
    3. Execute the script, passing the OAuth URL of the upgraded host and the Access Token
      • i.e. (token abbreviated for simplicity), ./update_datasets.sh http://mystudio:8080/spatialstudio/oauth/v1 eyJ0e...xwgg
    4. Wait for the script to complete the updates, then delete the Access Token from Spatial Studio.

Enjoy the new features in Spatial Studio 20.1!

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.