Upgrading from the Previous Release
The following information describes how to upgrade your API Manager server from the previous release, which is APIM 1.7.0. To upgrade from a version older than 1.7.0, start from the doc that was released immediately after your current release and upgrade incrementally.
Migration scripts' location is https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/products/apimgt/1.8.0/modules/distribution/resources/migration-1.7.0_to_1.8.0.
Upgrading the product databases
- Download the API Manager 1.8.0 from http://wso2.com/products/api-manager.
- Stop all running API Manager server instances.
- Back up the databases of your API Manager 1.7.0 server instance.
- Download the migration scripts from the migration script location and execute the database upgrade scripts on your old database. You must select the script corresponding to your database type. For example, if your database is MySQL, execute
migration-1.7.0_to_1.8.0/mysql.sql
on it. The script adds all the schema changes done to API Manager tables in the 1.8.0 release.
Migrating the configurations
In this section, you move all existing API Manager configurations from the current environment to the new one.
Open
<APIM_1.8.0_HOME>/repository/conf/datasources/master-datasources.xml
file and provide the datasource configurations for the following databases. You can copy the configurations from the same file in the API Manager 1.7.0 instance.- User Store
- Registry database
- API Manager Databases
Edit the registry configurations in the
<APIM_HOME>/repository/config/registry.xml
file and the user database in the<APIM_HOME>/repository/conf/user-mgt.xml
file.Move all your synapse configurations by copying and replacing
<APIM_1.7.0_HOME>/repository/deployment/server/synapse-config/default
directory to<APIM_1.8.0_HOME>/repository/deployment/server/synapse-config/default
directory.If you changed the default URLs in
AuthorizeAPI.xml
andTokenAPI.xml
files, do not replace them when copying. They are application-specific APIs.
Upgrading APIM 1.7.0 to 1.8.0
Start the API Manager 1.8.0 and log in to its management console.
To re-index the artifacts in the registry, perform the two steps given below.
a) Rename the lastAccessTimeLocation in the
<APIM_1.8.0_HOME>
/repository/conf/registry.xml
file.E.g.,: Change /_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime to /_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime_1
b) Shutdown AM 1.8.0 and backup and delete the
<APIM_1.8.0_HOME>
/solr
directory and restart the server.- Copy the contents from your previous
<APIM_HOME>/repository/tenants
directory to the same directory in the API Manager 1.8.0. Do not replace the_TokenAPI_.xml
,_RevokeAPI_.xml
and_AuthorizeAPI_.xml
files in the/default/api
sub directory. - Download and build org.wso2.carbon.apimgt.migration.zip as a JAR file.
- Place the JAR file in the
<APIM_1.8.0_HOME>/repository/components/dropins
folder. - Start the server with the
-Dmigrate=1.7
command to run the 1.7.0 to 1.8.0 swagger and doc resource migrations.Upgrading external stores
If you have external stores configured in the registry, follow the steps below:
Log in to APIM 1.8.0 management console and click the Resources -> Browse menu.
Load the
/_system/governance/apimgt/externalstores/external-api-stores.xml
resource in the registry browser UI, configure your external stores and save.
Upgrading Google analytics
If you have Google Analytics configured in the registry, follow the steps below:
Log in to APIM 1.8.0 management console and go to Resources -> Browse menu.
Load the
/_system/governance/apimgt/statistics/ga-config.xml
resource in the registry browser UI, configure the Google analytics and save.
Upgrading workflows
If you have Workflows configured in the registry, follow the steps below:
Log in to APIM 1.8.0 management console and go to Resources -> Browse menu.
Load the
/_system/governance/apimgt/applicationdata/workflow-extensions.xml
resource in the registry browser UI, configure your workflows and save.