Skip to content

Commit

Permalink
Merge pull request #340 from cxharris/dev
Browse files Browse the repository at this point in the history
Fixed broken links and updated install instructions
  • Loading branch information
tasha-m-k authored Jul 17, 2020
2 parents 9cc6444 + 85c05c1 commit 1cec203
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 155 deletions.
72 changes: 36 additions & 36 deletions docs/pages/cdp/cdp-Creating-Zowe-CLI-profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ See [Zowe CLI profiles](cdp-Zowe-CLI-profiles) for an overview of profiles.

The CICS® deploy plug-in makes use of the following profiles:

| Profile | Used by command | Connects to z/OS® server |
| --- | --- | --- |
| [z/OSMF profile](#zosmf-profile) | **zowe cics-deploy ...** <br /> zowe console ... <br /> zowe zos-files ... <br /> zowe zos-jobs ... <br /> zowe zos-tso ... <br /> zowe zos-workflows ... <br /> zowe zosmf ... <br /> zowe provisioing ... | z/OSMF |
| [SSH profile](#ssh-profile) | **zowe cics-deploy push ...** <br /> zowe zos-uss ... | SSH |
| [CICS deploy profile](#cics-deploy-profile) | **zowe cics-deploy ...** | |
| [CICS profile](#cics-profile) | **zowe cics-deploy push ...** <br /> zowe cics ... | CICSPlex® SM WUI |
| Profile | Used by command | Connects to z/OS® server |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| [z/OSMF profile](#zosmf-profile) | **zowe cics-deploy ...** <br /> zowe console ... <br /> zowe zos-files ... <br /> zowe zos-jobs ... <br /> zowe zos-tso ... <br /> zowe zos-workflows ... <br /> zowe zosmf ... <br /> zowe provisioing ... | z/OSMF |
| [SSH profile](#ssh-profile) | **zowe cics-deploy push ...** <br /> zowe zos-uss ... | SSH |
| [CICS deploy profile](#cics-deploy-profile) | **zowe cics-deploy ...** | |
| [CICS profile](#cics-profile) | **zowe cics-deploy push ...** <br /> zowe cics ... | CICSPlex® SM WUI |

### z/OSMF profile

The z/OSMF profile defines the options needed to connect to the z/OSMF server on z/OS. You need to know the following from your z/OS system administrator:

| Option | Description |
| --- | --- |
| host | Host name of the z/OSMF server. |
| port | Port number of the z/OSMF server. |
| user | User ID to identify yourself to the z/OSMF server. |
| Option | Description |
| -------- | --------------------------------------------------- |
| host | Host name of the z/OSMF server. |
| port | Port number of the z/OSMF server. |
| user | User ID to identify yourself to the z/OSMF server. |
| password | Password to identify yourself to the z/OSMF server. |

{% include note.html content="The user ID needs to have sufficient permissions to remove and create directories and files in the directory specified by `--targetdir` in the cics-deploy profile. The user ID also needs permission to submit JCL and to run the DFHDPLOY utility as described in the **Security** heading in topic [Automate the deployment and undeployment of CICS bundles and applications with the DFHDPLOY utility](https://www.ibm.com/support/knowledgecenter/SSGMCP_5.5.0/applications/deploying/dfhdploy_overview.html)." %}
Expand All @@ -55,12 +55,12 @@ zowe zosmf check status

The SSH profile defines the options needed to connect to the SSH server on z/OS. You need to know the following from your z/OS system administrator:

| Option | Description |
| --- | --- |
| host | Host name of the SSH server. |
| port | Port number of the SSH server. This will default to 22. |
| user | User ID to identify yourself to the SSH server. |
| password | Password to identify yourself to the SSH server. |
| Option | Description |
| -------- | ------------------------------------------------------- |
| host | Host name of the SSH server. |
| port | Port number of the SSH server. This will default to 22. |
| user | User ID to identify yourself to the SSH server. |
| password | Password to identify yourself to the SSH server. |

{% include note.html content="It is recommended that you use the same user ID and host name to connect with SSH as is used in the z/OSMF profile, failure to do so results in undefined behaviour. When an SSH connection is made, the user's remote [z/OS shell .profile](https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.bpxa400/cupro.htm) is used to set-up the shell environment and variables. This remote .profile should include any necessary environment variables and npm configuration required to run `npm install`. This is described in [Installing and configuring](https://www.ibm.com/support/knowledgecenter/SSTRRS_6.0.0/com.ibm.nodejs.zos.v6.doc/install.htm)." %}

Expand All @@ -84,19 +84,19 @@ zowe zos-uss issue ssh 'uname -a'

### CICS deploy profile

The cics-deploy profile identifies the CICS environment for deployment. An example of how to create an environment using using z/OS Provisioning Toolkit as described in [Provisioning a CICS region using z/OS PT](cdp-Provisioning-a-CICS-region-using-zospt). You need to know the following from your CICS system administrator:
The cics-deploy profile identifies the CICS environment for deployment. See [Provisioning a CICS region using z/OS PT](cdp-Provisioning-a-CICS-region) for an example of how to create an environment using z/OS Provisioning Toolkit. You need to know the following from your CICS system administrator:

| Option | Description |
| --- | --- |
| cicsplex | CPSM CICSplex name. |
| cics-hlq | High Level Qualifier \(HLQ\) for the CICS data sets. |
| cpsm-hlq | High Level Qualifier \(HLQ\) for the CPSM data sets. |
| scope | CPSM scope to identify the CICS region or group of regions to deploy your application. |
| Option | Description |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cicsplex | CPSM CICSplex name. |
| cics-hlq | High Level Qualifier \(HLQ\) for the CICS data sets. |
| cpsm-hlq | High Level Qualifier \(HLQ\) for the CPSM data sets. |
| scope | CPSM scope to identify the CICS region or group of regions to deploy your application. |
| csd-group or res-group | CICS CSD group name or CPSM BAS resource group name into which the bundle is defined. If not specified, BUNDLE resources are defined in CPSM BAS for installation and then removed. |
| job-card | JCL jobcard to use when submitting JCL that will run the CICS utility DFHDPLOY. If not specified, a default job card will be used. |
| target-directory | Target directory on z/OS to which CICS bundles should be uploaded. |
| job-card | JCL jobcard to use when submitting JCL that will run the CICS utility DFHDPLOY. If not specified, a default job card will be used. |
| target-directory | Target directory on z/OS to which CICS bundles should be uploaded. |

For example to create a cics-deploy profile:
For example, to create a cics-deploy profile:

```text
zowe profiles create cics-deploy-profile cics --cicsplex PLEX1 --cics-hlq CICSTS55.CICS720 --cpsm-hlq CICSTS55.CPSM550 --scope CICPY000 --csd-group BUNDGRP1 --target-directory /var/cicsts/bundles --overwrite
Expand All @@ -114,15 +114,15 @@ To test the cics-deploy profile, follow the steps in [Deploying a Node.js applic

The CICS profile identifies the connection to the CICS Web User Interface (WUI) server to query application resources. You need to know the following from your CICS system administrator:

| Option | Description |
| --- | --- |
| cics-plex | CPSM CICSplex name. This will typically be set to the same as cicsplex in the cics-deploy profile. |
| region-name | The name of the CICS region name to interact with. |
| protocol | HTTP or HTTPS to use to connect to the CICS WUI server. |
| host | Host name of the CICS WUI server. |
| port | Port number of the CICS WUI server. |
| user | User ID to identify yourself to the CICS WUI server . |
| password | Password to identify yourself to the CICS WUI server. |
| Option | Description |
| ----------- | -------------------------------------------------------------------------------------------------- |
| cics-plex | CPSM CICSplex name. This will typically be set to the same as cicsplex in the cics-deploy profile. |
| region-name | The name of the CICS region name to interact with. |
| protocol | HTTP or HTTPS to use to connect to the CICS WUI server. |
| host | Host name of the CICS WUI server. |
| port | Port number of the CICS WUI server. |
| user | User ID to identify yourself to the CICS WUI server . |
| password | Password to identify yourself to the CICS WUI server. |

For example, to create an SSH profile:

Expand Down
101 changes: 51 additions & 50 deletions docs/pages/cdp/cdp-Deploying-a-nodejs-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Deploying a Node.js application
tags: [tutorial]
keywords:
summary: "The following steps take you through creating a Node.js application using the Express Application Generator then deploying it to CICS®."
summary: 'The following steps take you through creating a Node.js application using the Express Application Generator then deploying it to CICS®.'
sidebar: cdp_sidebar
permalink: cdp-Deploying-a-Nodejs-application.html
folder: cdp
Expand All @@ -11,7 +11,7 @@ toc: true

### Before you begin

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 [Provisioning a CICS region using z/OS® PT](cdp-Provisioning-a-CICS-region-using-zospt) to provision one, or speak to your CICS system administrator.
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 (or higher) region, use the steps in [Provisioning a CICS region using z/OS® PT](cdp-Provisioning-a-CICS-region) to provision one, or speak to your CICS system administrator.

### Procedure

Expand All @@ -21,81 +21,82 @@ CICS TS V5.5 introduced support to run Node.js applications and is required by t

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

```text
npm install -g express-generator
express myExpressApp
cd myExpressApp
npm install
npm start
```
```text
npm install -g express-generator
express myExpressApp
cd myExpressApp
npm install
npm start
```
The Node.js application will start. You can call the application from a browser by using URL [http://localhost:3000/](http://localhost:3000/). To stop the application in the console press CTRL+C.
The Node.js application will start. You can call the application from a browser by using URL [http://localhost:3000/](http://localhost:3000/). To stop the application in the console press CTRL+C.
4. Package the Node.js application into a [CICS bundle](cdp-CICS-bundles).
Make sure that you are in the root directory of the application.
Make sure that 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. This sets the PORT environment variable in the generated `.profile` file. Additional variables can be set by editing this file.
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.
```console
zowe cics-deploy generate bundle --port 3000 --overwrite
```
```console
zowe cics-deploy generate bundle --port 3000 --overwrite
```
The output indicates the directories and files that are created to form a CICS bundle. For example:
The output indicates the directories and files that are created to form a CICS bundle. For example:
<pre class="messageText">
define : NODEJSAPP "myexpressapp" with startscript "./bin/www"
create : nodejsapps
create : nodejsapps/myexpressapp.nodejsapp
create : nodejsapps/myexpressapp.profile
create : .zosattributes
create : META-INF
create : META-INF/cics.xml
CICS Bundle generated with bundleid "myexpressapp"</pre>
<pre class="messageText">
define : NODEJSAPP "myexpressapp" with startscript "./bin/www"
create : nodejsapps
create : nodejsapps/myexpressapp.nodejsapp
create : nodejsapps/myexpressapp.profile
create : .zosattributes
create : META-INF
create : META-INF/cics.xml
CICS Bundle generated with bundleid "myexpressapp"</pre>
5. Confirm that the Node.js version installed on z/OS is suitable for your application.
```text
zowe zos-uss issue ssh "node --version"
```
The output should indicate the installed version of Node.js.
```text
zowe zos-uss issue ssh "node --version"
```
6. Deploy the CICS bundle into CICS.
The output should indicate the installed version of Node.js.
```text
zowe cics-deploy push bundle --name Express --overwrite
```
6. Deploy the CICS bundle into CICS.
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:
```text
zowe cics-deploy push bundle --name Express --overwrite
```
<pre class="messageText">
Regions in scope 'CICPY000' of CICSplex 'ZOSPTINT':
Applid: CICPY000 jobname: CICPY000 jobid: STC35860 sysname: MV2C
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:
NODEJSAPP resources for bundle 'Express' in scope 'CICPY000':
NODEJSAPP resource 'Express' is in 'ENABLED' state in region 'CICPY000' with process id '16844444'.
stdout: /u/cicprov/mnt/CICPY000/workdir/CICPY000/myexpressapp/Express/D20190612.T144609.stdout
stderr: /u/cicprov/mnt/CICPY000/workdir/CICPY000/myexpressapp/Express/D20190612.T144609.stderr
PUSH operation completed</pre>
<pre class="messageText">
Regions in scope 'CICPY000' of CICSplex 'ZOSPTINT':
Applid: CICPY000 jobname: CICPY000 jobid: STC35860 sysname: MV2C
NODEJSAPP resources for bundle 'Express' in scope 'CICPY000':
NODEJSAPP resource 'Express' is in 'ENABLED' state in region 'CICPY000' with process id '16844444'.
stdout: /u/cicprov/mnt/CICPY000/workdir/CICPY000/myexpressapp/Express/D20190612.T144609.stdout
stderr: /u/cicprov/mnt/CICPY000/workdir/CICPY000/myexpressapp/Express/D20190612.T144609.stderr
PUSH operation completed</pre>
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-Log-and-trace-files).
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-Log-and-trace-files).
7. Test the application.
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.
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.
If you make changes to the application, you can redeploy it by repeating step 5.
If you make changes to the application, you can redeploy it by repeating step 5.
8. View the application output files.
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:
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:
```text
zowe zos-uss issue ssh "tail -f /u/cicprov/mnt/CICPY000/workdir/CICPY000/myexpressapp/Express/D20190612.T144609.stdout"
```
```text
zowe zos-uss issue ssh "tail -f /u/cicprov/mnt/CICPY000/workdir/CICPY000/myexpressapp/Express/D20190612.T144609.stdout"
```
### Results
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.
{% include tip.html content="When writing your own application, follow the guidance in [Best practice for developing Node.js applications](https://www.ibm.com/support/knowledgecenter/SSGMCP_5.5.0/applications/developing/node/best-practice.html) to use environment variables and enable the application to terminate gracefully." %}
{% include tip.html content="When writing your own application, follow the guidance in [Best practice for developing Node.js applications](https://www.ibm.com/support/knowledgecenter/SSGMCP_latest/applications/developing/node/best-practice.html) to use environment variables and enable the application to terminate gracefully." %}
Loading

0 comments on commit 1cec203

Please sign in to comment.