Skip to content

Commit 5c566b4

Browse files
authored
Merge pull request #177 from markcocker/master
Update tutorial to focus on deploying Node.js apps
2 parents 675c5fd + 7d73dfe commit 5c566b4

7 files changed

+48
-47
lines changed

docs/_data/sidebars/cdp_sidebar.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ 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: Deploying into z/OS PT CICS region
34-
url: /cdp-Deploying-into-zospt-cics-region.html
33+
- title: Provision a CICS region using z/OS PT
34+
url: /cdp-Provision-a-CICS-region-using-zospt.html
3535
output: web
3636

3737
- title: Concepts
@@ -43,7 +43,7 @@ entries:
4343
- title: Zowe CLI profiles
4444
url: /cdp-zowe-profiles.html
4545
output: web
46-
- title: CICS Bundles
46+
- title: CICS bundles
4747
url: /cdp-cics-bundles.html
4848
output: web
4949

@@ -73,7 +73,7 @@ entries:
7373
url: cdp-CLIReadMe#set-default--set
7474
output: web
7575

76-
- title: Commands - CICS deploy
76+
- title: Commands - zowe cics-deploy
7777
output: web
7878
folderitems:
7979
- 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.

docs/pages/cdp/cdp-Deploying-into-zospt-cics-region.md renamed to docs/pages/cdp/cdp-Provision-a-CICS-region-using-zospt.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Provision a CICS region using z/OS PT and deploy a Node.js application
3-
tags: [getting_started]
2+
title: Provision a CICS region using z/OS PT
3+
tags: [tutorial]
44
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."
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."
66
sidebar: cdp_sidebar
7-
permalink: cdp-Deploying-into-zospt-cics-region.html
7+
permalink: cdp-Provision-a-CICS-region-using-zospt.html
88
folder: cdp
99
toc: true
1010
---
@@ -84,11 +84,7 @@ zospt build $ZOSPTIMAGE -t cics_55_nodejs
8484
zowe profiles update cics-deploy cics --scope CICPY000 --bundle-directory /u/cicprov/mnt/CICPY000/bundles
8585
```
8686

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-
```
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).
9288

9389
### Stop your CICS region
9490

0 commit comments

Comments
 (0)