Skip to content

Commit 970fa3f

Browse files
authored
Merge branch 'master' into master
2 parents 749f1c3 + 5c566b4 commit 970fa3f

7 files changed

+157
-37
lines changed

docs/_data/sidebars/cdp_sidebar.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@ entries:
2424
- title: Tutorials
2525
output: web
2626
folderitems:
27-
- title: Deploying your first app
28-
url: /cdp-Deploying-your-first-app.html
27+
- title: Deploying your first Node.js app
28+
url: /cdp-Deploying-your-first-nodejs-app.html
2929
output: web
3030
- title: Deploying using individual actions
3131
url: /cdp-Deploying-using-individual-actions.html
3232
output: web
33+
- title: Provision a CICS region using z/OS PT
34+
url: /cdp-Provision-a-CICS-region-using-zospt.html
35+
output: web
3336

3437
- title: Concepts
3538
output: web
@@ -40,7 +43,7 @@ entries:
4043
- title: Zowe CLI profiles
4144
url: /cdp-zowe-profiles.html
4245
output: web
43-
- title: CICS Bundles
46+
- title: CICS bundles
4447
url: /cdp-cics-bundles.html
4548
output: web
4649

@@ -73,7 +76,7 @@ entries:
7376
url: cdp-CLIReadMe#set-default--set
7477
output: web
7578

76-
- title: Commands - CICS deploy
79+
- title: Commands - zowe cics-deploy
7780
output: web
7881
folderitems:
7982
- title: generate bundle

docs/_data/tags.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ allowed-tags:
55
- getting_started
66
- concepts
77
- troubleshooting
8+
- tutorial

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

Lines changed: 2 additions & 2 deletions
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:
@@ -96,4 +96,4 @@ For help on using the options:
9696
zowe profiles create cics-deploy-profile --help
9797
```
9898

99-
To test the cics-deploy profile, follow the steps in [Deploying your first app](cdp-Deploying-your-first-app).
99+
To test the cics-deploy profile, follow the steps in [Deploying your first Node.js app](cdp-Deploying-your-first-nodejs-app).

docs/pages/cdp/cdp-Deploying-using-individual-actions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
title: Deploying using individual actions
3-
tags: [getting_started]
3+
tags: [tutorial]
44
keywords:
55
summary: "The following steps take you through the individual actions to deploy a Node.js application in CICS."
66
sidebar: cdp_sidebar
77
permalink: cdp-Deploying-using-individual-actions.html
88
folder: cdp
9-
toc: false
9+
toc: true
1010
---
1111

12-
The `zowe cics-deploy push bundle` command performs a set of actions to deploy applications to CICS, as can be seen in [Deploying your first app](cdp-cdp-Deploying-your-first-app). The main actions include:
12+
The `zowe cics-deploy push bundle` command performs a set of actions to deploy applications to CICS, as can be seen in [Deploying your first Node.js app](cdp-Deploying-your-first-nodejs-app). The main actions include:
1313

1414
* undeploy the old version of the CICS bundle in CICS
1515
* upload the new version of the CICS bundle to z/OS
Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
---
2-
title: Deploying your first app
3-
tags: [getting_started]
2+
title: Deploying your first Node.js app
3+
tags: [tutorial]
44
keywords:
5-
summary: "The following steps take you through deploying your first Node.js application to CICS."
5+
summary: "The following steps take you through deploying your first Node.js application to CICS using the Express Application Generator."
66
sidebar: cdp_sidebar
7-
permalink: cdp-Deploying-your-first-app.html
7+
permalink: cdp-Deploying-your-first-nodejs-app.html
88
folder: cdp
9-
toc: false
9+
toc: true
1010
---
1111

12+
### Before you begin
13+
14+
CICS TS V5.5 introduced support to run Node.js applications and is required by this tutorial. If you do not have a CICS TS V5.5 region, use the steps in [Provision a CICS region using z/OS PT](cdp-Provision-a-CICS-region-using-zospt) to provision one, or speak to your CICS system administrator.
15+
16+
### Procedure
17+
1218
1. Install the Zowe CLI and cics-deploy plugin by following the steps in [Installation](cdp-Installation).
1319

1420
2. Create Zowe CLI profiles for z/OSMF, SSH, and cics-deploy by following the steps in [Create Zowe CLI profiles](cdp-Create-Zowe-CLI-profiles).
1521

16-
3. Create a Node.js application.
17-
18-
For example, to create a Node.js application using the [Express Application Generator](https://expressjs.com/en/starter/generator.html):
22+
3. Create a Node.js application using the [Express Application Generator](https://expressjs.com/en/starter/generator.html):
1923

2024
```console
2125
npm install -g express-generator
@@ -29,45 +33,44 @@ toc: false
2933

