WSO2 Complex Event Processor is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.

Versions Compared

Key

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

This section provides information on how you can upgrade from WSO2 CEP 4.1.0 to WSO2 CEP 4.2.0. For more information on release versions, see the Release Matrix.

Note

You cannot roll back the upgrade process. However, it is possible to restore a backup of the previous database so that you can restart the upgrade progress.

Table of Contents
maxLevel3
minLevel3

Preparing to upgrade

The following prerequisites should be completed  before upgrading.

Migrating configurations

Follow the procedure below to migrate configurations from CEP 4.1.0 to CEP 4.2.0.

...

  1. Make the required changes in the datasource files in the <CEP_HOME>/repository/conf/datasources directory to make sure that they are configured as required. For more information, see Datasources.
  2. Check the configurations in the following files in <CEP_HOME>/repository/conf/data-bridge directory for CEP 4.1.0, and apply the same changes in CEP 4.2.0.
    • data-agent-config.xml
    • data-bridge-config.xml
  3. Check the configurations in the following files in CEP 4.1.0, and apply same configurations in CEP 4.2.0. 

    Configuration FileLocation
    axis2.xml<CEP_HOME>/repository/conf/axis2
    axis2_client.xml<CEP_HOME>/repository/conf/axis2
    carbon.xml<CEP_HOME>/repository/conf
    master-datasources.xml<CEP_HOME>/repository/conf/datasources
    identity.xml<CEP_HOME>/repository/conf
    log4j.properties<CEP_HOME>/repository/conf
    registry.xml<CEP_HOME>/repository/conf
    catalina-server.xml<CEP_HOME>/repository/conf/tomcat
    web.xml<CEP_HOME>/repository/conf/tomcat
  4. If the Cipher tool was configured for CEP 4.1.0, check the configurations in the following files and apply the same changes in CEP 4.2.0.

    Configuration FileLocation
    cipher-text.properties<CEP_HOME>/repository/conf/security
    cipher-tool.properties<CEP_HOME>/repository/conf/security
  5. Check the configurations in the other files located in the <CEP 4.1.0_HOME>/repository/conf directory and apply the same changes to CEP 4.2.0.
  6. If there are any third party libraries used with CEP 4.1.0 that you want to migrate, copy the following directories as applicable from CEP 4.1.0 to CEP 4.2.0.
    • If you have used JMS libraries, JDBC libraries etc, copy <CEP_HOME>/repository/components/lib.
    • If you have used OSGi bundles such as SVN kit etc, copy <CEP_HOME>/repository/components/dropins.
  7. Start the CEP 4.2.0 server. For more information, see Running the Product.

Migrating artifacts

All artifacts can be migrated from CEP 4.1.0 to CEP 4.2.0 via Composite Application Archive (CAR) files. For detailed instructions package artifacts as C-App archives, see Packaging Artifacts as C-App Archive.

...

Info

To migrate deployment artifacts:

  • Copy the <CEP_HOME>/repository/deployment/server directory from CEP 4.1.0 to CEP 4.2.0.
  • If multi-tenancy is used, copy the <CEP_HOME>/repository/tenants directory from CEP 4.1.0 to CEP 4.2.0.

Updating execution plans

WSO2 CEP 4.2.0 uses Siddhi 3.1.2 whereas CEP 4.1.0 uses Siddhi 3.0.5.

...

Code Block
languagesql
from TempStream[temp > 30.0]#window.time(1 min) as T  join RegulatorStream[isOn == false]#window.length(1) as R
  on T.roomNo == R.roomNo
select T.roomNo, R.deviceID, 'start' as action
insert into RegulatorActionStream;

 

Migrating dashboard elements

This section covers the additional steps are required to migrate dashboard elements (i.e. gadgets and dashboards).

...

Localtab Group
Localtab
titleUsing CAR files

Follow the procedure below to migrate gadgets and dashboards using CAR files.

Info

