Skip to content

Commit 634616e

Browse files
committed
Draft tutorial to deploy using z/OS PT
1 parent a90726f commit 634616e

File tree

2 files changed

+119
-0
lines changed

2 files changed

+119
-0
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
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 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 programmer for use by many developers. The configuration should include:
17+
18+
| zosptfile entry                   | Usage |
19+
| --- | -- |
20+
| `FROM cics_55` | Build a CICS TS V5.5 region |
21+
| `ENV DFH_NODE_HOME=` | Specify the directory for IBM SDK for Node.js - z/OS |
22+
| `ENV DFH_CICS_TYPE=MAS` | Specify the CICS region should be managed by CPSM |
23+
| `ENV DFH_CICSPLEX=` | Specify the name of the CICSplex |
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 a CICS region:
27+
28+
```console
29+
export ZOSPTIMAGE=~/zosptimages/cics_55_nodejs
30+
31+
mkdir -p $ZOSPTIMAGE/bundles
32+
33+
cat > $ZOSPTIMAGE/zosptfile << EOF
34+
FROM cics_55
35+
ENV DFH_NODE_HOME=/usr/lpp/IBM/cnj/IBM/node-latest-os390-s390x
36+
ENV DFH_CICS_TYPE=MAS
37+
ENV DFH_CICSPLEX=ZOSPTINT
38+
COPY bundles bundles
39+
EOF
40+
41+
cat $ZOSPTIMAGE/zosptfile | iconv -f IBM1047 -t UTF8 > $ZOSPTIMAGE/zosptfile
42+
43+
chtag -tc UTF-8 $ZOSPTIMAGE/zosptfile
44+
45+
zospt build $ZOSPTIMAGE -t cics_55_nodejs
46+
```
47+
48+
### Provision your CICS region and deploy a Node.js application
49+
50+
1. Update your user `.profile` file on z/OS.
51+
52+
Update your path to include the directory containing the `zospt` command, 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):
53+
54+
```properties
55+
export zospt_domain=
56+
export zospt_tenant=
57+
export zospt_pw=
58+
```
59+
60+
2. Provision your CICS region.
61+
62+
Use the `--name` option to specify a name for the container that is easy to remember for use in later commands. This may take several minutes.
63+
64+
```console
65+
zowe zos-uss issue ssh "zospt run cics_55_nodejs --name my_cics_region"
66+
```
67+
68+
3. Display the CICS region information.
69+
70+
```console
71+
zowe zos-uss issue ssh "zospt inspect my_cics_region"
72+
```
73+
74+
The output will include values for the CICS region application ID, and the z/OS directory within which your CICS bundles can be uploaded. For example:
75+
76+
```json
77+
"DFH_REGION_APPLID": "CICPY000",
78+
"DFH_REGION_ZFS_DIRECTORY": "/u/cicprov/mnt/CICPY000",
79+
```
80+
81+
4. Update your Zowe cics-deploy profile with the CICS region application ID and z/OS 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 can be stopped if you are not going to be using it for a while 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 if it was previous stopped, or the z/OS system was restarted 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)