Creating a sample initial IT configuration

To try out the scenario in your own environment, set up a platform, and deploy a simple web application that runs in a Liberty JVM server.

About this task

To see an example of a suitable environment and application for this scenario, watch the video Hosting two versions of a CICS application concurrently on the same platform, which is available on the CICS® product website. Figure 1 shows the projects that were set up to create the environment and application for the demonstration:
Figure 1. Projects used for the demonstration
In the Project Explorer view, the group Application Binding Resources contains two projects, demo.liberty.app.binding and demo.liberty.app.web.uri. The group Application Resources contains five projects, demo.liberty.app, demo.liberty.app.logic.appinfo, demo.liberty.app.web.osgiapp, demo.liberty.app.web.presentation, and demo.liberty.app.web.servlet. The group Platform Resources contains two projects, my.demo.liberty.jvmserver and my.demo.platform.
demo.liberty.app.binding
The CICS application binding project for the demonstration web application.
demo.liberty.app.web.uri
A CICS bundle containing a URIMAP resource for the demonstration web application, and a statement declaring the URIMAP resource as an application entry point. This CICS bundle is deployed with the application binding.
demo.liberty.app
The CICS application project for the demonstration web application.
demo.liberty.app.logic.appinfo
A CICS bundle containing the application logic for the demonstration web application.
demo.liberty.app.web.osgiapp
An OSGi application project that packages the OSGi web bundle project containing the presentation logic for the demonstration web application.
demo.liberty.app.web.presentation
An OSGi web bundle project containing the presentation logic for the demonstration web application.
demo.liberty.app.web.servlet
A CICS bundle that packages the OSGi application project for the demonstration web application as an enterprise bundle archive (EBA) file.
my.demo.liberty.jvmserver
A CICS bundle containing the JVMSERVER resource for the Liberty JVM server in the CICS regions that are part of the demonstration platform. This CICS bundle is deployed with the platform bundle.
my.demo.platform
The platform bundle for the demonstration platform.

Procedure

  1. Set up a platform that includes at least one CICS region where you can deploy a simple application. For the full process to configure a platform, see Setting up a platform. For a scenario example of the process to configure a platform, see the scenario topic Configuring the platform in Scenario: Deploying an application to a platform. Do not create JVMSERVER and TCPIPSERVICE resources as described in the final steps of those instructions. Instead, return to this topic to set up a Liberty JVM server, which provides TCP/IP function.
  2. Create and deploy a Liberty JVM server in all the CICS regions that are part of your platform. The Liberty profile technology is installed with CICS to run as a web container in a JVM server. You can create and install the JVMSERVER resource for the Liberty JVM server in each individual CICS region. Or you can use CICS Explorer® to create the JVMSERVER resource in a CICS bundle and add the CICS bundle to the platform, as in the environment used for the demonstration. For instructions to configure a Liberty JVM server, see Setting up a JVM server.
  3. Create the original version of a simple web application that runs in the Liberty JVM server. Use CICS Explorer to package the application using CICS bundles, include the CICS bundles in an application bundle, and create an application binding to deploy the CICS bundles for the application to the region types in the platform. (The Liberty profile deployment model, which uses the dropins directory, is not appropriate for this scenario.) The application used in the demonstration has the following characteristics that are important for the scenario:
    • The original version of the application displays a web page with some information that can be used to identify the application version. The information will be changed or additional information will be included in the updated version of the application.
    • The presentation logic for the web application is developed as an OSGi web bundle project. The Web-ContextPath header in the bundle manifest file for the OSGi bundle specifies the path component of the URL for the application version.
    • The OSGi web bundle project is packaged in an OSGi application project. The OSGi application project is then packaged in a CICS bundle as an enterprise bundle archive (EBA) file. The CICS bundle declares a dependency on the JVMSERVER resource for the Liberty JVM server where the web application runs.
    • The CICS bundle containing the .ebabundle file is packaged and deployed as part of an application bundle. The application bundle also includes CICS bundles that contain any other application components. In the application used in the demonstration, the application logic is packaged in a CICS bundle and included in the application bundle.
    • The web page for the application is displayed in a browser using a URIMAP resource, which is defined in a CICS bundle. The URIMAP resource is declared as an entry point for the application. The declaration of the application entry point is in the CICS bundle where the URIMAP resource is defined, so that it controls access to the URIMAP resource. For instructions to create a CICS resource in a CICS bundle project, and to declare it as an application entry point, see Working with bundles in the CICS Explorer product documentation.
    • The path component of the URL specified by the URIMAP resource identifies the application version. The path will be changed for the updated version of the application. The URIMAP resource will also be renamed for the updated version of the application.
    • The CICS bundle containing the URIMAP resource is deployed with the application binding for the application. Deploying the URIMAP resource with the application binding, rather than with the application bundle, is not a requirement for this scenario to work. However, it is good practice, because it enables the use of different URIs for the application in different environments, such as test and production environments.
    For a scenario example of the process to package an application for deployment on a platform, see Scenario: Deploying an application to a platform. For the full process to package an application for deployment on a platform, see Packaging applications for deployment.
  4. Use CICS Explorer to export the application and application binding to the platform home directory on z/OS® UNIX, and create an application definition. Then install and enable the original version of the application on your platform. Check that the application was installed correctly, then make it available. You can use the instructions in the scenario topic Deploying the new version of the application also to deploy the original version of the application. For the full process to install and enable an application on a platform and make it available, see Installing an application on a platform.
  5. Verify that the original version of the application can be accessed using a web browser. Open a web browser, and in the address bar, enter the URL for the original version of the application. Use the format http://hostname:port/demo.liberty.appV1.0/ with components as follows:
    • hostname is the name or IP address of the host that the Liberty HTTP server listens on, which is specified in the -Dcom.ibm.cics.jvmserver.wlp.server.host JVM system property in the JVM profile for the Liberty JVM server.
    • port is the listener port for the Liberty HTTP server, which is specified in the -Dcom.ibm.cics.jvmserver.wlp.server.http.port JVM system property in the JVM profile for the Liberty JVM server.
    • /demo.liberty.appV1.0/ is the path that you specified in the URIMAP resource for the application and in the Web-ContextPath header in the OSGi bundle manifest.


phase0_initialmi.html | Timestamp icon Last updated: Sunday, 4 June 2017