This method is appropriate when the dashboard elements to be migrated are deployed via a CAR file in CEP 4.1.0.

  1. Open the <CEP_HOME>/migration/dashboard/migration1.0x-2.0.x/migration.xml file, and comment out the Portal File Migration section as shown in the example below.

    Code Block
    languagexml
            <!-- Portal File Migration-->
            <!-- Uncomment the below part to enable Portal migration -->
    
            <!-- DSMmigration-->
    
                <!-- Mode - Specifiy the migration type CAR or Portal -->
                <!-- Mode>Portal</Mode-->
    
                <!-- SourceDir - Specify the older PRODUCT_HOME direcotory.-->
                <!-- <SourceDir></SourceDir> -->
    
                <!-- DestinationDir - Specify the destination directory for migrated Store and Dashboards -->
                <!-- <DestinationDir></DestinationDir>-->
    
                <!-- TrustStoreLocation - Specify the trustedstore location. EX:- PRODUCT_HOME/repository/resources/security/wso2carbon.jks -->
                <!-- <TrustStoreLocation>YOUR_PRODUCT_HOME/repository/resources/security/wso2carbon.jks</TrustStoreLocation> -->
    
                <!-- TrustStorePassword - Specify the trustedstore password. EX:- wso2carbon -->
                <!-- <TrustStorePassword>wso2carbon</TrustStorePassword> -->
    
                <!-- SourceURL - Specify the source url - Older version of your product . EX:-https://hostname:port -->
                <!-- <SourceURL>https://localhost:9443</SourceURL> -->
    
                <!-- SourceUsername - Specify the carbon.super user's username EX:-admin -->
                <!-- <SourceUsername>admin</SourceUsername> -->
    
                <!-- SourcePassword - Specify the carbon.super user's password EX:-admin -->
                <!-- <SourcePassword>admin</SourcePassword> -->
    
                <!-- DestinationURL - Specify the destination url - Newer version of your product. EX:-https://hostname:port -->
                <!-- <DestinationURL>https://localhost:9444</DestinationURL> -->
    
                <!-- DestinationUsername - Specify the carbon.super user's username EX:-admin -->
                <!-- <DestinationUsername>admin</DestinationUsername> -->
    
                <!-- DestinationPassword - Specify the carbon.super user's password EX:-admin -->
                <!-- <DestinationPassword>admin</DestinationPassword> -->
    
                <!-- TenantDomains - Specify the tenant domain - This will migrate all the dashboards within these tenants. If you do not put anything here, It will update all the tenant dashboards -->
                <!-- <TenantDomains></TenantDomains>-->
            <!-- </DSMigration> -->
  2. Run the following command to run the migration script.
    For Windows: <CEP-4.1.0_HOME>/migration/dashboards/migration-1.0.x-2.0.x/ds-migration-1.0.x-2.0.x.bat --run
    For Linux: <CEP-4.1.0_HOME>/migration/dashboards/migration-1.0.x-2.0.x/ds-migration-1.0.x-2.0.x.sh
  3. Pack the required gadgets and dashboards in WSO2 CEP 4.1.0 to a CAR file and deploy it in WSO2 CEP 4.2.0. For more information, see Packaging Artifacts as C-App Archive.
  4. Perform the following steps for each gadget.

    Info

    <DESTINATION_DIRECTORY> is the directory you specified for the DestinationDir parameter in the Portal File Migration section of the <CEP_HOME>/migration/dashboard/migration1.0x-2.0.x/migration.xml file.

     

    1. Navigate to the home directory of the gadget. (e.g., <DESTINATION_DIRECTORY>/store/carbon.super/fs/gadget/my_gadget).
    2. Replace the <DESTINATION_DIRECTORY>/store/carbon.super/fs/gadget/my_gadget/js/main.js file with the <CEP_HOME>/migration/dashboards/migration-1.0.x-2.0.x/resources/main.js file.
    3. Similarly, replace the <DESTINATION_DIRECTORY>/store/carbon.super/fs/gadget/my_gadget/js/outputAdapterUiLibrary.js file with <CEP_HOME>/migration/dashboards/migration-1.0.x-2.0.x/resources/outputAdapterUiLibrary.js file.

 

 

Localtab
titlePointing to the product home directory

In this approach the product home directory is defined as the source file. It migrates gadgets, layouts and widgets into the newer CEP version and copies them into the destination location specified by you.

