To upgrade WSO2 Governance Registry, the user store database should be upgraded. Note that there are no registry schema changes between versions. This topic provides instructions on how you can upgrade (the data and configurations) from WSO2 GREG 5.0.1 to WSO2 GREG 5.1.0.
To upgrade from a version older than WSO2 G-Reg 5.0.1, start from the doc that was released immediately after your current release and upgrade incrementally.
- For instructions on upgrading from G-Reg 4.5.3 to 4.6.0, go to Upgrading from a Previous Release.
- For instructions on upgrading from G-Reg 4.6.0 to 5.0.0, go to Upgrading from the Previous Release.
- For instructions on upgrading from G-Reg 5.0.0 to 5.0.1, go to Upgrading from a Previous Release.
Preparing to upgrade
The following are the specific prerequisites you must complete before you upgrade WSO2 GREG:
- Stop all the WSO2 products that are connected to the database.
Make a backup of the WSO2 Governance Registry 5.0.1 database and copy the GREG_HOME_5.0.1 directory in order to to backup the product configurations.
The following are the limitations of upgrading.
- This upgrading process can only be done for the same database types. For example, if you are using MySQL currently and you wish to use Oracle in the new version of GREG, these scripts will not work.
- You cannot roll back the upgrading process. However, it is possible to restore a backup of the previous database and restart the upgrading progress.
The downtime is limited to the time taken for switching databases when in the production environment.
Upgrading the database
Download WSO2 Governance Registry 5.1.0 from http://wso2.com/products/governance-registry/.
Stop all running server instances of WSO2 Governance Registry 5.0.1.
- Make sure that you have taken a backup of all the databases and existing configurations.
- To connect the new product version to the upgraded database, configure the following files:
<PRODUCT_HOME>/repository/conf/datasources/master-datasources.xml. See here for more information on how to do this for your database.
Go to the
<PRODUCT _HOME>/repository/confdirectory and update the datasource references in
api-manager.xmlto match the updated configurations in the
master-datasources.xmlfile which you made in the above step. The following are sample configurations if the datasource is
If there are several 1000s of artifacts in the system, increase the value of the
<indexingFrequencyInSeconds>property (e.g. to 10), or reduce the value of the
<batchSize>property (e.g. to 10) in the
GREG_HOME>/repository/conf/registry.xmlfile as shown below.
It is recommended to restart all the WSO2 Governance Registry 5.1.0 instances. Check for any other configurations that were done for WSO2 Governance Registry 5.0.1 (based on your solutions), and update the configuration files in WSO2 Governance Registry 5.1.0 accordingly. For example, external user stores, caching, mounting.
Follow the steps below to re-index the resources after completing the migration.
- Delete the
- Change the name (e.g.
lastaccesstime_1) of the file in the registry which tracks the last access time of indexing the resources, by changing the value of the
<lastAccessTimeLocation>property in the
<G-REG_HOME>/repositiry/conf/registry.xmlfile as follows.
- Restart the G-Reg server and wait for around 30 minutes. This time duration depends on number of resources that are there in the registry.
The databases should contain the newly added tables, which are namely as follows:
Going into production
The following are recommended tests to run on the upgraded system.
Create multiple user stores and try adding users to different user stores.
Create multiple tenants and add different user stores to the different tenants. Thereafter, add users to the various user stores.
Once the above tests are run successfully, it is safe to consider that the upgrade is ready for production. However, it is advised to test any features that are being used in production.