This Practicum Lab Book explains and focuses on the solution preparation and implementation for Practicum Scenario 3 using Cloud Pak for Integration (CP4I). The book will cover the solution architecture and the details of how to best implement the solution for the given scenario. This will help accelerate adoption of Cloud Pak for Integration.
Your customer has been a long-time user of App Connect (IIB/WMB) and MQ. They have recently decided to investigate the value of modernizing their integration. They would like you to use one of their existing flows and queue definitions to explore how to move to containerized integration.
While eager to understand the modernization journey, they also have reservations on their ability to scale and manage the workload. Demonstrate how to analyze, componentize, and containerize existing integration artefacts, and illustrate how to scale and monitor the new deployments.
Your Challenge
Your team have (3) days to document your approach to a Solution to the customer’s business problem using CP4I capabilities and any external capabilities that you think are necessary or useful. Demonstrate your practical solution to whole class.
Day 3: Demonstrate your practical solution to whole class.
If you’re completely new to the concept of clusters, do follow the quick and easy tutorial here to learn more
With Red Hat® OpenShift® on IBM Cloud®, you can create highly available clusters with virtual or bare metal worker nodes that come installed with the Red Hat OpenShift on IBM Cloud Container Platform orchestration software. You get all the advantages of a managed offering for your cluster infrastructure environment, while using the Red Hat OpenShift tooling and catalog that runs on Red Hat Enterprise Linux for your app deployments.
OpenShift is a platform that allows you to run containerized applications and workloads and is powered by Kubernetes. It is an offering that comes with Red Hat support, regardless of where you choose to run your applications and workloads.
One of the big advantages of OpenShift is being able to take advantage of public and private resources which includes bare metal or virtualized hardware whether it is on-premise or on a cloud provider.
This is the high level OpenShift Container Platform overview.
For developers, OpenShift has two different ways of enabling them to work with their platform. They can take advantage of either the CLI or a web console.
Below describe the high-level solution architecture for a simple scenario 3 solution. By using IBM IIB/ACE transformation advisor’s TADataCollector, we can analyse the current monolithic IIB/ACE application. A report will be generated to recommend what are needed to refactor, in order to achieve a microservice architecture build.
The refactor code can later be deployed in a microservices architecture on Redhat Openshift with CP4I (ACE + MQ) environment
If you are planning to move your traditional integration workload (IIB/ACE) to a containerized environment, the Transformation Advisor tool helps you to analyze your on-premises workloads for modernization. You can collect and assess data for a specific integration server in an integration node backup in App Connect Enterprise by using the TADataCollector command. See here for more details.
If you dont have the ACE client installed, install client tools to work on this lab.
TADataCollector
on this console and passing Scenario3 IIB Asset IIBV10_Broker_backup.zip file through command line, as shown below:TADataCollector ace run /<path_to_assets_on_local_machine>/IIBV10_Broker_backup.zip
TADataCollector
command runs successfully, it will generate recommendation files under /tmp/TADataCollector/output/IIB1
folder. Open the following directory to access the generated files/tmp/TADataCollector/output/IIB1
folder & Read the recommendations made by IBM Transformation Advisor
Prepare the environment first as below for the new integration code deployment.
<!– ## Creating Integration Dashboard
**If it is greyed out, you will need to install operator named “IBM App Connect” in openshift -> operatorHub **
–>
Modify the details for your queue manager as below:
a. License acceptance – Toggle the button from OFF to ON state
b. Select “Type of availability” from dropdown as SingleInstance
c. Select “Type of Volume” from the drop down as persistent-claim
Chose the Queue Type as Local Quueue.
Enter the name of the Queue as IN. Click Create.
Similary Create another Queue with name of the Queue as OUT.
Two Queues IN and OUT will be created successfully.
## Creating and Configure MQ Channel
On successful creation, channel will appear under “App Channels”.
To edit the configuration of the Channel click “Configuration” as highlighted below -
## Running mq_ace_lab.mqsc
There are different layers of authorization and authentication configured on the Channel access. To simplify the exercise, we will proceed to disable to Channel security authentication and authorization using the script mq_ace_lab.mqsc . Below steps will assist to disable.
oc project cp4i(your project name)
oc get pods|grep mq
oc exec -it quickstart-cp4i-queue-ibm-mq-0(this is your pod’s name) runmqsc QUICKSTART(QMGR-Name) < mq_ace_lab.mqsc
Note the default channels details. Go to the Applications Tab for the Queue Manager that you created.
Click on App Channels link in the left pane. Click on the Filter and Select Show System Channels.
You should be able to see the System Channels. Note the default channel to be used for MQ Communication. eg. DEV_SEVRCONN
MQ environment is ready for the lab!!!
By using IBM IIB/ACE transformation advisor’s TADataCollector, we have analysed the current monolith IIB/ACE application. By following the generated report, we have made the required changes to refactor the current code, in order to achieve a microservice architecture build. Sample applications will be given below. Refer to this document to understand more details how to refactor the code.
Now the refactor code can be deployed in a microservices architecture on Redhat Openshift with CP4I (ACE + MQ) environment as per below details.
This will open child window to enter details of the server. Once completed, hit finish.
Click Finish.
The new local Integration server will be created and automatically started. Alternatively, you can start it manually by right click on it and select Start.
The applications which needs to be tested on this local integration server can be deployed by right click on the integration server and select Deploy. For now proceed with following instructions to build the deployable BAR file and deploy it on CP4I integration server.
Build ace message flow into BAR file for HTTPResponseApp . Do for HTTPResponseApp only for now.
Deploy bar file for HttpResponseApp flow into CP4I Integration Server. Do for HTTPResponseApp only for now.
Open ACE and navigate to HttpRequestApp —> Expand to open folder Flows —> double-click RequestService.msgflow
Proceed to make the following changes to each component as below:
a. Select HttpInput on Flow Exerciser. Properties associated with it will show up at the bottom. Change the path suffix url to /requestService
b. Select HTTPRequest and replace the URL as per the cluster URL.
Default WebService URL : http://localhost:7080/responseService
Changed URL : http://http-response-app-http-cp4i.apps.daffy-mukhc7i9.cloud.techzone.ibm.com/responseService
Before proceeding with the above change, keep the URL handy (highlighted in bold) by copying it from -
OCP Console –> Administrator View –> Networking –> Select Routes –> Search for the Response Integration server created. Take a note of the URL in the “Location” column.
Save the flow in ACE after replacing the http://localhost:7080
Create a BAR file for this flow and deploy it to a new Integration Server as below.
Build ace message flow into BAR file for HTTPRequestApp . Do for HTTPRequestApp only for now.
Deploy bar file for HTTPRequestApp flow into CP4I Integration Server. Do for HTTPRequestApp only for now.
Introduce new RestToMQApp message flow to expose putting MQ messages
3a) Navigate to Basic Tab and Review the name of the Input Queue. You would have created this queue earlier as part of MQ Setup.
3b) Navigate to MQ Connection –> It should display the properties of MQ Connection
3c) If you have a policy for MQ EndPoint,then you can configure the policy name in the policy tab here in the format {MQPolicyProjectName}:PolicyName, so that it can be used as a configuration for the integration server. In this case, above details on MQ Connection tab are not required. The Policy Project Creation and Export Reference is here.
Build ace MQ message flow into BAR file for MQ_Client_App . Do for MQ_Client_App only for now.
Deploy MQ bar file for MQ_Client_App flow into CP4I Integration Server. Do for MQ_Client_App only for now.
a. Open Terminal on your local machine
b. Use curl command to test your deployment
curl -v http://http-response-app-http-cp4i.apps.daffy-mukhc7i9.cloud.techzone.ibm.com/responseService
curl -v http://http-request-app-http-cp4i.apps.daffy-mukhc7i9.cloud.techzone.ibm.com/requestService
Please replace http://http-request-app-http-cp4i.apps.daffy-mukhc7i9.cloud.techzone.ibm.com part with the URL of your environment
c. Receiving 200 OK on the terminal validates successful deployment
Open the Queue Manager Console and click on Manage screen. Note down the count of IN & OUT Queues. Clck on IN Queue to drop a message manually.
Click on Create+ to create a message manually.
Write any Message in Application Data and Click on Create Button.
You will notice that the IN queue is still empty. This is because the message has been consumed by the Integration Flow and droped into the Out Queue. LEts go back to Manage Queue Screen.
Note the count of IN and OUT queues again. The Out queue count would have been increased. Click on Out Queue to check the messages.
Check the Latest Message timestamp and Count.
The above completes details for setup, installation and configuration of Cloud Pak for Integration for the described use case. As we conclude our work on the practicum, we expect you are versed with the basic fundamentals and usage of Cloud Pak for Integration. This will assist you in your journey to Modernizing Applications and keep upspeed with the technology and trends.