Follow the procedure below to migrate gadgets and dashboards using the Portal.

  1. Open the <CEP_HOME>/migration/dashboard/migration1.0x-2.0.x/migration.xml file, and comment out the CAR File Migration section as shown in the example below.

    Code Block
    languagexml
    <!-- CAR File Migration-->
    <!-- Uncomment the below part to enable CAR file migration -->
    <!--DSMigration>
        <!-- Mode - Specifiy the migration type CAR or Portal -->
        <Mode>CAR</Mode>
        <!-- SourceDir - Specify the older PRODUCT_HOME direcotory.-->
        <SourceDir>CAR_FILE_SOURCE_DIRECTORY</SourceDir>
        <!-- DestinationDir - Specify the destination directory for migrated Store and Dashboards -->
        <DestinationDir>CAR_FILE_DESTINATION_DIRECTORY</DestinationDir>
    </DSMigration-->
  2. Configure the parameters in the Portal File Migration section as explained in the table below.

    ParameterDescriptionExample
    ModeThe migration mode. This should be CAR (if you are migrating the dashboard elements in the CAR file), or Portal (if you are migrating the dashboard elements in via the portal). 
    SourceDirThe source of the dashboard elements to be migrated. The <CEP_4.1.0_HOME> should be specified as the source directory. 
    DestinationDirThe destination directory for the migrated Store. 
    TrustStoreLocationThis parameter specifies the trusted store location.<CEP_HOME>/repository/resources/security/wso2carbon.jks
    TrustStorePasswordThe password of the trust store.ashboardwso2carbon
    SourceURLThe source URL. This should be the URL of the CEP 4.1.0 instance from which you are migrating the dashboard elements. https://hostname:port
    SourceUsernameSpecify the username of the carbon super user.admin
    SourcePasswordSpecify the password of the carbon super user.admin
    DestinationURLThe destination URL. This should be the URL of the CEP 4.2.0 to which you are migrating the dashboard elements. https://hostname:port
    DestinationUsernameSpecify the username of the carbon super user. admin
    DestinationPasswordSpecify the password of the carbon super user.admin
    TenantDomainsThis parameter specifies the domains of all the tenants of whom the dashboards should be updated. If no value is specified for this parameter, the dashboards of all the tenants are updated. 

    The parameters that are required to have values depend on which dashboard elements you need to migrate as explained in the table below.

    OptionDescriptionRequired ParametersConfiguration
    1Convert gadgets, widgets, and layouts in CEP 4.1.0 into the newer version (i.e. based on WSO2 Dashboard Server 2.x.x) and copy them into the destination directory. This allows you to merge the migrated store into the newer version of the CEP dashboards store.
    • Mode
    • SourceDir
    • DestinationDir
    Code Block
    languagexml
    <DSMmigration>
        <Type>Portal</Type>
        <SourceDir>YOUR_PRODUCT_HOME</SourceDir>
        <DestinationDir>YOUR_DESTINATION_DIRECTORY</DestinationDir>
    <TrustStoreLocation></TrustStoreLocation>
        <TrustStorePassword></TrustStorePassword>
        <SourceURL></SourceURL>
        <SourceUsername></SourceUsername>
        <SourcePassword></SourcePassword>
        <DestinationURL></DestinationURL>
        <DestinationUsername></DestinationUsername>
        <DestinationPassword></DestinationPassword>
        <TenantDomains></TenantDomains>
    </DSMigration>
    2Convert gadgets, widgets, and layouts in CEP 4.1.0 into the newer version (i.e. based on WSO2 Dashboard Server 2.x.x) and copy them into the destination directory. In addition, get all the dashboards to reside in your source server (specified via the sourceURL parameter) and migrate it to the newer version. Once migration is done, it is copied into the destination directory defined in the migration.xml file. 
    • Mode
    • SourceDir
    • DestinationDir
    • TrustStoreLocation
    • TrustStorePassword
    • SourceURL
    • SourceUsername
    • SourcePassword
     
    Code Block
    languagexml
    <DSMmigration>
        <Type>Portal</Type>
        <SourceDir>YOUR_PRODUCT_HOME</SourceDir>
        <DestinationDir>YOUR_DESTINATION_DIRECTORY</DestinationDir>
    <TrustStoreLocation>YOUR_PRODUCT_HOME/repository/resources/security/wso2carbon.jks</TrustStoreLocation>
        <TrustStorePassword>wso2carbon</TrustStorePassword>
        <SourceURL>https://localhost:9443</SourceURL>
        <SourceUsername>admin</SourceUsername>
        <SourcePassword>admin</SourcePassword>
        <DestinationURL></DestinationURL>
        <DestinationUsername></DestinationUsername>
        <DestinationPassword></DestinationPassword>
        <TenantDomains></TenantDomains>
    </DSMigration>
    3

    Convert gadgets, widgets, and layouts in CEP 4.1.0 into the newer version (i.e. based on WSO2 Dashboard Server 2.x.x) and copy them into the destination directory. Update the dashboards in the server specified by the DestinationURL.

    Info

    This requires you to maintain the same trust store location and the trust password in both CEP versions.

    • Mode
    • SourceDir
    • DestinationDir
    • TrustStoreLocation
    • TrustStorePassword
    • SourceURL
    • SourceUsername
    • SourcePassword
    • DestinationURL
    • DestinationUsername
    • DestinationPassword
    Code Block
    languagexml
    <DSMmigration>
        <Type>Portal</Type>
        <SourceDir>YOUR_PRODUCT_HOME</SourceDir>
        <DestinationDir>YOUR_DESTINATION_DIRECTORY</DestinationDir>
    <TrustStoreLocation>YOUR_PRODUCT_HOME/repository/resources/security/wso2carbon.jks</TrustStoreLocation>
        <TrustStorePassword>wso2carbon</TrustStorePassword>
        <SourceURL>https://localhost:9443</SourceURL>
        <SourceUsername>admin</SourceUsername>
        <SourcePassword>admin</SourcePassword>
        <DestinationURL>https://localhost:9444</DestinationURL>
        <DestinationUsername>admin</DestinationUsername>
        <DestinationPassword>admin</DestinationPassword>
        <TenantDomains></TenantDomains>
    </DSMigration>
  3. Run the following command to run the migration script.
    For Windows: <CEP-4.1.0_HOME>/migration/dashboards/migration-1.0.x-2.0.x/ds-migration-1.0.x-2.0.x.bat --run
    For Linux: <CEP-4.1.0_HOME>/migration/dashboards/migration-1.0.x-2.0.x/ds-migration-1.0.x-2.0.x.sh
  4. Perform the following steps for each gadget.

    Info

    <DESTINATION_DIRECTORY> is the directory you specified for the DestinationDir parameter in the Portal File Migration section of the <CEP_HOME>/migration/dashboard/migration1.0x-2.0.x/migration.xml file.

     

    1. Navigate to the home directory of the gadget. (e.g., <DESTINATION_DIRECTORY>/store/carbon.super/fs/gadget/my_gadget).
    2. Replace the <DESTINATION_DIRECTORY>/store/carbon.super/fs/gadget/my_gadget/js/main.js file with the <CEP_HOME>/migration/dashboards/migration-1.0.x-2.0.x/resources/main.js file.
    3. Similarly, replace the <DESTINATION_DIRECTORY>/store/carbon.super/fs/gadget/my_gadget/js/outputAdapterUiLibrary.js file with <CEP_HOME>/migration/dashboards/migration-1.0.x-2.0.x/resources/outputAdapterUiLibrary.js file.
Validating path changes

CEP 4.2.0 has a different directory structure to CEP 4.1.0 that affects the path to the gadget store as shown below.

...

<script language="javascript" type="text/javascript" src="../../../../../js/igviz.js"></script>

Updating layout configurations

The dashboard layout configurations are defined in the index.xml file. This file differs as follows based on the CEP version.

...

e.g., { "id": "a", "row": 1, "col": 1, "size_x": 4, "size_y": 3 } should be replaced with { "id": "a", "x": 0, "y": 0, "width": 4, "height": 3 }.

Testing the upgrade

Verify that all the required scenarios are working as expected. This confirms that the upgrade is successful.