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
- Stop all Spatial Studio instances.
- 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
- 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.
- Remove all pre-cached tiles by deleting the cache subfolder from Spatial Studio's working-directory
- i.e., rm -R ~/.sgtech/cache
- 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).
- Create the working-directory in new host
- 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.
- 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
- You must refresh statistics for all Datasets.
- If you have a small number of Datasets, you can simply click Update statistics on each dataset:
- Alternatively, if you have access to Bash shell, you can update all statistics using an automation script.
- Download the script from here and unzip update_datasets.sh
- Log into Studio as admin, and generate an Access Token with read-write permissions as explained in this post.
- 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
- 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!