The CICS provisioning toolkit is now GA as the z/OS Provisioning Toolkit with support for dynamically provisioning both CICS and MQ applications. The toolkit is fully supported and available to all z/OS V2 clients at no additional charge. Please see Provisioning a CICS & Liberty development environment in minutes with the z/OS Provisioning Toolkit for more details.

Introduction

In the blog post Stand up CICS and z/OS Connect EE in minutes with the new CICS provisioning toolkit, Matthew Webster introduced the CICS provisioning toolkit cicspt – a simple USS utility for rapidly provisioning and de-provisioning CICS environments on z/OS. The CICS provisioning toolkit has been further updated to enable different CICS configurations to be quickly provisioned. This is done by abstracting the CICS configuration information into different images that can be named on the cicspt run command. For example issuing the command cicspt run cics_liberty will provision a CICS region with a Liberty server in just a few minutes.

cicspt is available as part of the CICS TS V5.4 open beta, and works with CICS TS V5.2 and later. It requires z/OS 2.1 or higher and z/OSMF to be installed and configured. The download package includes a readme with installation instructions and a PDF with documentation. The PAX file contains everything you need to get started including workflows, properties files for configuring the utility to your installation, and the cicspt utility itself.

Images in cicspt

Images provide value to both CICS systems programmers and CICS application developers. A system programmer can encapsulate different CICS region configurations into different images, then use those images to quickly provision new CICS regions. An application developer can encapsulate a CICS application and its configuration into an image, making it easy to provision instances of the application, and providing a single binary object for promotion through the development lifecycle.

To enable an application to be provisioned into the right type of CICS region, layers of images are created that are based on top of a z/OSMF workflow configuration:

  • The z/OSMF workflow contains configuration shared by all CICS regions.
  • Configuration that differs per type of CICS region can be stored in a set of CICS images that extend the z/OSMF workflow configuration.
  • Application configurations can be encapsulated in images that are based from CICS images.

Four sample CICS images are provided with cicspt. Each image can be used as is, or customised by a systems programmer if required. These images can be listed using the cicspt images command.

Screen Shot 2016-10-03 at 13.26.50

Provisioning CICS and Liberty

The remainder of this article walks through a scenario in which an application developer builds an image of a Liberty application that runs in a CICS Liberty environment. The example application used in this scenario can be built by following the instructions in Developing Liberty applications for CICS

The cics_liberty image provided with cicspt enables a systems programmer to provision a CICS region running Liberty. An application developer can create a new image based from the cics_liberty image. The new image contains the Liberty application and its configuration.

In zFS, create a directory containing the Liberty application, the Liberty application configuration and a file called a Cicsptfile.

screen-shot-2016-10-04-at-09-02-59

The Cicsptfile contains a set of instructions that enable the user to describe which files and directories to copy into the image. It is processed by cicspt when a cicspt build command is issued.

Screen Shot 2016-10-03 at 13.30.51

  • The FROM statement tells cicspt that the image is based from the cics_liberty image and ensures that a CICS region with Liberty is provisioned to run the application.
  • The COPY imageApps.xml ${LIBERTY_DIR}/imageApps.xml statement copies the file called imageApps.xml into the image. It uses an environment variable defined in the cics_liberty image to copy the configuration into the right location. The imageApps.xml file contains Liberty configuration for the application. It is defined as an optional include in the Liberty server.xml. Note that this file is in codepage ISO-8859-1, which is the Liberty JVM server file encoding.
  • Screen Shot 2016-10-03 at 13.34.49

  • The COPY HelloCICSWorld.war ${LIBERTY_DIR}/apps/HelloCICSWorld.war statement copies the war file into the Liberty apps directory in the image.

The cicspt build command can then be issued to build the image. The -t option is used to give the image a meaningful name.

screen-shot-2016-10-04-at-09-05-08

Once the image has been built, a systems programmer can use cicspt to provision an instance of the application. cicspt provisions the CICS region running Liberty, and the Liberty application.

screen-shot-2016-10-04-at-09-11-58

Messages in the Liberty messages.log file show that the application has been installed.

Screen Shot 2016-10-03 at 13.51.46

The application can then be invoked from a browser at URL http://host:port/helloworld/SimpleServlet

Screen Shot 2016-10-03 at 13.55.08

By creating an image of the application, we have made it simple to provision the application whenever an instance of it is required. This could be for further application development, or for automating testing of future application changes. Please go to the download page to try the CICS provisioning toolkit for yourself. If you have any questions please see How do I give feedback on the CICS TS open beta? in the CICS space on dW Answers making sure to add the cicspt tag.

Join The Discussion

Your email address will not be published. Required fields are marked *