Page History
...
Upgrading APIM 1.8.0 to 1.9.0
- Download the API Manager 1.9.0 from http://wso2.com/products/api-manager.
- Stop all running API Manager server instances.
Back up the databases of your API Manager 1.8.0 server instance.
Download WSO2 API Migration Client v1.9.0
- Extract and find the jar (org.wso2.carbon.apimgt.migrate.client-1.9.0.jar) and copy it into <APIM_1.9.0_HOME>/repository/components/dropins/
Copy migration-script folder into
<APIM_1.9.0_HOME>/
Change the query inside
<APIM_1.9.0_HOME>/migration-scripts/18-19-migration/drop-fk.sql
according to your database typeNote The default drop-fk.sql file contains sql scripts for mysql and if you use mysql no need to do the 6th step.
If you are running on H2 change the query in drop-fk.sql to,
SELECT DISTINCT constraint_name FROM information_schema.constraints WHERE table_name = 'AM_APP_KEY_DOMAIN_MAPPING';
ALTER TABLE AM_APP_KEY_DOMAIN_MAPPING DROP CONSTRAINT <temp_key_name>;
For Oracle
SELECT DISTINCT constraint_name FROM user_cons_columns WHERE table_name = 'AM_APP_KEY_DOMAIN_MAPPING';
ALTER TABLE AM_APP_KEY_DOMAIN_MAPPING DROP CONSTRAINT <temp_key_name>;
For MS SQL Server
SELECT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE WHERE TABLE_NAME = 'AM_APP_KEY_DOMAIN_MAPPING' AND COLUMN_NAME='CONSUMER_KEY';
ALTER TABLE AM_APP_KEY_DOMAIN_MAPPING DROP CONSTRAINT <temp_key_name>;
For Postgresql
SELECT CONSTRAINT_NAME FROM information_schema.constraint_table_usage WHERE TABLE_NAME = 'AM_APP_KEY_DOMAIN_MAPPING';
ALTER TABLE AM_APP_KEY_DOMAIN_MAPPING DROP CONSTRAINT <temp_key_name>;
Start the API Manager 1.9.0 with the command
-Dmigrate=1.9
for database, registry and file system migrations. If you need to perform single resource migrations you can use the following commands. If you already run-Dmigrate=1.9
, you do not need to run the following commands- For database migrations run -DmigrateDB=1.9
- For registry migrations run -DmigrateReg=1.9
- For file system migrations run -DmigrateFS=1.9
Note Please note that if you run -Dmigrate=1.9, it migrates all the resources including databases, registry and file system.
To re-index the artifacts in the registry, perform the two steps given below.
a) Rename the lastAccessTimeLocation in the
<APIM_1.9.0_HOME>
/repository/conf/registry.xml
file. For example, change the/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime
registry path to/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime_1.
b) Shut down AM 1.9.0, backup and delete the
<APIM_1.9.0_HOME>
/repository/conf/solr
directory and restart the server.For a cluster
- If you use a cluster/distributed setup, then you need to copy the migration client to particular node and run -DmigrateDB=1.9 to migrate databases, -DmigrateReg=1.9 to migrate registry, -DmigrateFS=1.9 to migrate file system. You only need to copy migration-script folder into the node which hosts your databases
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.9.0. Do not replace the_TokenAPI_.xml
,_RevokeAPI_.xml
and_AuthorizeAPI_.xml
files in the/default/api
sub directory. - Start the server
Upgrading external stores
- Copy the contents from your previous
If you have external stores configured in the registry, follow the steps below:
Log in to APIM 1.9.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.9.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.9.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.