This documentation is for WSO2 API Manager 1.9.0 View documentation for the latest release.
Page Comparison - Upgrading from the Previous Release (v.26 vs v.27) - API Manager 1.9.0 - WSO2 Documentation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this section, you move all existing API Manager configurations from the current environment to the new one.

  1. Back up the databases in your API Manager instances and synapse configs in of all the tenants, including the super tenant. You find the synapse configs in <APIM_1.8.0_HOME>/repository/deployment/server/synapse-config/default.

  2. Open the <APIM_1.9.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.8.0 instance.

    • User Store
    • Registry database
    • API Manager Databases
  3. Edit the registry configurations in the <APIM_1.9.0_HOME>/repository/config/registry.xml and the user database in the <APIM_1.9.0_HOME>/repository/conf/user-mgt.xml file.

  4. Move all your synapse configurations by copying and replacing <APIM_1.8.0_HOME>/repository/deployment/server/synapse-config/default directory to <APIM_1.9.0_HOME>/repository/deployment/server/synapse-config/default directory.

    Warning

    NOTE: Do not replace the _TokenAPI_.xml_RevokeAPI_.xml and _AuthorizeAPI_.xml files in the /default/api sub directory unless you use a custom token endpoint. They are application-specific APIs.

Upgrading

...

the API Manager from 1.8.0 to 1.9.0

  1. Download the API Manager 1.9.0 from http://wso2.com/products/api-manager.  
  2. Stop all running API Manager server instances.
  3. Back
  4. Make sure you backed up all the databases

  5. of your API Manager 1.8.0 server instance.Download
  6. and synapse configs as instructed in step 1 of the previous section.

  7. Download WSO2 API Migration Client v1.9.0.

  8. Extract
  9. and find the jar (
  10. the file you downloaded in the previous step and do the following:
    1. Copy the org.wso2.carbon.apimgt.migrate.client-1.9.0.jar
  11. ) and copy it into 
    1. file to <APIM_1.9.0_HOME>/repository/components/dropins
  12. /
    1. .
    2. Copy the migration-script folder into <APIM_1.9.0_HOME>/
  13. Change the
  14. If you are not using the MySQL database with the API Manager, change the query inside <APIM_1.9.0_HOME>/migration-scripts/18-19-migration/drop-fk.sql according to your database type

  15. NoteThe default
  16. . The scripts for each database type are given in the table below:

    Database typeScript
    MySQL No changes are required as the default drop-fk.sql
  17. file
  18.  file already contains
  19. sql
  20. the scripts for
  21. mysql and if you use mysql no need to do the 6th step
  22. MySQL.
  23. If you are running on
  24. H2
  25. change the query in drop-fk.sql to, 
  26. 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>;
  27. For Oracle 
  28. OracleSELECT 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>;
  29. For
  30. MS SQL
  31. Server 
  32. ServerSELECT 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>;
  33. For Postgresql 
  34. 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>;

  35. 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

  36. run 
  37. executed -Dmigrate=1.9

  38.  
  39. , you do not need to

  40. run Please note that if you run 
  41. execute 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
  42. Note
  43. Tip

    Tip: Note that running -Dmigrate=1.9

  44. , it
  45. migrates all the resources, including the databases, registry and the file system.

  46. 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

  1. 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

...