API Manager 1.6.0 to 1.7.0 upgrade fails as reported in this JIRA: https://wso2.org/jira/browse/APIMANAGER-2529
We will provide a solution in the next GA release and/or a patch.
The following information describes how to upgrade your API Manager server from the release, which is APIM 1.6.0. To upgrade from a version older than 1.6.0, start from the doc that was released immediately after your current release and upgrade incrementally.
Upgrading the product databases
- Download API Manager 1.7.0 from http://wso2.com/products/api-manager.
- Stop all running API Manager server instances.
- Back up the databases of your API Manager 1.6.0 server instance.
- Go to
<APIM_1.7.0_HOME>/dbscripts/migration-1.6.0_to_1.7.0
and run 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<APIM_1.7.0_HOME>/dbscripts/migration-1.6.0_to_1.7.0/mysql.sql
on it. The script adds all the schema changes done to API Manager tables in the 1.7.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.7.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.6.0 instance.- User Store
- Registry database
- API Manager Databases
Move all your synapse configurations by copying and replacing
<APIM_1.6.0_HOME>/repository/deployment/server/synapse-config/default
directory to<APIM_1.7.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.6.0 to 1.7.0
Start the API Manager 1.7.0 and log in to its management console.
- Select Extensions -> Artifact Types menu and click the View/Edit link associated with the api artifact type.
- Replace the RXT file that opens in the management console with the content of
<APIM_1.7.0_HOME>/dbscripts/migration-1.6.0_to_1.7.0/rxt/api.rxt
file. - Similarly, using the management console, replace the documentation.rxt file with the content of
<APIM_1.7.0_HOME>/dbscripts/migration-1.6.0_to_1.7.0/rxt/documentation.rxt
file. - Copy the
<APIM_1.7.0_HOME>/dbscripts/migration-1.6.0_to_1.7.0/swagger-resource-migration
directory to<APIM_1.7.0_HOME>
(The new directory path will now be<APIM_1.7.0_HOME>
/swagger-resource-migration)
. Configure
<APIM_1.7.0_HOME>/swagger-resource-migration/build.xml
file with the following properties:
Property Description registry.home Path to the APIM distribution. In a distributed setup, give the API Publisher node's path. username Username for the server. For a tenant to log in, provide the tenant admin username. password Password for the server. For a tenant to log in, provide the tenant admin password. host IP of the running APIM server. In a distributed setup, give the host of the API Publisher node. port Port of the running APIM server. In a distributed setup, give the port of the APIM Publisher node. version Version of the server. Using the command line, go to
<APIM_1.7.0_HOME>/swagger-resource-migration
folder and executeant run.
If the above configuration is successful, you get aBUILD SUCCESSFUL
message. It modifies the structure of Swagger content in the registry.Upgrading tenants
- If you have multiple tenants added to your API Manager instance, follow the steps below to migrate tenant configurations:
- Copy the contents from your previous
<APIM_HOME>/repository/tenants
directory to the same directory in the API Manager 1.7.0. - Execute steps 5 to 7 for all tenants in your system.
- Execute steps 9 to 11 for all tenants in your system.
Upgrading external stores
- Copy the contents from your previous
If you have external stores configured under the
<ExternalAPIStores>
element in<APIM_1.6.0_HOMe>/repository/conf/api-manager.xml
file, follow the steps below:Log in to APIM 1.7.0 management console and click the Resources -> Browse menu.
Load
/_system/governance/apimgt/externalstores/external-api-stores.xml
resource in the registry browser UI, configure your external stores there and save.
Upgrading Google analytics
If you have Google Analytics configured under
<GoogleAnalyticsTracking>
element in<APIM_1.6.0_HOME>/repository/conf/api-manager.xml
file, follow the steps below:Log in to APIM 1.7.0 management console and go to Resources -> Browse menu.
Load
/_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 under
<WorkFlowExtensions>
element in<APIM_1.6.0_HOME>/repository/conf/api-manager.xml
file, follow the steps below:Log in to APIM 1.7.0 management console and go to Resources -> Browse menu.
Load
/_system/governance/apimgt/applicationdata/workflow-extensions.xml
resource in the registry browser UI, configure your workflows and save.