3034
4. Package the Node.js application into a [CICS bundle](cdp-cics-bundles).
3135

32-
Make sure you are in the root directory of the application. Replace the value for `--port` with one that is available for use by the CICS region on z/OS.
36+
Make sure you are in the root directory of the application.
37+
38+
Replace the value for `--port` with one that is available for use by the CICS region on z/OS. This sets the PORT environment variable in the generated `.profile` file. Additional variables can be set by editing this file.
3339

3440
```console
3541
zowe cics-deploy generate bundle --port 3000 --overwrite
3642
```
3743

3844
The output will show the directories and files created to form a CICS bundle. For example:
3945

40-
```console
46+
<pre class="messageText">
4147
define : NODEJSAPP "myexpressapp" with startscript "./bin/www"
4248
create : nodejsapps
4349
create : nodejsapps/myexpressapp.nodejsapp
4450
create : nodejsapps/myexpressapp.profile
4551
create : .zosattributes
4652
create : META-INF
4753
create : META-INF/cics.xml
48-
CICS Bundle generated with bundleid "myexpressapp"
49-
```
50-
51-
5. Update the CICS Node.js application profile if your application requires environment variables to be set.
52-
53-
Edit the `.profile` file created in step 4, for example `nodejsapps/myexpressapp.profile`.
54+
CICS Bundle generated with bundleid "myexpressapp"</pre>
5455

55-
6. Deploy the CICS bundle into CICS.
56-
57-
Replace the value for `--name` with the name of the BUNDLE resource to be created in CICS.
56+
5. Deploy the CICS bundle into CICS.
5857

5958
```console
6059
zowe cics-deploy push bundle --name Express --overwrite
6160
```
6261

63-
A progress bar is shown with status messages as the CICS bundle is deployed and the application is started. This can take a few minutes. If there are errors, retry with the `--verbose` option for more detailed output.
62+
A progress bar is shown with status messages as the CICS bundle is deployed and the application is started. This can take a few minutes. If there are errors, retry with the `--verbose` option for more detailed output, or refer to [Troubleshooting](cdp-Troubleshooting-General).
63+
64+
This results in a CICS BUNDLE resource named `Express` to be created, installed and enabled in CICS. If the BUNDLE `Express` was already defined or installed in CICS, it is undeployed first. As the BUNDLE is enabled, the Node.js application is started.
6465

6566
6. Test the Node.js application.
6667

