Skip to content

Commit f51cba4

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into branch1
2 parents ae0d47e + ab86284 commit f51cba4

File tree

6 files changed

+280
-142
lines changed

6 files changed

+280
-142
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# zowe-cli-cics-deploy-plugin
2+
23
This project provides a plug-in for [Zowe CLI](https://github.com/zowe/zowe-cli) to deploy applications developed on a workstation to IBM CICS Transaction Server for z/OS (CICS). It aims to provide an experience similar to deploying to a cloud platform when deploying to CICS. It will also provide low-level commands for performing individual steps of the deployment process that could be used as part of a CI/CD pipeline.
34

45
## Status
6+
57
The project was started in February 2019 and is at an early stage of development. It will initially focus on generating and deploying CICS bundles containing Node.js applications.
68

79
To try it out, build the plug-in from source as described in [setup](docs-internal/tutorials/Setup.md).
810

911
## Documentation
12+
1013
You can find information and tutorials on using this plug-in in our [documentation](https://ibm.github.io/zowe-cli-cics-deploy-plugin/index.html).
1114

1215
## Contributing
13-
Contributions are welcome - see the [contribution guidelines](CONTRIBUTING.md). If you have a question or encounter a problem please raise an issue in this repo.
16+
17+
Contributions are welcome - see the [contribution guidelines](CONTRIBUTING.md). If you have a question or encounter a problem, please search the [issues](https://github.com/IBM/zowe-cli-cics-deploy-plugin/issues) in this repo before raising a [New issue](https://github.com/IBM/zowe-cli-cics-deploy-plugin/issues/new).

docs/_data/sidebars/cdp_sidebar.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,18 @@ entries:
2626
url: cdp-Deploying-your-first-nodejs-app.html
2727
output: web
2828
folderitems:
29+
- title: Preparing a z/OS PT image
30+
url: cdp-Preparing-a-zOS-PT-image.html
31+
output: web
32+
- title: Provisioning a CICS region
33+
url: cdp-Provisioning-a-CICS-region.html
34+
output: web
2935
- title: Deploying your first Node.js app
3036
url: cdp-Deploying-your-first-nodejs-app.html
3137
output: web
3238
- title: Deploying using individual actions
3339
url: cdp-Deploying-using-individual-actions.html
3440
output: web
35-
- title: Provisioning a CICS region with z/OS PT
36-
url: cdp-Provisioning-a-CICS-region-using-zospt.html
37-
output: web
3841

3942
- title: Concepts
4043
url: cdp-zowe-and-cli.html

docs/pages/cdp/cdp-Deploying-your-first-nodejs-app.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ CICS TS V5.5 introduced support to run Node.js applications and is required by t
1515

1616
### Procedure
1717

18-
1. Install the Zowe CLI and cics-deploy plug-in by following the steps in [Installing](cdp-Installing).
18+
1. Install the Zowe CLI and plug-ins by following the steps in [Installing](cdp-Installing).
1919

20-
2. Create Zowe CLI profiles for z/OSMF, SSH, cics-deploy and CICS by following the steps in [Creating Zowe CLI profiles](cdp-Creating-Zowe-CLI-profiles).
20+
2. Create Zowe CLI profiles by following the steps in [Creating Zowe CLI profiles](cdp-Creating-Zowe-CLI-profiles).
2121

2222
3. Create a Node.js application using the [Express Application Generator](https://expressjs.com/en/starter/generator.html):
2323

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
---
2+
title: Preparing a z/OS PT image
3+
tags: [tutorial]
4+
keywords:
5+
summary: "The following steps take you through preparing a z/OS Provisioning Toolkit image for CICS, and optionally including an application in the image."
6+
sidebar: cdp_sidebar
7+
permalink: cdp-Preparing-a-zOS-PT-image.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 and z/OSMF workflows to provision CICS regions and other development environments on z/OS. This tutorial requires z/OS PT version 1.1.5 or above to be installed on z/OS, and your user `.profile` file on z/OS configured to run z/OS PT.
13+
14+
z/OS PT uses configuration and files in an *image* as input to z/OSMF workflows to provision a CICS region. The image is typically prepared by a CICS system administrator. This tutorial provides two alternative approaches to preparing a z/OS PT image:
15+
16+
* [Prepare a z/OS PT image for CICS](#prepare-a-zos-pt-image-for-cics) - no application is included in the image, and the `zosptfile` is kept separate to the application source.
17+
* [Prepare a z/OS PT image for CICS including an application](#prepare-a-zos-pt-image-for-cics-including-an-application) - the application is provisioned together with the CICS region, and the `zosptfile` is kept with the application source.
18+
19+
### Prepare a z/OS PT image for CICS
20+
21+
Use these steps to prepare a z/OS PT image for a CICS region. No application is included in the image. The CICS region is connected to a CICSplex environment, and has NODE_HOME set.
22+
23+
#### Procedure
24+
25+
Run the following commands on your workstation.
26+
27+
1. Install the Zowe CLI and plugins by following the steps in [Installing](cdp-Installing).
28+
29+
2. Create Zowe CLI profiles by following the steps in [Creating Zowe CLI profiles](cdp-Creating-Zowe-CLI-profiles).
30+
31+
3. Setup environment variables for the name of your image, and paths for the image source on the workstation and z/OS.
32+
33+
Update these value for to be suitable for your workstation and z/OS environments.
34+
35+
```text
36+
export IMAGE="cics_55_nodejs"
37+
export IMAGE_DIR="$HOME/zosptimages/$IMAGE"
38+
export IMAGE_DIR_ZOS="/zosptimages/$IMAGE"
39+
```
40+
41+
4. Create directories for the z/OS PT image source and bundles sub-directory.
42+
43+
```text
44+
mkdir -p "$IMAGE_DIR/bundles"
45+
```
46+
47+
5. Create a `zosptfile` file.
48+
49+
```text
50+
cat <<EOF >> $IMAGE_DIR/zosptfile
51+
FROM cics_55
52+
ENV DFH_CICS_TYPE=MAS
53+
ENV DFH_CICSPLEX=ZOSPTINT
54+
ENV DFH_NODE_HOME=/usr/lpp/IBM/cnj/IBM/node-latest-os390-s390x
55+
COPY bundles bundles
56+
EOF
57+
```
58+
59+
Update the values for `DFH_CICSPLEX` and `DFH_NODE_HOME` to be suitable for your z/OS environment. Further customization can be made by adding properties as described in [Configuration properties for CICS images](https://www.ibm.com/support/knowledgecenter/en/SSXH44E_1.0.0/zospt/cics/zospt-cics-properties.html).
60+
61+
| zosptfile&nbsp;entry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Usage |
62+
| --- | -- |
63+
| `FROM cics_55` | Provision a CICS TS V5.5 region that is the minimum release that supports Node.js applications. |
64+
| `ENV DFH_CICS_TYPE=MAS` | CICS region should be managed by CPSM to enable the DFHDPLOY utility to deploy applications. |
65+
| `ENV DFH_CICSPLEX=` | Name of the CICSplex this region is to join. |
66+
| `ENV DFH_NODE_HOME=` | Installation directory for Node.js runtime provided by IBM SDK for Node.js - z/OS. |
67+
| `COPY bundles bundles` | Create an empty `bundles` directory in the provisioned file system to contain CICS bundles. |
68+
69+
6. Upload the image source to z/OS.
70+
71+
```text
72+
zowe zos-uss issue ssh "rm -Rv *" --cwd "$IMAGE_DIR_ZOS"
73+
zowe zos-uss issue ssh "mkdir -p $IMAGE_DIR_ZOS"
74+
zowe zos-files upload dir-to-uss "$IMAGE_DIR" "$IMAGE_DIR_ZOS" --recursive
75+
```
76+
77+
7. Build the image source on z/OS.
78+
79+
```text
80+
zowe zos-uss issue ssh "zospt build -t $IMAGE ." --cwd "$IMAGE_DIR_ZOS"
81+
```
82+
83+
#### Results
84+
85+
The image is now ready for developers to provision CICS regions and deploy their Node.js applications using [Deploying your first Node.js app](cdp-Deploying-your-first-nodejs-app). The image source can be stored with other images and shared using a source code management system.
86+
87+
### Prepare a z/OS PT image for CICS including an application
88+
89+
Use these steps to prepare a z/OS PT image for a CICS region that includes a Node.js application, such that the region and application are provisioned / started / stopped / de-provisioned together. The CICS region is connected to a CICSplex environment, and has NODE_HOME set.
90+
91+
#### Procedure
92+
93+
Run the following commands on your workstation.
94+
95+
1. Install Zowe CLI by following the steps in [Installing](cdp-Installing).
96+
97+
2. Create Zowe CLI profiles for at least z/OSMF and SSH following the steps in [Creating Zowe CLI profiles](cdp-Creating-Zowe-CLI-profiles).
98+
99+
3. Prepare your environment and Node.js application by following steps 1 thru 4 in tutorial [Deploying your first Node.js app](cdp-Deploying-your-first-nodejs-app).
100+
101+
4. Setup environment variables for the name of your image, and paths for the image source on the workstation and z/OS.
102+
103+
Update these value for to be suitable for your workstation and z/OS environments.
104+
105+
```text
106+
export APP_DIR=$HOME/myExpressApp
107+
export IMAGE="cics_55_nodejs_app"
108+
export IMAGE_DIR_ZOS="/zosptimages/$IMAGE"
109+
export IMAGE_APP_DIR_ZOS="bundles/myexpressapp_1.0.0"
110+
```
111+
112+
5. Create a file `zosptfile` in the root directory of the application.
113+
114+
```text
115+
cat <<EOF >> zosptfile
116+
FROM cics_55
117+
ENV DFH_CICS_TYPE=MAS
118+
ENV DFH_CICSPLEX=ZOSPTINT
119+
ENV DFH_NODE_HOME=/usr/lpp/IBM/cnj/IBM/node-latest-os390-s390x
120+
COPY . $APP_DIR_ZOS
121+
EOF
122+
```
123+
124+
The `COPY` directive will copy all the files from the applications root directory a sub-directory of the z/FS file system provisioned with the CICS region. Update the value of the sub-directory to suit the application.
125+
126+
Update the values for `DFH_CICSPLEX` and `DFH_NODE_HOME` to be suitable for your z/OS environment, and add additional properties as required. Further customization can be made by adding properties as described in [Configuration properties for CICS images](https://www.ibm.com/support/knowledgecenter/en/SSXH44E_1.0.0/zospt/cics/zospt-cics-properties.html).
127+
128+
6. Upload the z/OS PT image source and application to z/OS.
129+
130+
```text
131+
zowe zos-uss issue ssh "rm -Rv *" --cwd "$IMAGE_DIR_ZOS"
132+
zowe zos-uss issue ssh "mkdir -p $IMAGE_DIR_ZOS"
133+
zowe zos-files upload dir-to-uss "$APP_DIR" "$IMAGE_DIR_ZOS" --recursive
134+
```
135+
136+
7. Resolve the Node.js application dependencies on z/OS.
137+
138+
```text
139+
zowe zos-uss issue ssh "npm install" --cwd "$IMAGE_DIR_ZOS/$IMAGE_APP_DIR_ZOS"
140+
```
141+
142+
8. Build the z/OS PT image.
143+
144+
```text
145+
zowe zos-uss issue ssh "zospt build -t $IMAGE ." --cwd "$IMAGE_DIR_ZOS"
146+
```
147+
148+
#### Results
149+
150+
The image is now ready for developers to use to provision their own CICS region. The Node.js application will be provisioned and started together the CICS region. The image source can be stored and shared with the application using a source code management system. When your application is updated, you will need to prepare a new image by repeating steps 3, 4 and 5.
151+
152+
For further details on including applications in z/OS images see [Including a CICS bundle in your image](https://www.ibm.com/support/knowledgecenter/en/SSXH44E_1.0.0/zospt/cics/zospt-cics-bundles.html).

docs/pages/cdp/cdp-Provisioning-a-CICS-region-using-zospt.md

Lines changed: 0 additions & 136 deletions
This file was deleted.

0 commit comments

Comments
 (0)