Including a CICS bundle in your image

With z/OS® PT, you can include a CICS® bundle, a JVM server resource, or both, in your image. CICS bundles can contain policies, OSGi, or Liberty Java™ application code and resource definitions, including LIBRARY resources for local applications. By including a CICS bundle in an image, you can provision a CICS region with a specific configuration, or with specific applications already available.

CICS bundles

A CICS bundle is a directory that contains artifacts and a manifest that describes the bundle and its dependencies. CICS bundles provide a way to group and manage related resources. CICS bundles also provide versioning for the management of resource updates, and can declare dependencies on other resources outside the bundle. Application developers can use CICS bundles for application packaging and deployment, business events, and services. System programmers can use CICS bundles for policies. For more information about defining CICS bundles, see Defining CICS bundles in CICS TS product documentation.

How to include a CICS bundle in your image

You can include a CICS bundle in your image by updating the zosptfile to include COPY statements that list the CICS bundles to add. All the CICS bundle artifacts must be copied to the image source directory, which must contain a zosptfile so that you can build the new image by using the zospt build command. For more information about how to build an image with z/OS PT, see Building an image with z/OS Provisioning Toolkit.

CICS bundle installation

All CICS bundles that are installed are named as DFH$Bn, where n is a number in the range 0 - 999.

JVM server creation

You can either define the type of JVM server you want in the zosptfile by using the DFH_REGION_JVMSERVER environment property, or define a JVMSERVER resource in the CICS bundle. If you choose to use the DFH_REGION_JVMSERVER environment property, ports can be dynamically allocated for the JVM server during provisioning. For more information about the possible values of DFH_REGION_JVMSERVER in the zosptfile, see JVM configuration options.

Include a CICS bundle to provision a CICS region with a Liberty application

  1. Create your Liberty application (for example, a CICS TSQ sample).
  2. Create a CICS bundle to include the Liberty application you created.
  3. Export the CICS bundle to a UNIX System Services directory.
  4. Create a zosptfile in the same directory as the exported CICS bundle (for example, the bundleLiberty directory). Update the zosptfile to copy all required CICS bundles into the image to a bundles directory. The bundles must be in a directory called bundles, otherwise they will not be installed in the provisioned CICS regions. This example shows how your zosptfile might look:
    
    FROM scratch
    ENV ZOSMF_TEMPLATE=cics_55
    ENV DFH_REGION_JVMSERVER=Liberty
    
    COPY com.ibm.server.examples.wlp.tsq.bundle bundles/com.ibm.server.examples.wlp.tsq.bundle
  5. Build the zosptfile into an image called (in this example) myTSQSampleApp, by using the following command:
    zospt build -t myTSQSampleApp bundleLiberty
  6. Run the image to create and start a container by using the following command:
    zospt run myTSQSampleApp
    If the properties are all correct, the CICS region is provisioned with a configured JVM server named DFHWLP, a CICS bundle resource installed, and the running TSQ sample in the JVM server.