Skip to content

Commit ba84297

Browse files
committed
Add more help for Deploying your first app topic
Also fix a typo in home page.
1 parent a608a1c commit ba84297

File tree

2 files changed

+40
-12
lines changed

2 files changed

+40
-12
lines changed

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

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,59 @@ toc: false
1111

1212
1. Install the Zowe CLI and cics-deploy plugin by following the steps in [Installation](cdp-Installation).
1313

14-
1. 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).
14+
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).
1515

16-
1. Create a Node.js application.
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):
1719

18-
For example, to create a Node.js application using the Express Generator:
1920
```console
2021
npm install -g express-generator
2122
express myExpressApp
2223
cd myExpressApp
2324
npm install
2425
npm start
2526
```
26-
The Node.js web server will start and you can browse to [http://localhost:3000](http://localhost:3000) to see the running application. Use CTRL+C to stop the Node.js web server.
2727

28-
1. Package the Node.js application into a CICS bundle. The port needs to be available for use by the CICS region on z/OS.
28+
The Node.js application will start. You can call the application from a browser using URL [http://localhost:3000/](http://localhost:3000/), and press CTRL+C to stop it.
2929

30-
```console
31-
zowe cics-deploy generate bundle --startscript app.js --port 3000 --overwrite
32-
```
30+
4. Package the Node.js application into a CICS bundle.
3331

34-
1. Deploy the CICS bundle into CICS. Replace the value for `--targetdir` with a directory on z/OS that your user ID has write access to, and the CICS region user ID has read access to.
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.
3533

3634
```console
37-
zowe cics-deploy push bundle --name Express --targetdir /u/userid/bundles --overwrite
35+
zowe cics-deploy generate bundle --port 3000 --overwrite
3836
```
3937

38+
The output will show the directories and files created to form a CICS bundle:
39+
40+
```console
41+
define : NODEJSAPP "myexpressapp" with startscript "./bin/www"
42+
create : nodejsapps
43+
create : nodejsapps/myexpressapp.nodejsapp
44+
create : nodejsapps/myexpressapp.profile
45+
create : .zosattributes
46+
create : META-INF
47+
create : META-INF/cics.xml
48+
CICS Bundle generated with bundleid "myexpressapp"
49+
```
50+
51+
5. Deploy the CICS bundle into CICS.
52+
53+
Replace the value for `--name` with the name of the BUNDLE resource to be created in CICS.
54+
55+
```console
56+
zowe cics-deploy push bundle --name Express --overwrite
57+
```
58+
59+
A progress bar is shown and updated 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.
60+
61+
6. Test the Node.js application.
62+
63+
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.
64+
65+
You can make changes to the application and redeploy it by repeating step 5.
66+
4067
### Results
41-
The Node.js web server will start and you can browse to [http://myzos:3000](http://myzos:3000) to see the running application.
68+
69+
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.

docs/pages/cdp/cdp-Home.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ It aims to provide an experience for developers and CI/CD automation pipelines s
1313
The plug-in provides the following commands:
1414
* [zowe cics-deploy generate bundle]({{ site.path_to_generated_docs }}CLIReadme.md#module-generate) - Generate a CICS bundle in the working directory. Typically used by developers to package their existing application as a CICS bundle.
1515

16-
* [zowe cics-deploy push bundle]({{ site.path_to_generated_docs }}CLIReadme.md#module-push) - Firstly undeploy the previous version of the CICS bundle from CICS incase it was been previously deployed. Then copy the bundle from the working directory to a z/OS directory, and run npm to install dependencies for each Node.js application in the bundle. Finally deploy the bundle to one or more CICS regions within a CICSplex. Typically used by developers to deploy applications in CICS ready for testing.
16+
* [zowe cics-deploy push bundle]({{ site.path_to_generated_docs }}CLIReadme.md#module-push) - Firstly undeploy the previous version of the CICS bundle from CICS incase it had been previously deployed. Then copy the bundle from the working directory to a z/OS directory, and run npm to install dependencies for each Node.js application in the bundle. Finally deploy the bundle to one or more CICS regions within a CICSplex. Typically used by developers to deploy applications in CICS ready for testing.
1717

1818
* [zowe cics-deploy deploy bundle]({{ site.path_to_generated_docs }}CLIReadme.md#module-deploy) - Deploy a CICS bundle that is in a z/OS directory to one more CICS regions within a CICSplex. The DFHDPLOY utility is used to define the BUNDLE resource in a CICS system definition (CSD) file or CPSM Business Application Services (BAS) file, then install and enable the resource in the target CICS regions. Typically used by developers and CI-CD pipelines that require more precise control when deploying applications to CICS, for example to install the bundle in subsets of CICS regions in a cluster in a manner that maintains the availability of the application for clients.
1919

0 commit comments

Comments
 (0)