When you provision a CICS region, you can now include a CICSÂ® bundle in your z/OS Provisioning Toolkit (z/OS PT) image. CICS bundles can contain policies, OSGi, or Liberty Javaâ„˘ application code and other resource definitions, including LIBRARYs for local applications. The inclusion of a CICS bundle means that you are able to provision a CICS region with a specific configuration, or with specific applications already available. See Include a CICS bundle in your image for more details about this feature.
The following is a simple scenario that includes two application bundles (both are CICS samples) in an image and then provisions the CICS container using z/OS PT.
Step 1 Create the CICS bundles using the IBM Explorer for z/OS
For this example we are using the CICS Hello World example (a war bundle) and the CICS TSQ example (an EBA Bundle) but you can include any bundle resources that you choose.
To download IBM Explorer for z/OS, click here.
Open IBM Explorer for z/OS, choose Resource Perspective, and then:
Click New->Exampleâ€¦->CICS Examples->Servlet and Jsp->CICS Hello World and click Finish
Click New->Exampleâ€¦->CICS Examples->Servlet and Jsp->CICS Temprorary Storage Queue and click Finish
You should now have created the following bundles:
Step 2 Export the CICS bundles to your user directory
Step 3 Edit the zosptfile
We use the COPY command in the zosptfile, to copy each of the bundle resources.In this scenario,this is how the zosptfile looks:
COPY com.ibm.cics.server.examples.wlp.tsq.bundle_1.0.1 bundles/com.ibm.cics.server.examples.wlp.tsq.bundle_1.0.1
COPY com.ibm.cics.server.examples.wlp.hello.bundle_1.0.1 bundles/com.ibm.cics.server.examples.wlp.hello.bundle_1.0.1
NoteďĽšWe use z/OS PT provided sample image cics_54_liberty as the base image, and add bundles on top of that. Also we include the DFH_REGION_JVMSERVER environment property in this zosptfile(in the base image cics_54_liberty), as the two liberty applications require a Liberty JVM server,this will enable z/OS PT to create liberty JVM server named as DFHWLP, which will be referenced in the sample liberty application.If you include an OSGI bundle, you could change the value of the environment variable “DFH_REGION_JVMSERVER” from “Liberty” to “OSGi”. Make sure the JVM server name you provide in the application definition is the same as the one created by z/OS PT, which will be named as DFHOSGI.
For more details, please refer to Include a CICS bundle in your image
Alternatively, you could create your own JVMSERVER in the bundle resources and include it in your image.
Step 4 Build the image with z/OS PT
Issue the zospt build command to build the image using the zosptfile you created:
zospt build -t <your image name> <your zosptfile location>
Here is some example output from the zospt build command:
Step 5 Run the image by using z/OS PT
Step 6 Get the port information from the run result
The https port is available from the zospt run output (DFH_REGION_HTTPS : 28492). You need this to….
Step 7 Verify the liberty application using the URL:https://<IP>:<port>/<applicationName>
We hope this article has helped you to understand how to include bundle rsources in your z/OS PT CICS image.