The following steps illustrate how to upgrade App Manager 1.0.0 to 1.1.0. Product migrations steps are given based on Configuration and Data migration.
Shutdown App Manager 1.0.0 if it is running.
Backup <APPM_1.0.0>/repository/conf folder.
Go to backed up configuration folder, open carbon.xml file and do the following changes
- Change the product 'Vesion' configuration from '1.0.0' to '1.1.0'
- Change the Server Key Configuration from 'AM' to to 'AppM'
- Change the Server Role Configuration as follows
Go to backed up configuration folder, open app-manager.xml file and do the following changes
- Change ApiManagerBamUiActivityStreamVersion value under <APIStreamNameDefinition> configuration as follows
- Remove below SignUp Configuration, since this has been moved to '/_system/governance/appmgt/applicationdata/sign-up-config.xml' configuration file in App Manager 1.1.0 Carbon registry.
- To re-index the artifacts in the registry, rename the lastAccessTimeLocation in the <APPM_1.0.0>/repository/conf/registry.xml file.
Eg: Change /_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime to /_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime_1
- Download App Manager 1.1.0 from http://wso2.com/products/app-manager/ and unzip the distribution.
Replace the <APPM_1.1.0>/repository/conf folder with the above backed up and modified conf folder of APPM 1.0.0.
Backup your WSO2 Carbon Database(User Store and Registry), App Manager Database, Jaggery Storage database and Social framework database of your App Manager 1.0.0 instance.
Now point same WSO2 Carbon Database(User Store and Registry), App Manager Database, Jaggery Storage and Social databases of your APPM 1.0.0 instance to APPM 1.1.0. (Configure <APPM_1.1.0>/repository/datasource/master-datasources.xml to point same databases configured in APPM 1.0.0). If you have successfully migrated the configurations folder of APPM 1.0.0 to APPM 1.1.0, you can omit this step, since the datasource configurations are already migrated with that.If you are using default 'WSO2CarbonDB' as the JDBCPersistenceManager datasource in <APPM_1.0.0>/repository/conf/security/application-authentication.xml, then you need to migrate the data from the Carbon datasource of APPM_1.0.0 to Carbon datasource of APPM 1.1.0.
Copy relevant database drivers to <APPM_1.1.0>/repository/components/lib directory.
- Make sure you backed up all the synapse configurations of all tenants including carbon super tenant. You will find the synapse configurations of super tenant in <APPM_1.0.0>/repository/deployment/server/synapse-configs/default folder. The synapse configurations of tenants can be found in <APPM_1.0.0>/repository/tenants/ folder (shown as 1,2,...). In a distributed/clustered setup, these synapse configurations are available in App Gateway nodes.
Move the backed up synapse configurations in APPM 1.0.0 to APPM_1.1.0. For that, copy the backed up <APPM_1.0.0>/repository/deployment/server/synapse-config/default directory to <APPM_1.1.0>/repository/deployment/server/synapse-config/default. Likewise move your tenant synapse configurations to APPM 1.1.0. For that, copy and replace the backed up tenant folders in <APPM_1.0.0>/repository/tenants/ to <APPM_1.1.0>/repository/tenants.
Download the Migration appm-1.0.0-to-1.1.0-migration-client.zip
Before you run the migration client, open the <APPM_1.1.0>/repository/conf/datasources/master-datasources.xml file, and set the <username>, and <password> elements of the WSO2AM_DB datasource config to that of a user who has permissions to create tables in the database.
For example change user credentials under username and password configurations shown below.
- Extract the file you downloaded in the previous step and do the following:
i) Copy org.wso2.carbon.appmgt.migration.client-1.1.X.jar into <APPM_1.1.0>/repository/components/dropins folder. For a clustered/distributed setup of App Manager, you need to copy this jar into all the nodes.
ii) Copy migration-1.0.0_to_1.1.0 folder into <APPM_1.1.0> home. For a clustered/distributed setup of App Manager, copy this folder into the servers who hosts the datasources.
Then you need to start the App Manager 1.1.0 with the following command line options. According to the client, data migration can be done based on your requirement with the use of below option commands.
Migration requirement Option command Example To migrate the database, registry all together. This will migrate the webapp related registry resources and databases. Ideally, this migration command option is required for a standalone pack. -Dmigrate=true -DmigrateToVersion=1.1.0 Start the product with this command. eg: ./wso2server.sh -Dmigrate=true -DmigrateToVersion=1.1.0 To migrate registry only. This will migrate the registry resources only. -DmigrateReg=true -DmigrateToVersion=1.1.0 Start the product with this command. eg: ./wso2server.sh -DmigrateReg=true -DmigrateToVersion=1.1.0 To migrate database only. This will migrate the WSO2AM_DB. Basically the required new data tables will be created once the client is executed with this command option. -DmigrateDB=true -DmigrateToVersion=1.1.0 Start the product with this command. eg: ./wso2server.sh -DmigrateDB=true -DmigrateToVersion=1.1.0
Login to admin console as the admin user and navigate to /_system/config/repository/components/org.wso2.carbon.registry/queries using registry browser. Then delete all the queries listed under "queries" collection (allTags,latest-apis,resource-by-tag,tag-summary and tagsByMediaTypeAndLifecycle). Likewise login to each tenant space and delete all the tag queries.
Navigate to Extentions (tab) Configure --> Artifact Types and select the Artifact type 'webapp' and add the following line after <nameAttribute> and save.
If you have changed the super tenant admin usernames, then navigate to /_system/governance/appmgt/applicationdata/sign-up-config.xml and change the admin credentials accordingly. If you need to enable Self Sigh-Up in the tenant store, login to admin console as the tenant admin user, then navigate to /_system/governance/appmgt/applicationdata/sign-up-config.xml and edit the file (Enter Tenant admin information, signup roles etc).
- Restart the server.