Page History
...
- Stop all running App Manager server instances.
- Make sure that you have backed up all the databases, mobile binaries and synapse configs as instructed in step 1 of the previous section.
- Download and extract the WSO2 App Manager migration client resource archive.
- Unzip wso2-appmgt-migration-client-1.2.x.zip.
Login to database server and execute SQL queries given in wso2-appmgt-migration-client-1.2.x/migration-scripts/dbscripts/constraints against the App Manager datasource. Please select the relevant sql script according to your database type.
ie : If My SQL/h2, use mysql-drop-fk.sql
If Ms SQL, use mssql-drop-fk.sql
Please note that you need to manually execute the first select query to get the constraint name in ‘APM_API_CONSUMER_APPS’ table and use the resulted constraint name in following Alter query
Code Block ALTER TABLE APM_API_CONSUMER_APPS DROP FOREIGN KEY <constraint_name>;
(This particular action is taken due to a primary key alteration done to IDN_OAUTH_CONSUMER_APPS table, during Identity Server migration. IDN_OAUTH_CONSUMER_APPS table's primary key has been used as a foreign key in APM_API_CONSUMER_APPS so that we need to drop the foreign key temporarily)
- Copy the relevant database drivers to the
<APPM_1.2.0_HOME>/repository/components/lib
folder. - Download the WSO2 Identity Server migration client. This is required to migrate the Identity and User Store Database schemas that is used by App Manager. Unzip the downloaded file to the local file system where the
wso2is-5.1.0-migration
directory is created and do the following:Copy the
wso2is-5.1.0-migration/dbscripts/migration5.0.0_to_5.1.0
directory to the<APPM_1.2.0_HOME>/dbscripts
directory.Copy the
wso2is-5.1.0-migration/dbscripts/identity/migration5.0.0SP1_to_5.1.0
directory and thewso2is-5.1.0-migration/dbscripts/identity/migration5.0.0_to_5.0.0SP1
directory to the<APPM_1.2.0_HOME>/dbscripts/identity
directory.- Copy the
wso2is-5.1.0-migration/dropins/org.wso2.carbon.is.migrate.client-5.1.0.jar
file to the<APPM_1.2.0_HOME>/repository/components/dropins
directory.
Before you run the migration client as given in the step below, open the
<APPM_1.2.0_HOME>/repository/conf/datasources/master-datasources.xml
file and set the<username>
and<password>
elements of the AM_DB JNDI table to that of a user who has permissions to alter tables in the database.For example,
Code Block <datasource> ... <definition type="RDBMS"> <configuration> ... <username>xxxxxx</username> <password>xxxxxx</password> ... </configuration> </definition> </datasource>
Tip After you are done running the migration client, you can switch these credentials back to a user with lesser privileges.
Start App Manager 1.2.0 with the
-Dmigrate -Dcomponent=identity
command line option to carry out the complete Identity and User Store DB migration. Alternatively, you can run it step by step by starting the server with the command line options given below in the following order.-DmigrateIdentityDB -Dcomponent=identity
-DmigrateUMDB -Dcomponent=identity
-DmigrateIdentityData -Dcomponent=identity
-DmigrateIdentityDBFinalize -Dcomponent=identity
-DmigrateUMData -Dcomponent=identity
Stop the server after identity migration.
- Download WSO2-CARBON-PATCH-4.4.0-0686 and apply it to all the App Manager nodes by following the instructions given in the README.txt file inside.
- If you are using any of the embedded h2 databases for WSO2AM_DB, WSO2UM_DB, WSO2REG_DB, JAGH2, or WSO2_SOCIAL_DB, please move those embedded databases into APPM 1.2.0. For that, go to <APPM_1.1.0_HOME>/repository/database folder and move the relevant database into <APPM_1.2.0_HOME>/repository/database folder (You can open to <APPM_1.1.0_HOME>/repository/conf/datasources/master-datasources.xml and get database configuration to figure out which databases are configured with embedded h2 database server)
Copy
wso2-appmgt-migration-client-1.2.x/migration-scripts/dbscripts/appmgt/1.1.0-1.2.0-migration
directory to the<APPM_1.2.0_HOME>/dbcripts/appmgt
folder.Copy
wso2-appmgt-migration-client-1.2.x/org.wso2.carbon.appmgt.migrate.client-1.2.x.jar
file to the<APPM_1.2.0_HOME>/repository/components/dropins
folder.Start App Manager 1.2.0 with the following command line options to migrate the database, registry and the file system all together or separately based on each profile.
Description Command Example To migrate the database, registry and file system all together. This migrates the webapp related registry resources, databases and synapse configurations. Ideally, this migration command option is required for a standalone pack. -Dmigrate=true -DmigrateToVersion=1.2.0 ./wso2server.sh -Dmigrate=true -DmigrateToVersion=1.2.0 To migrate the database only. This migrates the WSO2AM_DB.
Note title Distributed setup In a distributed setup, perform this action in one of the Store/Publisher/Gateway nodes where the WSO2AM_DB is configured
-DmigrateDB=true
-DmigrateToVersion=1.2.0./wso2server.sh -DmigrateDB=true
-DmigrateToVersion=1.2.0To migrate the registry only. This migrates the registry resources only.
Note title Distributed setup In a distributed setup, perform this action in one of the Store/Publisher nodes where the registry is shared
-DmigrateReg=true
-DmigrateToVersion=1.2.0./wso2server.sh -DmigrateReg=true
-DmigrateToVersion=1.2.0To migrate the file system only. This migrates the Webapp API configuration files.
Note title Distributed setup In a distributed setup, perform this action in one of the Gateway nodes where the synapse configuration files are available.
-DmigrateFS=true
-DmigrateToVersion=1.2.0./wso2server.sh -DmigrateFS=true
-DmigrateToVersion=1.2.0To migrate active tenants only.
Note title Migrate active tenants only Optional: If you have any disabled/inactive tenants in your previous version of WSO2 App Manager that you do not want to bring forward to the next version, you can use DmigrateActiveTenantsOnly flag to do a complete or registry or file system based migration for active tenants only.
-Dmigrate=true
-DmigrateToVersion=1.2.0 -DmigrateActiveTenantsOnly./wso2server.sh -Dmigrate=true -DmigrateToVersion=1.2.0 -DmigrateActiveTenantsOnly Do the following to re-index the artifacts in the registry:
Rename the
<lastAccessTimeLocation> element in the <APPM_1.2.0_HOME>/repository/conf/registry.xml
file. If you use a clustered/distributed App Manager setup, change the file in the Publisher node. 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
.Shut down the App Manager 1.2.0 server, back up and delete the
<APPM_1.2.0_HOME>/solr
directory.
Restart the server.
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.
Note If you are using gateway applications with WSO2 Identity Provider(WSO2 IS), please continue with the below steps. If you are not using gateway applications or if you are having an external Identity Server as the Identity provider, please ignore following steps on Service Provider migration.
Login to carbon console of Identity Provider Node (WSO2 Identity Server)
Go to Identity > Service Providers in the left menu and select service provider list
Now you can see the list of available service providers
Select the service provider that you need to update and click 'Edit' button. (The service provider name is composed as {webapplication name}-{webapplication-version}, so that the corresponding service provider of a given webapp can be easily identified by the name)
- You will see the Service provider detail page. Then click on 'Inbound Authentication Configuration'
- Select on 'SAML2 Web SSO Configuration' under the 'Inbound Authentication Configuration'
- Click on 'Edit' button
- In App Manager 1.2.0, a postfix can be appended to Assertion Consumer URL. The postfix configuration is there in <APPM_1.2.0_HOME>/repository/conf/app-manager.xml. Under <SSOConfiguration>, you will find following configuration, where the postfix can be configured.
Code Block <SSOConfiguration> ......... <!-- Postfix of the ACS URL --> <ACSURLPostfix>appm/acs</ACSURLPostfix> ......... </SSOConfiguration>