Upgrading from a Previous Release
This topic provides instructions on how you can upgrade from WSO2 G-Reg 5.2.0 to WSO2 G-Reg 5.3.0.
There are no Registry schema changes between versions.
Upgrading from an older version
To upgrade from a version older than WSO2 G-Reg 5.2.0, 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.
- For instructions on upgrading from G-Reg 5.0.1 to 5.1.0, go to Upgrading from a Previous Release.
- For instructions on upgrading from G-Reg 5.1.0 to 5.2.0, go to Upgrading from a Previous Release.
Preparing to upgrade
The following are the specific prerequisites you must complete before you upgrade WSO2 G-Reg:
- Stop all the WSO2 products that are connected to the database.
Copy the
<G-REG_HOME_5.2.0>
directory in order to backup the product configurations.- Make a backup of any mounted databases of WSO2 G-Reg 5.2.0.
Limitations
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 G-Reg, 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 redo the upgrading progress.
Downtime
The downtime is limited to the time taken for switching databases when in the production environment.
Updating the database
Follow the steps below to update the WSO2 G-Reg database.
Download WSO2 Governance Registry 5.3.0.
Stop all running server instances of WSO2 Governance Registry 5.2.0.
- Make sure that you have taken a backup of all the databases and existing configurations.
- To connect the new product version, to the database of the previous version, configure the following files:
- Configure
<G-REG_HOME>/repository/conf/datasources/master-datasources.xml
. For more information on how to do this for your database, see Working with Databases. Navigate to the
<G-REG _HOME>/repository/conf
directory, and update the datasource references inuser-mgt.xml
,registry.xml
andapi-manager.xml
files, to match the updated configurations in themaster-datasources.xml
file, which you made in the above step. The following are sample configurations if the datasource isjdbc/WSO2CarbonDB
.registry.xml<dbConfig name="wso2registry"> <dataSource>jdbc/WSO2CarbonDB</dataSource> </dbConfig>
user-mgt.xml<UserManager> <Realm> <Configuration> ... <Property name="dataSource">jdbc/WSO2CarbonDB</Property> </Configuration> ... </Realm> </UserManager>
api-manager.xml<DataSourceName>jdbc/WSO2CarbonDB</DataSourceName>
- Configure
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<
G-REG_HOME>/repository/conf/registry.xml
file as shown below.<indexingConfiguration> <solrServerUrl>http://192.168.48.220:8983/solr/registry-indexing</solrServerUrl> <startingDelayInSeconds>35</startingDelayInSeconds> <indexingFrequencyInSeconds>3</indexingFrequencyInSeconds> <!--number of resources submit for given indexing thread --> <batchSize>50</batchSize> <!--number of worker threads for indexing --> <indexerPoolSize>50</indexerPoolSize> <!-- location storing the time the indexing took place--> </indexingConfiguration>
Once the server is completely started, and you are done with the migration tasks, restart the server by executing the following commands:
- Linux:
sh wso2server.sh
- Windows:
wso2server.bat
- Linux:
Re-indexing resources
Follow the steps below to re-index the resources after completing the migration.
- Delete the
<G-REG_HOME>/solr/
directory. - Change the name (e.g.
lastaccesstime
tolastaccesstime_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.xml
file as follows.
<lastAccessTimeLocation>/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime_1</lastAccessTimeLocation>
- 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.
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.