Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The following steps illustrate how to upgrade App Manager 1.1.0 to 1.2.0. Product migrations steps are given based on configuration migration and server upgrade.

To upgrade from 1.0.0 to 1.2.0, follow the instructions on upgrading from the previous release for 1.0.0 and then follow the instructions below on upgrading the server to 1.2.0.

Migrating the configurations

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

  1. Shut down App Manager 1.0.0 if it is running.

  2. Back up all the databases in your current App Manager deployment.

  3. Back up the synapse configurations of all the tenants, including the carbon super tenant. The synapse configurations of the super tenant resides in the <APPM_1.1.0_HOME>/repository/deployment/server/synapse-configs/default directory. The synapse configurations of tenants can be found in the <APPM_1.1.0_HOME>/repository/tenants directory. 
    In a distributed/clustered setup, these synapse configurations are available in the App Gateway nodes.

  4. Download App Manager 1.2.0 from http://wso2.com/products/app-manager/.
  5. Open the <APPM_1.2.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 current App Manager instance already being used. 

    • User Store database

    • Registry database

    • App Manager database

    • Social database

    • Storage database
  6. Refer to the configuration shown below in the <APPM_1.1.0_HOME>/repository/conf/registry.xml file and update the registry configuration in the <APPM_1.2.0_HOME>/repository/conf/registry.xml file accordingly.
    In a distributed/clustered setup, do the following configuration update only in the Store and Publisher nodes.

    <dbConfig name="govregistry">
      <dataSource>jdbc/WSO2REG_DB</dataSource>
    </dbConfig>
    <remoteInstance url="https://publisher.appm-wso2.com">
       <id>gov</id>
       <cacheId>user@jdbc:mysql://regdb.mysql-wso2.com:3306/regdb</cacheId>
       <dbConfig>govregistry</dbConfig>
       <readOnly>false</readOnly>
       <enableCache>true</enableCache>
       <registryRoot>/</registryRoot>
    </remoteInstance>
    <mount path="/_system/governance" overwrite="true">
       <instanceId>gov</instanceId>
       <targetPath>/_system/governance</targetPath>
    </mount>
    <mount path="/_system/config" overwrite="true">
       <instanceId>gov</instanceId>
       <targetPath>/_system/config</targetPath>
    </mount>
  7. Refer to the configuration shown below in the <APPM_1.1.0_HOME>/repository/conf/user-mgt.xml file and update the configuration in the <APPM_1.1.0_HOME>/repository/conf/user-mgt.xml file accordingly. Optionally, you can copy the configurations from the same file in the current App Manager instance already being used.
    In a distributed/clustered setup, this particular configuration should be applied to all nodes (Store, Publisher and Gateway).

    <configuration> 
    ...
        <Property name="dataSource">jdbc/WSO2UM_DB</Property>
    </configuration>
    ...
    <UserStoreManager class="org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager">
    ...
    </UserStoreManager>
  8. Refer to the following configurations in the <APPM_1.1.0_HOME>/repository/conf/app-manager.xml file and update those configurations in the <APPM_1.2.0_HOME>/repository/conf/app-manager.xml file.

    • AuthManager Configuration
      In a distributed/clustered setup, this configuration should be applied to the Store, Publisher and Gateway nodes. 

      <AuthManager>
                  <ServerURL>https://<IP of the IDP>:9443/services/</ServerURL>
              <Username>admin</Username>
                  <Password>admin</Password>
      </AuthManager>
    • APIGateway Configuration
      In a distributed/clustered setup, this configuration should be applied to the Store, Publisher and Gateway nodes. In the Store and Gateway nodes, configuring the <GatewayEndpoint> property is mandatory. In the Publisher nodes, configuring the <ServerURL> property is mandatory.

      <APIGateway>
          <Environments>
                      <Environment type="hybrid">
                              ...
                              <ServerURL>https://<IP of the Gateway>:9443/services/</ServerURL>
                              <Username>admin</Username>
              <Password>admin</Password>
                              <GatewayEndpoint>http://<IP of the Gateway>:8280 ,https://<IP of the Gateway>:8243</GatewayEndpoint>
                      </Environment>
              </Environments>
      ...
      </APIGateway>
    • SSO Configuration
      In a distributed/clustered setup, this configuration should be applied to the Store, Publisher and Gateway nodes.

      <SSOConfiguration>
           <IdentityProviderUrl>
      https:/<IP of the IDP>:9443/samlsso
          </IdentityProviderUrl>
         <Configurators>
                  <Configurator>
                      ...
                      <parameters>
                          <providerURL>https:/<IP of the IDP>:9443</providerURL>
                          <username>admin</username>
                          <password>admin</password>
                      </parameters>
              </Configurator>            	
              ...  	
          </Configurators>
      </SSOConfiguration>
    • Analytics
      If Webapp statistics are enabled in the <APIUsageTracking> section in the current setup, map and move those config element values to the <Analytics> configuration shown below. 

      <!--
          API usage tracker configuration used by the BAM data publisher and
          Google Analytics publisher in API gateway.
          -->
          <Analytics>
      <UIActivityPublishDataSourceName>...</UIActivityPublishDataSourceName>
      <UIActivityBAMPublishEnabled>false</UIActivityBAMPublishEnabled>
      <Enabled>false</Enabled>
            <CacheStatsEnabled>false</CacheStatsEnabled>
       <PublisherClass>org.wso2.carbon.appmgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher</PublisherClass>
      <ThriftPort>7612</ThriftPort>
      <BAMServerURL>tcp://localhost:7612/</BAMServerURL>
      <BAMUsername>admin</BAMUsername>
             <BAMPassword>admin</BAMPassword>
      <BAMEventStreams>....</BAMEventStreams>
      <DataSourceName>jdbc/WSO2AM_STATS_DB</DataSourceName>
      ...
          </Analytics>
  9. In App Manager 1.1.0, the <JDBCPersistenceManager> datasource configuration shown below can be found in both the <APPM_1.1.0>/repository/conf/security/application-authentication.xml file and the <APPM_1.1.0>/repository/conf/identity.xml file. However, in App Manager 1.2.0, this configuration has been moved to the <APPM_1.2.0_HOME>/repository/conf/identity/identity.xml file. Therefore, refer to the datasource configuration in the <APPM_1.1.0>/repository/conf/identity.xml file and update the JDBCPersistenceManager configuration in the <APPM_1.2.0_HOME>/repository/conf/identity/identity.xml file accordingly.

    <JDBCPersistenceManager>
            <DataSource>
                <!-- Include a data source name (jndiConfigName) from the set of data
                    sources defined in master-datasources.xml -->
                <Name>jdbc/WSO2AM_DB</Name>
            </DataSource>
        </JDBCPersistenceManager>
  10. If clustering is enabled for a distributed setup, refer to the clustering configurations shown below in the <APPM_1.1.0_HOME>/repository/conf/axis2/axis2.xml file and update the <APPM_1.2.0_HOME>/repository/conf/axis2/axis2.xml file accordingly. In a distributed/clustered setup, refer to the Publisher, Store and Gateway axis2 configuration and update the new configuration.

    <clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent" enable="true">
    <parameter name="membershipScheme">wka</parameter>
    <parameter name="domain">wso2.pub.store.domain</parameter>
    <parameter name="localMemberHost">192.168.10.1</parameter>
    <parameter name="localMemberPort">4000</parameter>
    <members>
       <member>
           <hostName>192.168.10.2</hostName>
           <port>4000</port>
       </member>
    </members>
    </clustering>
  11. Refer to the SSO configuration shown below in the <APPM_1.1.0_HOME>/repository/deployment/server/jaggeryapps/publisher/config/publisher.json file and map and move the configurations into the <APPM_1.2.0_HOME>/repository/deployment/server/jaggeryapps/publisher/config/publisher.json file. In a distributed/clustered deployment, perform this action in the Publisher nodes only.

    "ssoConfiguration": {
            "enabled": true,
            "issuer": "publisher",
            "identityProviderURL": "https://localhost:9444/samlsso",
            "keyStorePassword": "wso2carbon",
            "identityAlias": "wso2carbon",
            "responseSigningEnabled": "true",
            "publisherAcs": "https://localhost:9446/publisher/acs",
            "keyStoreName": "/repository/resources/security/wso2carbon.jks"
    }
  12. Refer to the SSO configuration shown below in the <APPM_1.1.0_HOME>/repository/deployment/server/jaggeryapps/store/config/store.json file and map and move the configuration into the <APPM_1.2.0_HOME>/repository/deployment/server/jaggeryapps/store/config/store.json file. In a distributed/clustered setup, perform this action in the Store nodes only.

    "ssoConfiguration": {
            "enabled": true,
            "issuer": "store",
            "identityProviderURL": "%https.host%/samlsso",
            "keyStorePassword": "wso2carbon",
            "identityAlias": "wso2carbon",
            "responseSigningEnabled": "true",
            "storeAcs" : "%https.host%/store/acs",
            "keyStoreName": "/repository/resources/security/wso2carbon.jks"
        },
  13. Refer to SSO configuration below in the <APPM_1.1.0_HOME>/repository/deployment/server/jaggeryapps/social/config/social.json file and map and move the configuration into the <APPM_1.2.0_HOME>/repository/deployment/server/jaggeryapps/social/config/social.json file. In a distributed/clustered setup, perform this action in the Store nodes only.

    "ssoConfiguration": {
            "enabled": true,
            "issuer": "social",
            "identityProviderURL": "%https.carbon.local.ip%/samlsso",
            "keyStorePassword": "wso2carbon",
            "identityAlias": "wso2carbon",
            "responseSigningEnabled": "true",
            "storeAcs" : "%https.host%/store/acs.jag",
            "keyStoreName": "/repository/resources/security/wso2carbon.jks"
        },
  14. Check for any other configurations that were done for App Manager 1.1.0 based on your deployment and update the new deployment configurations according to the previous configurations. For example, refer to the app-manager.xml file, carbon.xml file, axis2.xml file, etc. in the <APPM_1.1.0_HOME>/repository/config directory and move those configurations into the same file in App Manager 1.2.0. For more information on configuring App Manager distributed deployments, see the App Manager clustering documentation.

    In a distributed/clustered setup, complete the two steps given below only in the App Manager Gateway nodes.

  15. Move all your synapse configurations, except the files mentioned below, by copying and replacing the <APPM_1.1.0_HOME>/repository/deployment/server/synapse-configs/default directory with the <APIM_1.2.0_HOME>/repository/deployment/server/synapse-configs/default directory.
    • /api/_AuthorizeAPI_.xml

    • /api/_RevokeAPI_.xml

    • /api/_TokenAPI_.xml

    • /api/_StatisticsAPI.xml
  16. Similarly, move your tenant synapse configurations to App Manager 1.2.0. by copying and replacing the backed up tenant folders in the <APPM_1.1.0>/repository/tenants directory with the <APPM_1.2.0>/repository/tenants directory.

Upgrading the App Manager to 1.2.0

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

  2. 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.
  3. Copy relevant database drivers to <APPM_1.1.0>/repository/components/lib directory.

  4. 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/ fol der ( shown as 1,2,...). In a distributed/clustered setup, these synapse configurations are available in App Gateway nodes.
  5. 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.

  6. Download the Migration appm-1.0.0-to-1.1.0-migration-client.zip

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

    <datasource>
            ...
            <jndiConfig>
                <name>jdbc/WSO2AM_DB</name>
            </jndiConfig>
            <definition type="RDBMS">
                <configuration>
                    ...
                    <username>xxxxxx</username>
                    <password>xxxxxx</password>
                    ...
                </configuration>
             </definition>
    </datasource>
    
  8. 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. 

  9. 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 requirementOption commandExample
    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.0Start 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.0Start 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.0Start the product with this command. eg:   ./ wso2server.sh -DmigrateDB=true  -DmigrateToVersion=1.1.0


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

  11. Navigate to Extentions (tab) Configure --> Artifact Types and select the Artifact type 'webapp' and add the following line after <nameAttribute> and save.        

    <lifecycle>WebAppLifeCycle</lifecycle>
  12. 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).

  13. Restart the server.
 
  • No labels