Skip to content

Commit 675c5fd

Browse files
authored
Merge pull request #174 from markcocker/master
Add tutorial: Provision a CICS region using z/OS PT and deploy a Node.js application
2 parents 421cd7e + e299b07 commit 675c5fd

File tree

3 files changed

+120
-1
lines changed

3 files changed

+120
-1
lines changed

docs/_data/sidebars/cdp_sidebar.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ entries:
3030
- title: Deploying using individual actions
3131
url: /cdp-Deploying-using-individual-actions.html
3232
output: web
33+
- title: Deploying into z/OS PT CICS region
34+
url: /cdp-Deploying-into-zospt-cics-region.html
35+
output: web
3336

3437
- title: Concepts
3538
output: web

docs/pages/cdp/cdp-Create-Zowe-CLI-profiles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ This profile identifies the CICS environment for deployment. You need to know th
8787
For example to create a cics-deploy profile:
8888

8989
```console
90-
zowe profiles create cics-deploy-profile example --cicsplex PLEX1 --cics-hlq CICSTS55.CICS720 --cpsm-hlq CICSTS55.CPSM550 --scope TESTGRP1 --csd-group BUNDGRP1 --target-directory /var/cicsts/bundles --overwrite
90+
zowe profiles create cics-deploy-profile cics --cicsplex PLEX1 --cics-hlq CICSTS55.CICS720 --cpsm-hlq CICSTS55.CPSM550 --scope TESTGRP1 --csd-group BUNDGRP1 --target-directory /var/cicsts/bundles --overwrite
9191
```
9292

9393
For help on using the options:
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
title: Provision a CICS region using z/OS PT and deploy a Node.js application
3+
tags: [getting_started]
4+
keywords:
5+
summary: "The following steps take you through provisioning a CICS region using the z/OS Provisioning Toolkit, then creating and deploying an application to the CICS region."
6+
sidebar: cdp_sidebar
7+
permalink: cdp-Deploying-into-zospt-cics-region.html
8+
folder: cdp
9+
toc: true
10+
---
11+
12+
The [z/OS Provisioning Toolkit](https://developer.ibm.com/mainframe/products/zospt/) (z/OS PT) provides a command line utility to provision CICS regions and other development environment on z/OS. This tutorial requires z/OS PT version 1.1.5 or above to be installed.
13+
14+
### Prepare a z/OS PT image
15+
16+
A z/OS PT image contains the configuration and files necessary to provision the CICS region. This is typically prepared by the CICS system administrator for use by many developers. The [configuration properties](https://www.ibm.com/support/knowledgecenter/en/SSXH44E_1.0.0/zospt/cics/zospt-cics-properties.html) for the CICS image should include:
17+
18+
| zosptfile entry                      | Usage |
19+
| --- | -- |
20+
| `FROM cics_55` | Provision a CICS TS V5.5 region. |
21+
| `ENV DFH_CICS_TYPE=MAS` | The CICS region should be managed by CPSM. |
22+
| `ENV DFH_CICSPLEX=` | The name of the CICSplex. |
23+
| `ENV DFH_NODE_HOME=` | The installation directory for IBM SDK for Node.js - z/OS. |
24+
| `COPY bundles bundles` | Create an empty bundles directory in the provisioned file system to contain CICS bundles. |
25+
26+
For example, to create the z/OS PT image source directory and configuration file, and build it ready for developers to provision CICS regions:
27+
28+
```console
29+
export ZOSPTIMAGE=~/zosptimages/cics_55_nodejs
30+
31+
mkdir -p $ZOSPTIMAGE/bundles
32+
33+
iconv -f IBM1047 -t UTF-8 > $ZOSPTIMAGE/zosptfile << EOF
34+
FROM cics_55
35+
ENV DFH_CICS_TYPE=MAS
36+
ENV DFH_CICSPLEX=ZOSPTINT
37+
ENV DFH_NODE_HOME=/usr/lpp/IBM/cnj/IBM/node-latest-os390-s390x
38+
COPY bundles bundles
39+
EOF
40+
41+
chtag -tc UTF-8 $ZOSPTIMAGE/zosptfile
42+
43+
zospt build $ZOSPTIMAGE -t cics_55_nodejs
44+
```
45+
46+
### Provision your CICS region and deploy a Node.js application
47+
48+
1. Update your user `.profile` file on z/OS to run z/OS PT.
49+
50+
Add the directory to the `zospt` command to your PATH, and add the following environment variables as described in [Configuring z/OS Provisioning Toolkit](https://www.ibm.com/support/knowledgecenter/en/SSXH44E_1.0.0/zospt/zospt-configuring.html):
51+
52+
```properties
53+
export zospt_domain=
54+
export zospt_tenant=
55+
export zospt_pw=
56+
```
57+
58+
2. Provision your CICS region.
59+
60+
Use the `--name` option to specify a name for the container that is easy to remember for use in later commands. The provisioning steps may take several minutes to complete.
61+
62+
```console
63+
zowe zos-uss issue ssh "zospt run cics_55_nodejs --name my_cics_region"
64+
```
65+
66+
3. Display the CICS region information.
67+
68+
```console
69+
zowe zos-uss issue ssh "zospt inspect my_cics_region"
70+
```
71+
72+
The output is in JSON format and includes values for the CICS region application ID, and the z/OS directory within which your CICS bundles can be uploaded. For example:
73+
74+
```json
75+
"DFH_REGION_APPLID": "CICPY000",
76+
"DFH_REGION_ZFS_DIRECTORY": "/u/cicprov/mnt/CICPY000",
77+
```
78+
79+
4. Update your Zowe cics-deploy profile options.
80+
81+
Update `--scope` to be the value from DFH_REGION_APPLID, and `--bundle-directory` to be a bundles subdirectory of DFH_REGION_ZFS_DIRECTORY. For example:
82+
83+
```console
84+
zowe profiles update cics-deploy cics --scope CICPY000 --bundle-directory /u/cicprov/mnt/CICPY000/bundles
85+
```
86+
87+
4. Deploy your Node.js application to the CICS region using the steps in [Deploying your first app](cdp-Deploying-your-first-app). For example:
88+
89+
```console
90+
zowe cics-deploy push bundle --name Express --overwrite
91+
```
92+
93+
### Stop your CICS region
94+
95+
The CICS region and the applications running in it can be stopped if you are not going to be using them for a while by using command:
96+
97+
```console
98+
zowe zos-uss issue ssh "zospt stop my_cics_region"
99+
```
100+
101+
### Start your CICS region
102+
103+
The CICS region can be started after it was previously stopped, or the z/OS system was restarted, by using command:
104+
105+
```console
106+
zowe zos-uss issue ssh "zospt start my_cics_region"
107+
```
108+
109+
### Deprovision your CICS region
110+
111+
The CICS region can be stopped and removed using the following command. This will remove the z/OS directory used to upload your CICS bundles:
112+
113+
```console
114+
zowe zos-uss issue ssh "zospt stop my_cics_region"
115+
zowe zos-uss issue ssh "zospt rm my_cics_region"
116+
```

0 commit comments

Comments
 (0)