This section covers how to use IBM Cloud Transformation Advisor to analyze an existing traditional WebSphere application.
For this scenario the WebSphere Liberty runtime is chosen as the target runtime and the intention is to migrate this application with minimal code changes. WebSphere Liberty is a fast, dynamic, and easy-to-use Java application server, built on the open source Open Liberty project. Ideal or the cloud, Liberty is a combination of IBM technology and open source software, with fast startup times (<2 seconds), no server restarts to pick up changes, and a simple XML configuration.
This section has the following steps:
- Introduction to IBM Cloud Transformation Advisor
- Install IBM Cloud Transformation Advisor
- Scan a WebSphere Environment or use the pre-provided file
- Download the Data Collector
- Run the Data Collector
- Upload the Data Collector results
- Analyze the Recommendations
IBM Cloud Transformation Advisor helps you access, analyze and modernize middleware based apps into IBM Cloud(s). It categorizes Java EE apps and MQ queue managers as simple, medium and complex based on migration complexity and provides guidance for modernization. IBM Cloud Transformation Advisor can accelerate the process to move your on-premises apps to cloud, minimize migration errors and risks, and reduce time to market in five steps.
You can use IBM Transformation Advisor for these activities:
- Identify the Java EE programming models in an app
- Determine the complexity of apps by reviewing a high-level inventory of the content and structure of each app
- Highlight the Java EE programming model and WebSphere API differences between the profile types
- Learn any Java EE specification implementation differences that might affect the app
The tool also provides suggestions for the right-fit IBM WebSphere Application Server edition and offers advice, practices, and potential solutions to move apps to WebSphere Liberty or to newer versions of WebSphere Application Server.
If you don’t have an environment to scan a sample IBM Cloud Transformation Advisor Data Collector results file has been provided for you and you can still complete the steps in this exercise.
IBM Cloud Transformation Advisor is split in to two components (the
analysis engine and the
data collector). You can choose to between installing the
analysis engine in to an Kubernetes Cluster or locally on a machine with Docker.
If you have configured traditional WebSphere ND with the Customer Order Services application using the provided instructions then you can proceed with the
Download the Data Collector and
Run the Data Collector steps below.
Once IBM Cloud Transformation Advisor is installed, it is necessary to create a new Workspace and Collection and then download the Data Collector that will be used to examine the existing environment and applications.
Open IBM Cloud Transformation Advisor in a browser and click the button to create a new Workspace
Enter a Workspace name such as
CustomerOrderServicesand click Next
Enter a Collection name such as
WAS855_AppSrv01and click Let’s go
When the No recommendations available page is displayed, click the Data Collector button
When the Data Collector page is displayed, select the Source Operating System for your environment and click the Download button to download the Data Collector.
This results in a file with a name similar to
Upload the Data Collector zip file that was downloaded from IBM Cloud Transformation Advisor in the previous step to the machine that the WebSphere ND Deployment Manager or the Standalone WebSphere Application Server is installed. The directory used arbitrary.
Navigate to the directory you uploaded the
transformationadvisor-Linux_CustomerOrderServices_WAS855_AppSrv01.tgzfile to and issue the following commands to extract the Data Collector:mkdir datacollectorcd datacollectormv transformationadvisor-Linux_CustomerOrderServices_WAS855_AppSrv01.tgz .tar -zxvf transformationadvisor-Linux_CustomerOrderServices_WAS855_AppSrv01.tgzcd transformationadvisor-*
It is necessary to modify the scan performed by the Data Collector to include the
org.pwtepackage as the Data Collector doesn’t scan
org.*packages by default. Open the
conf/customCmd.propertiesfile and modify it as shown below:scan_opt=--excludePackages=ch.qos,com.fasterxml,com.ibm,com.informix,com.lowagie,com.mchange,com.meterware,com.microsoft,com.sun,com.sybase,freemarker,groovy,java,javax,net,oracle,sqlj,sun,twitter4j,_ibmjsp --includePackages=org.pwte#java_opt=-Xmx2g
The following command assumes that WebSphere Application Server v855 is installed to
/opt/IBM/WebSphere/AppServer855with a profile named
AppSrv01and that the administration user is
wasadminwith a password of
wasadmin. Modify and issue the following command as necessary to execute the Data Collector against the WebSphere environment:./bin/transformationadvisor -w /opt/IBM/WebSphere/AppServer855 -p AppSrv01 wasadmin wasadmin
When prompted, accept the license agreement. The Data Collection process will now start and will analyze all of the applications installed in the WebSphere Application Server environment and will also collect the related Java EE artifacts such as Data Sources and JMS definitions.
When the analysis is complete, the Data Collector will attempt to upload the collection results to IBM Cloud Transformation Advisor. If this is successful, you can skip to the Analyze the Recommendations section. If not, you will receive an error at the end of Data Collection and will find a file named
AppSrv01.zipin your current directory as shown below.~/datacollector/transformationadvisor-1.9.6# ls -la *.zip-rw-r--r-- 1 root root 625493 Jun 12 12:58 AppSrv01.zip
Download this Data Collector Results zip file ready for uploading to IBM Cloud Transformation Advisor in the next section
In this section the results from the Data Collector will be uploaded to IBM Cloud Transformation Advisor.
In the IBM Cloud Transformation Advisor web browser session, click the Recomendations link in the top left corner and then click the Upload data button as shown below
When the Upload data dialog is displayed, use the Drop or Add File button to select the Data Collector Results zip file that was downloaded in the previous section. Click Upload
After a few moments the upload of the data collector results will be completed.
Once the Data Collector Results have been uploaded to IBM Cloud Transformation Advisor a set of recommendations will be created and shown on the Recommendations page. In this section the recommendations will be analyzed and interpreted.
The Data Collector analyzed all of the applications running on the traditional WebSphere profile and displays a row in the chart for each application and potential target runtime. In the case of the CustomerOrderServicesApp.ear application, IBM Cloud Transformation Advisor has determined that the application can be modernized to run on either WebSphere Liberty (which supports JEE6, 7 and 8) in 1.5 days or Open Liberty (which supports JEE7 or 8) in 9.5 days. Click on the CustomerOrderServicesApp.ear application name on the WebSphere Liberty row to see more information.
Review the analysis results and scroll down to the Complexity Rules section and open the section. Note that IBM Cloud Transformation Advisor has determined that code changes are required before this application will run on WebSphere Liberty.
Scroll down to the Issues details section and open the section. Note that IBM Cloud Transformation Advisor has detected that there are issues with lookups for Enterprise JavaBeans and with accessing the Apache Wink APIs.
In order to review the IBM Cloud Transformation Advisor results in more detail, scroll to the bottom of the analysis page and click on the Analysis Report link
When the warning dialog is displayed, click OK
The Detailed Migration Analysis Report will be displayed which show the results of the migration rules that were executed by the Data Collector and returned results. Scroll down to the Severe Rules section and click on the Show rule help link for each of the results. Review the recommendations.
Behavior change on lookups for Enterprise JavaBeans In Liberty, EJB components are not bound to a server root Java Naming and Directory Interface (JNDI) namespace as they are in WebSphere Application Server traditional. The fix for this is to change the three classes that use
ejblocalto use the correct URL for Liberty
The user of system provided Apache Wink APIs requires configuration To use system-provided third-party APIs in Liberty applications, you must configure the applications to include the APIs. In WebSphere Application Server traditional, these APIs are available without configuration. This is a configuration only change and can be achieved by using a
classloaderdefinition in the Liberty server.xml file.
The intention of this traditional WebSphere V855 —> WebSphere Liberty scenario is to migrate the Customer Order Services application to the cloud-ready new runtime with minimal code changes.
IBM Cloud Transformation Advisor was used to analyze the application for compatibility with WebSphere Liberty and determined that only small changes to three classes would be required.
While this scenario will move the application to the cloud-ready WebSphere Liberty runtime in a container, it will not modernize the application architecture and code in any way.
Now proceed to the Liberty - Build section where the process of making the code changes and configuring the Liberty runtime will be covered step-by-step