Follow

Move a CICS Application to Pivotal Cloud Foundry

Introduction

This article shows you how easy it is to take a CICS application and run it on Pivotal's Cloud Foundry.

 

Pre-Requisites

You have registered for a Pivotal Web Services account and followed the initial 15 minute tutorial on how to create a simple application that runs on pivotal. You can register and follow the tutorial here https://pivotal.io/platform/pcf-tutorials/getting-started-with-pivotal-cloud-foundry/introduction

 

CICS Application

I selected the mortgage amortization sample CICS applications that we deliver with Elastic COBOL. So I needed to create the initial application and source code. 

So in Eclipse I selected "File...New...Cobol Project"

I then named it "mort" and selected "sample...ETP Mortgage Amortization"

Now unfortunately the sample default is to be exported as an ear file. This means that expects the target environment to be a full JEE Application server. Whilst we can configure and run custom pivotal cloud foundry buildpacks for this, it is much simpler to just deliver a .war file to PCF and enable it to run under the default application server which for PCF is tomcat. So with our target environment being a standard application server we need to manually include a JEE library javaee-api-7.0.jar on the buid path of the mort application.

I have attached this file, download it and add it to the eclipse mort project build path.

We are now ready to create the deployment war file and for this we need and Elastic Transaction Deployment Project

In Eclipse "File...New...ETP Project"

Click "Finish".

We now need to configure the deployment project with some information about the project to be deployed

Double click on the project.etp_deploy_settings and then in General Category set the sysid and particpating projects

Click "Apply"

Now ensure that the programs are listed under Category...Programs

Now add the mapping of transactions to programs under the Category...Transactions

Click "Apply" to ensure these settings are saved. 

We now need to create the deployment war file and we do this by right clicking on the mort_deploy project in Eclipse and selecting Export

 

then we select the ETP Deployment wizard

 

Now Click "Next" and enter the deployment file name and locate the license file that will be packaged with the application

We now have a mort.war file that we can deploy to PCF

If you have followed the initial PCF tutorial then you already have the PCF Command line installed and working on your computer. If you havent....well you can download the PCF Command line installer from https://cli.run.pivotal.io/stable?release=windows64&source=github

At this point if you open up a command line shell, I use powerShell you should be able to type

PS C:\deployments> cf help 

All good then lets continue

cd to the directory where you placed your mort.war deployment file. The general outline of deploying a war file to PCF is cf push <APPNAME> -p APPNAME.war

so for our mort application that becomes

PS C:\deployments> cf push mort -p mort.war

Wait a few minutes and watch as the java and tomcat buildpacks are downloaded into the pcf container and your application is then deployed and started. 

In our case this application is available under https://mort.cfapps.io/servlet

As a little freebie I also deployed an Angular Javascript application that acts as a new web front end to this mort CICS application and you can view that here. https://ang2mort.cfapps.io/ 

Hope you have enjoyed this article and seen how simple it is to push your CICS applications to the cloud.

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk