Skip to content

Commit b5dc8ab

Browse files
authored
Merge pull request #256 from markcocker/dev
Add .zosattributes file to zospt tutorial
2 parents 5ad3c62 + 41b60ae commit b5dc8ab

File tree

2 files changed

+54
-25
lines changed

2 files changed

+54
-25
lines changed

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

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

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

24-
```console
24+
```text
2525
npm install -g express-generator
2626
express myExpressApp
2727
cd myExpressApp
@@ -33,41 +33,59 @@ CICS TS V5.5 introduced support to run Node.js applications and is required by t
3333

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

36-
Make sure that you are in the root directory of the application.
36+
Make sure that you are in the root directory of the application.
3737

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.
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.
3939

4040
```console
4141
zowe cics-deploy generate bundle --port 3000 --overwrite
4242
```
4343

44-
The output indicates the directories and files that are created to form a CICS bundle. For example:
44+
The output indicates the directories and files that are created to form a CICS bundle. For example:
4545

46-
<pre class="messageText">
47-
define : NODEJSAPP "myexpressapp" with startscript "./bin/www"
48-
create : nodejsapps
49-
create : nodejsapps/myexpressapp.nodejsapp
50-
create : nodejsapps/myexpressapp.profile
51-
create : .zosattributes
52-
create : META-INF
53-
create : META-INF/cics.xml
54-
CICS Bundle generated with bundleid "myexpressapp"</pre>
46+
<pre class="messageText">
47+
define : NODEJSAPP "myexpressapp" with startscript "./bin/www"
48+
create : nodejsapps
49+
create : nodejsapps/myexpressapp.nodejsapp
50+
create : nodejsapps/myexpressapp.profile
51+
create : .zosattributes
52+
create : META-INF
53+
create : META-INF/cics.xml
54+
CICS Bundle generated with bundleid "myexpressapp"</pre>
5555

5656
5. Deploy the CICS bundle into CICS.
5757

58-
```console
59-
zowe cics-deploy push bundle --name Express --overwrite
60-
```
58+
```text
59+
zowe cics-deploy push bundle --name Express --overwrite
60+
```
61+
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. The command will summarize the deployment, including the Node.js runtime `.stdout` and `.stderr` file names that the application will write output to:
63+
64+
<pre class="messageText">
65+
Regions in scope 'CICPY000' of CICSplex 'ZOSPTINT':
66+
Applid: CICPY000 jobname: CICPY000 jobid: STC35860 sysname: MV2C
6167

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).
68+
NODEJSAPP resources for bundle 'Express' in scope 'CICPY000':
69+
NODEJSAPP resource 'Express' is in 'ENABLED' state in region 'CICPY000' with process id '16844444'.
70+
stdout: /u/cicprov/mnt/CICPY000/workdir/CICPY000/myexpressapp/Express/D20190612.T144609.stdout
71+
stderr: /u/cicprov/mnt/CICPY000/workdir/CICPY000/myexpressapp/Express/D20190612.T144609.stderr
72+
PUSH operation completed</pre>
6373

64-
This results in a CICS BUNDLE resource named `Express` being defined, 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.
74+
This results in a CICS BUNDLE resource named `Express` being defined, 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 application is started. If there are errors, retry with the `--verbose` option for more detailed output, or refer to [Troubleshooting](cdp-Troubleshooting-General).
6575

66-
6. Test the Node.js application.
76+
6. Test the application.
6777

68-
You can call the application from a browser by 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.
78+
You can call the application from a browser by 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.
6979

70-
If you make changes to the application, you can redeploy it by repeating step 5.
80+
If you make changes to the application, you can redeploy it by repeating step 5.
81+
82+
7. View the application output files.
83+
84+
Use the [Zowe](https://marketplace.visualstudio.com/items?itemName=Zowe.vscode-extension-for-zowe) extension for Visual Studio Code or Zowe CLI commands to view the application output files. For example:
85+
86+
```text
87+
zowe zos-uss issue ssh "tail -f /u/cicprov/mnt/CICPY000/workdir/CICPY000/myexpressapp/Express/D20190612.T144609.stdout"
88+
```
7189

7290
### Results
7391

docs/pages/cdp/cdp-Preparing-a-zOS-PT-image.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Run the following commands on your workstation.
3030

3131
3. Setup environment variables for the name of your image, and paths for the image source on the workstation and z/OS.
3232

33-
Update these value for to be suitable for your workstation and z/OS environments.
33+
Update these values to be suitable for your workstation and z/OS environments.
3434

3535
```text
3636
export IMAGE="cics_55_nodejs"
@@ -66,15 +66,26 @@ Run the following commands on your workstation.
6666
| `ENV DFH_NODE_HOME=` | Installation directory for Node.js runtime provided by IBM SDK for Node.js - z/OS. |
6767
| `COPY bundles bundles` | Create an empty `bundles` directory in the provisioned file system to contain CICS bundles. |
6868

69-
6. Upload the image source to z/OS.
69+
6. Create a `.zosattributes` file to upload zosptfile files as UTF-8.
70+
71+
This file is used by the `zowe zos-files upload dir-to-uss` command in the next step to exclude, convert, and tag files that are uploaded.
72+
73+
```properties
74+
cat <<EOF >> $IMAGE_DIR/.zosattributes
75+
# Upload zosptfile files as UTF-8
76+
zosptfile UTF-8 UTF-8
77+
EOF
78+
```
79+
80+
7. Upload the image source to z/OS.
7081

7182
```text
7283
zowe zos-uss issue ssh "rm -Rv *" --cwd "$IMAGE_DIR_ZOS"
7384
zowe zos-uss issue ssh "mkdir -p $IMAGE_DIR_ZOS"
7485
zowe zos-files upload dir-to-uss "$IMAGE_DIR" "$IMAGE_DIR_ZOS" --recursive
7586
```
7687

77-
7. Build the image source on z/OS.
88+
8. Build the image source on z/OS.
7889

7990
```text
8091
zowe zos-uss issue ssh "zospt build -t $IMAGE ." --cwd "$IMAGE_DIR_ZOS"
@@ -96,7 +107,7 @@ Run the following commands on your workstation.
96107

97108
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).
98109

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).
110+
3. Prepare your environment and Node.js application by following steps 1 to 4 in tutorial [Deploying your first Node.js app](cdp-Deploying-your-first-nodejs-app).
100111

101112
4. Setup environment variables for the name of your image, and paths for the image source on the workstation and z/OS.
102113

0 commit comments

Comments
 (0)