6768
You can call the application from a browser using URL [http://myzos:3000/](http://myzos:3000/), replacing _myzos_ with the host name of the z/OS system, and _3000_ with the port specified in step 4.
6869

69-
You can make changes to the application and redeploy it by repeating step 6.
70+
If you make changes to the application you can redeploy it by repeating step 5.
7071

7172
### Results
7273

73-
The Node.js application is packaged into a CICS bundle on the workstation, uploaded to a directory on z/OS, and is running in CICS.
74+
The Node.js application is packaged into a CICS bundle on the workstation, uploaded to a directory on z/OS, and is running in CICS.
75+
76+
{% include tip.html content="[Best practice for developing Node.js applications](https://www.ibm.com/support/knowledgecenter/SSGMCP_5.5.0/applications/developing/node/best-practice.html) provides guidance on setting and using environment variables and graceful application termination." %}

docs/pages/cdp/cdp-Home.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22
title: Zowe CLI CICS deploy plugin
33
tags: [getting_started]
44
keywords:
5-
summary: "The Zowe command line interface (CLI) provides a simple and streamlined way to interact with IBM z/OS. The cics-deploy plugin extends the Zowe CLI to deploy Node.js applications developed on a workstation to IBM CICS Transaction Server for z/OS (CICS)."
5+
summary: "The Zowe command line interface (CLI) provides a simple and streamlined way to interact with IBM z/OS. The cics-deploy plugin extends the Zowe CLI to deploy applications developed on a workstation to IBM CICS Transaction Server for z/OS (CICS)."
66
sidebar: cdp_sidebar
77
permalink: index.html
88
folder: cdp
99
---
1010

11-
It provides a Node.js CICS deployment workflow for developers and CI/CD automation pipelines similar to that experienced when deploying Node.js applications to the cloud.
11+
It provides a CICS deployment workflow for developers and CI/CD automation pipelines similar to that experienced when deploying applications to cloud environments.
1212

13-
Before you start, and especially if you are not familiar with the world of z/OS, Zowe and CICS, it's a good idea to read about some of the key concepts, which include [Zowe](cdp-zowe-and-cli), [Zowe CLI profiles](cdp-zowe-profiles) and [CICS bundles](cdp-cics-bundles). If you're keen to get going quickly, you can jump right in and follow along with our tutorial on [Deploying your first app](cdp-Deploying-your-first-app).
13+
Before you start, and especially if you are not familiar with the world of z/OS, Zowe and CICS, it's a good idea to read about some of the key concepts, which include [Zowe](cdp-zowe-and-cli), [Zowe CLI profiles](cdp-zowe-profiles) and [CICS bundles](cdp-cics-bundles). If you're keen to get going quickly, you can jump right in and follow along with our tutorial on [Deploying your first Node.js app](cdp-Deploying-your-first-nodejs-app).
1414

15-
When everything has been [installed](cdp-Installation) and [you've created the Zowe CLI profiles](cdp-Create-Zowe-CLI-profiles), you can deploy a Node.js application from your workstation to CICS in two steps:
15+
When everything is [installed](cdp-Installation) and you have [created the Zowe CLI profiles](cdp-Create-Zowe-CLI-profiles), you can deploy an application from your workstation to CICS in two steps:
1616

1717
1. Use the [zowe cics-deploy generate bundle](cdp-CLIReadMe#generate--g--gen) command to generate some metadata and artifacts that help the target CICS system understand your application.
18-
1. Use the [zowe cics-deploy push bundle](cdp-CLIReadMe#push--p) command to push the generated bundle to one or more regions within a CICSplex, enabling and deploying it as an executing application.
18+
19+
2. Use the [zowe cics-deploy push bundle](cdp-CLIReadMe#push--p) command to push the generated bundle to one or more regions within a CICSplex, enabling and deploying it as an executing application.
1920

2021
Should you need it, and if you understand a little more about CICS, further commands like [zowe cics-deploy deploy bundle](cdp-CLIReadMe#deploy--d--dep) and [zowe cics-deploy undeploy bundle](cdp-CLIReadMe#undeploy--u--udep) offer you finer-grained control of the process - for example, to enable you to install a bundle in subsets of CICS regions in a cluster in such a way as to maintain an application's availability for clients.
2122

22-
If you hit any speed bumps on your journey, check out our [Troubleshooting](cdp-Troubleshooting-General) pages.
23+
If you hit any speed bumps on your journey, check out our [Troubleshooting](cdp-Troubleshooting-General) pages.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
title: Provision a CICS region using z/OS PT
3+
tags: [tutorial]
4+
keywords:
5+
summary: "The following steps take you through preparing a z/OS Provisioning Toolkit image for CICS, provisioning a CICS region using the image, and then starting, stopping and deprovisioning it."
6+
sidebar: cdp_sidebar
7+
permalink: cdp-Provision-a-CICS-region-using-zospt.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&nbsp;entry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 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+
You are now ready to deploy applications to the provisioned CICS region. You can try this out by following the steps in [Deploying your first Node.js app](cdp-Deploying-your-first-nodejs-app).
88+
89+
### Stop your CICS region
90+
91+
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:
92+
93+
```console
94+
zowe zos-uss issue ssh "zospt stop my_cics_region"
95+
```
96+
97+
### Start your CICS region
98+
99+
The CICS region can be started after it was previously stopped, or the z/OS system was restarted, by using command:
100+
101+
```console
102+
zowe zos-uss issue ssh "zospt start my_cics_region"
103+
```
104+
105+
### Deprovision your CICS region
106+
107+
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:
108+
109+
```console
110+
zowe zos-uss issue ssh "zospt stop my_cics_region"
111+
zowe zos-uss issue ssh "zospt rm my_cics_region"
112+
```

0 commit comments

Comments
 (0)