The following steps describe how to upgrade WSO2 Application Server from version 5.2.1 to 5.3.0. To upgrade from a version older than 5.2.1, start from the documentation that was released immediately after your current release and upgrade incrementally. For more information on release versions, see the Release Matrix.
The instructions on this page takes you through the steps for upgrading from AS 5.2.1 to AS 5.3.0. This includes upgrading the database changes as well as the configurations that should follow the upgrade.
You cannot rollback the upgrade process. However, It is possible to restore a backup of the previous database and restart the upgrade progress.
Preparing to upgrade
The following prerequisites must be completed before upgrading:
Make a backup of the user and registry databases of AS 5.2.1
Make a backup of
<AS_HOME_5.2.1>
folder to backup the product configurations.Download WSO2 Application Server 5.3.0 from http://wso2.com/products/application-server/.
The downtime is limited to the time taken for switching databases when in the production environment.
Upgrading the database/registry
There are no registry and user database schema changes between AS 5.2.1 and 5.3.0. Therefore, you do not need to do any database schema migration.
Migrating the configurations
The following topics explain the configuration changes that need to be updated for AS 5.3.0:
Updating the configuration files
The following are the updates that need to be done to the configuration files in AS 5.3.0.
Note that configuration files should not be copied directly between servers.
- Create a new database for AS 5.3.0 and restore the backup of the old database in this new database.
- To connect AS 5.3.0 to the upgraded database, configure the following files:
Configure the
<AS_HOME_5.3.0>/repository/conf/datasources/masterdatasources.xml
file as shown in the following example:<datasource> user manager</description> <name>WSO2_CARBON_DB</name> <description>The datasource used for registry and <jndiConfig> <name>jdbc/WSO2CarbonDB</name> </jndiConfig> <definition type="RDBMS"> <configuration> <url>jdbc:mysql://localhost:3306/<new_database></url> <username>username</username> <password>password</password> <driverClassName>com.mysql.jdbc.Driver</driverClassName> <maxActive>80</maxActive> <maxWait>60000</maxWait> <minIdle>5</minIdle> <testOnBorrow>true</testOnBorrow> <validationQuery>SELECT 1</validationQuery> <validationInterval>30000</validationInterval> </configuration> </definition> </datasource>
Go to the
<AS _HOME_5.3.0>/repository/conf/
directory and update the datasource references in theuser-mgt.xml
andregistry.xml
files to match the updated configurations in themasterdatasources.xml
file. The following are sample configurations if the datasource is “jdbc/WSO2CarbonDB”:
registry.xml<dbConfig name="wso2registry"> <dataSource>jdbc/WSO2CarbonDB</dataSource> </dbConfig>
usermgt.xml
<UserManager> <Realm> <Configuration> ... <Property name="dataSource">jdbc/WSO2CarbonDB</Property> </Configuration> ... </Realm> </UserManager>
- Data services feature is no longer shipped with WSO2 Application Server. If you need to use the data services hosting feature, you have two options:
Install the Data Services hosting feature from the public p2-repo. See Installing Features for instructions.
Use the WSO2 Data Services Server product which can be downloaded from http://wso2.com/products/data-services-server/. See the About this Release page to check if the latest WSO2 DSS is compatible with the current AS version.
- The configurations for SaaS web applications has changed in AS 5.3.0. In previous releases, SaaS configurations were enabled in the
web.xml
file of the web application by adding a context-param calledcarbon.enable.saas
. In AS 5.3.0, SaaS is configured via thecontext.xml
file that needs to be placed under theMETA-INF/
folder of the web application. See more details about configuring SaaS applications in AS 5.3.0 from here. Prior to AS 5.3.0, the primary keystore configured in the
carbon.xml
file was used for securing transports. In AS 5.3.0, the keystore used for transports should be separately configured in thecatalina-server.xml
file.The “RegistryKeyStore” configuration in
carbon.xml
is removed. See the section on configuring keystores for more information.- Check for any other configurations that were done for AS 5.2.1 (based on your solutions), and update the configuration files in AS 5.3.0 accordingly. For example, external user stores, caching, mounting, etc.
Migrating third party libraries
If there are third party libraries used with AS 5.2.1 that you want to migrate, copy them to the following directories in AS 5.3.0 as applicable.
- If you have used JDBC drivers etc, copy them to the
<AS_HOME>/repository/components/lib
directory. - If you have used OSGi bundles such as SVNKit etc, copy them to the
<AS_HOME>/repository/components/dropins
directory.
Migrating the services and artifacts
You can migrate all artifacts relevant to the super tenant as well as the ordinary tenants by copying the following directories from the old server to the new server.
To migrate the super tenant’s artifacts, copy the
<AS_HOME>/repository/deployment/server/
directory from AS 5.2.1 to AS 5.3.0.If you are using multitenancy, copy the
<AS_HOME>/repository/tenants
directory from AS 5.2.1 to AS 5.3.0.Since the Axis2 Quality of Services UI to apply policies such security has been removed from the management console, users need to use alternative mechanisms and apply the policies for their services. For Axis2 AAR services, the policies can be applied through the services.xml.
In AS 5.3.0, it is not possible to globally engage modules using the management console. Therefore, you need to update the
axis2.xml
file in the<AS_HOME>/repository/conf/axis2
directory as shown below. You can find more information on engaging modules for axis2 services from here.<axisconfig name="AxisJava2.0"> <module ref=”addressing”/> .... </axisconfig>
Testing the upgrade
- When the database upgrade scripts are executed, the following are some of the new tables that will be created in the database:
- UM_DOMAIN
- UM_SYSTEM_USER
- UM_SYSTEM_ROLE
- UM_SYSTEM_USER_ROLE
- Verify that all the required scenarios are working as expected as shown below. This confirms that the upgrade is successful.
Start the AS 5.3.0 server instance once the configurations are done.
Make sure that the server starts up fine without any errors.
- Test the deployed artifacts:
Log in to the management console as the super tenant.
Navigate to Main -> Applications -> List.
Verify the web application list shown there.
Invoke a web application to verify that it works.
Then, navigate to Main -> Services -> List.
Verify the services list shown there.
Invoke a service to verify that it works.
Then, navigate to Main -> Carbon Applications -> List.
- Verify the CApp list shown there.
Verify that the Users and Roles are picked up:
Navigate to Configure -> Accounts & Credentials -> Users and Roles
Verify that the list of users and roles are shown correctly.
- View the permissions of a chosen role, and make sure that the permissions are correct.
If you are using multitenancy,
Log in to the management console using the super tenant credentials.
Navigate to Configure -> View Tenants.
Verify the tenant list shown there.
- Then, log in to the system as a tenant and make sure that the log in is successful.