From d51ab3a3758f386a7a3b1c06fd5bcd9614e7c576 Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Thu, 1 Nov 2018 16:20:38 -0400 Subject: [PATCH 01/10] Remove http as a default listening server. Just use https. Fix for specifying https via -s on command line Signed-off-by: 1000TurquoisePogs --- config/zluxserver.json | 3 --- js/zluxArgs.js | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/config/zluxserver.json b/config/zluxserver.json index 18fce3957..2454d4d61 100644 --- a/config/zluxserver.json +++ b/config/zluxserver.json @@ -6,9 +6,6 @@ "keys": ["../deploy/product/ZLUX/serverConfig/server.key"], "certificates": ["../deploy/product/ZLUX/serverConfig/server.cert"] }, - "http": { - "port": 8543 - }, "mediationLayer": { "server": { "hostname": "localhost", diff --git a/js/zluxArgs.js b/js/zluxArgs.js index dfe089314..1436e68dd 100644 --- a/js/zluxArgs.js +++ b/js/zluxArgs.js @@ -141,7 +141,7 @@ if (userInput.hostServer) { if (userInput.port) { configJSON.node.http.port = userInput.port; } -if (userInput.securePort && configJSON.https) { +if (userInput.securePort && configJSON.node.https) { configJSON.node.https.port = userInput.securePort; } if (userInput.noChild) { From 9c9c150fdf797b423f50756bfc638ceb27850cfe Mon Sep 17 00:00:00 2001 From: Jordan Filteau Date: Fri, 16 Nov 2018 17:24:14 -0500 Subject: [PATCH 02/10] Updated documentation for chunked uploads. Signed-off-by: Jordan Filteau --- doc/swagger/fileapi.yaml | 75 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 69 insertions(+), 6 deletions(-) diff --git a/doc/swagger/fileapi.yaml b/doc/swagger/fileapi.yaml index 4ac5383e0..b8014b132 100644 --- a/doc/swagger/fileapi.yaml +++ b/doc/swagger/fileapi.yaml @@ -344,6 +344,7 @@ paths: type: string put: summary: writes contents to file or creates non-empty file + description: When writing to a Unix File, the process must be done in chunks of 3MB or less. Please note that your first request will fail because you haven't been assigned a sessionID. If you don't have a sessionID in your request, then the server will assign you one and send it as a response. Please attach this sessionID to every subsequent request as a query parameter. This sessionID is linked to a particular file, so you must use it for the duration of the upload. If you lose it, then the file will be inaccessible via this API until your session timesout in five minutes. When you have specified lastChunk as true, then that signals the end of the upload session; thus, you have sent all the contents of the file. tags: - Unix File parameters: @@ -364,6 +365,11 @@ paths: schema: type: string example: aW50IG1haW4oKSB7CiAgcmV0dXJuIDA7Cn0= + - name: sessionID + in: query + description: the id for current upload session + type: string + required: true - name: sourceEncoding in: query description: the source encoding of the file (UTF-8 or ISO-8859-1 or IBM-1047) @@ -374,34 +380,91 @@ paths: description: the target encoding of the file (UTF-8 or ISO-8859-1 or IBM-1047) type: string required: true + - name: lastChunk + in: query + description: whether or not this is the last chunk of the file + type: boolean + required: true - name: forceOverwrite in: query description: whether or not to overwrite a currently existing file type: boolean + consumes: - text/plain responses: '200': - description: successfully wrote a file + description: OK schema: type: object properties: msg: type: string - '404': - description: file could not be opened or does not exist + sessionID: + type: number + examples: + SessionID: + {msg: Please attach the sessionID to subsequent requests, sessionID: int} + File Already Exists: + {msg: File already exists. Please choose a different file name or attach the forceOverwrite query parameter to your next request.} + Wrote Chunk: + {msg: Successfully wrote chunk to file.} + Wrote File: + {msg: Successfully wrote file.} + Wrote File Without Tag: + {msg: Successfully wrote file but could not tag.} + + '400': + description: Bad Request schema: type: object properties: - error: + msg: + type: string + examples: + Encoding Missing: + {error: Source encoding or target encoding are missing.} + Invalid Encoding: + {error: Invalid encoding arguments. Cannot convert between ASCII and BINARY.} + Invalid Session ID: + {error: Session identifier is invalid.} + + '403': + description: Forbidden + schema: + type: object + properties: + error: type: string + examples: + Resource Busy: + {error: Requested resource is busy. Please try again later.} + '500': - description: failed to write a file + description: Internal Server Error schema: type: object properties: error: type: string + examples: + Failure To Assign Session ID: + {error: Could not assign session id. Please try again later.} + Failed To Write Chunk: + {error: Failed to write chunk to file. Aborting upload.} + Failed To Set Lock: + {error: Could not set lock on file.} + Failed To Get Lock: + {error: Could not test for lock on specified resource.} + Failed To Create Backup: + {error: Could not create backup file.} + Failed To Open File: + {error: Could not open file.} + Failed To Close File: + {error: Could not close file.} + Failed to Get Metadata: + {error: Could not get metadata for file.} + delete: summary: deletes a file tags: @@ -830,4 +893,4 @@ definitions: type: object properties: name: -type: string + type: string \ No newline at end of file From 7713e2cad699f1f391c36cad397bccb1892fac10 Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Mon, 3 Dec 2018 12:43:12 -0500 Subject: [PATCH 03/10] Removing https files that arent needed after adding APIML generated ones Signed-off-by: 1000TurquoisePogs --- config/server-nopass.pfx | Bin 2573 -> 0 bytes config/server.cert | 23 ----------------------- config/server.key | 27 --------------------------- config/server.pfx | Bin 2573 -> 0 bytes 4 files changed, 50 deletions(-) delete mode 100644 config/server-nopass.pfx delete mode 100644 config/server.cert delete mode 100644 config/server.key delete mode 100644 config/server.pfx diff --git a/config/server-nopass.pfx b/config/server-nopass.pfx deleted file mode 100644 index f644a107766cab975b488efc8535d4b7555cda5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2573 zcmY+`X*3j!8V7J=HZxf!TeeJy7}8j?q!MM#goI%bvS-3%Da)A3nx(Rh8QET2C^E#z z?zQ(?Qi2{%HVc2?+e(7q|fsG%tv2IZG;Zg~m?j zMQPIlW}jE0>8~C5E9BGA=I&MuYoM=MHZx7KAvjahiy3v>0{_AKbTj%DL&6rahM zi)~8F!2Xt9f>Q*_Vrcfuedv6a4@;I!#kOVW0lfix=@7xQQ56Khiva0q0zv|MBFb=C zYJB{fef-78nYC{%JCU&j?e*h)1&+cmGMC6>`JMqyg_P!832HFeYAD&(%#wP!Jfr%J zc^wo(m5u@j{OwY?kGAu4)mR*M!lQRYXDc`sLY?ep!vY_eKWtMQZO*XK&OS($@MF+2 z!eq6o`6z*^Upys7i9KnswO%Bk5Px+D$*5WGl>5&9qI-tlsn2vM#Km6ggL*ejiBFjm24X?vJl@?F?+ zXkoj_NX~rMOkwlcFKhZ1$p)+R*;=}6hj@ucB?-QFK7 z`^R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f?$2@Op&eB z*!FXF92krN1-y_Gni`tdJ>=z2Vgmm3tVu@D=i8cKT#~M?xWIFf<-a7}@n_7D&A00U zs7zWv2!2>?;{-5}Y9w5qeNmB#JxFgh*7ZSIiKX!~W$Pz!BZ?-E`5bWFegacgqeDGP6M^w~1O3meG)*>nrPcu`p?>$R7 z)wmUL5;Oj$uG5aMzeZhhvhE?O=-RAO>xlu{UFB)#>Us>dSeGmm=>2lD6j<7O@f}P` z7y7zDTDw5OiKfYPy@MXs6dyaMykWP g5KeZ=^d$56@6g0c*e*PXUXK*EbyvnW=#P^B0zM|a*Z=?k From 11fc8dca2ac0029ae0a48b60598864d381de2d97 Mon Sep 17 00:00:00 2001 From: jordanfilteau1995 <40768142+jordanfilteau1995@users.noreply.github.com> Date: Tue, 11 Dec 2018 15:49:48 -0500 Subject: [PATCH 04/10] Update fileapi.yaml Added a new query parameter and removed info about file locking. Signed-off-by: Jordan Filteau --- doc/swagger/fileapi.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/swagger/fileapi.yaml b/doc/swagger/fileapi.yaml index b8014b132..fe4c8c806 100644 --- a/doc/swagger/fileapi.yaml +++ b/doc/swagger/fileapi.yaml @@ -389,6 +389,10 @@ paths: in: query description: whether or not to overwrite a currently existing file type: boolean + - name: noBackup + in: query + description: whether or not to backup an existing file prior to upload session + type: boolean consumes: - text/plain @@ -452,10 +456,8 @@ paths: {error: Could not assign session id. Please try again later.} Failed To Write Chunk: {error: Failed to write chunk to file. Aborting upload.} - Failed To Set Lock: - {error: Could not set lock on file.} - Failed To Get Lock: - {error: Could not test for lock on specified resource.} + Backup Exists: + {error: Backup file already exists.} Failed To Create Backup: {error: Could not create backup file.} Failed To Open File: @@ -893,4 +895,4 @@ definitions: type: object properties: name: - type: string \ No newline at end of file + type: string From cbef884cc273a3ceded86650e58cdf3c2d3edd97 Mon Sep 17 00:00:00 2001 From: Jordan Filteau Date: Tue, 18 Dec 2018 11:15:15 -0500 Subject: [PATCH 05/10] Minor change to doc. Signed-off-by: Jordan Filteau --- doc/swagger/fileapi.yaml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/doc/swagger/fileapi.yaml b/doc/swagger/fileapi.yaml index fe4c8c806..293dd03cf 100644 --- a/doc/swagger/fileapi.yaml +++ b/doc/swagger/fileapi.yaml @@ -389,10 +389,6 @@ paths: in: query description: whether or not to overwrite a currently existing file type: boolean - - name: noBackup - in: query - description: whether or not to backup an existing file prior to upload session - type: boolean consumes: - text/plain @@ -432,6 +428,8 @@ paths: {error: Invalid encoding arguments. Cannot convert between ASCII and BINARY.} Invalid Session ID: {error: Session identifier is invalid.} + Last Chunk Missing: + {error: Last chunk is missing.} '403': description: Forbidden @@ -441,8 +439,10 @@ paths: error: type: string examples: - Resource Busy: - {error: Requested resource is busy. Please try again later.} + Resource Busy (Duplicate): + {error: Duplicate in table. Requested resource is busy. Please try again later.} + Resource Busy (Could not open file): + {error: Could not open file. Requested resource is busy. Please try again later.} '500': description: Internal Server Error @@ -456,16 +456,18 @@ paths: {error: Could not assign session id. Please try again later.} Failed To Write Chunk: {error: Failed to write chunk to file. Aborting upload.} - Backup Exists: - {error: Backup file already exists.} - Failed To Create Backup: - {error: Could not create backup file.} Failed To Open File: {error: Could not open file.} Failed To Close File: {error: Could not close file.} + Failed to Create File: + {error: Could not create file.} Failed to Get Metadata: {error: Could not get metadata for file.} + Failed to get iNode: + {error: Could not get iNode of file.} + Failed to get deviceID: + {error: Could not get deviceID of file.} delete: summary: deletes a file @@ -895,4 +897,4 @@ definitions: type: object properties: name: - type: string + type: string \ No newline at end of file From 6a0ca1d4d9651c217f8d91254c772b572343ba7a Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Fri, 28 Dec 2018 14:30:59 -0500 Subject: [PATCH 06/10] Switching gitattributes to use zos-working-tree-encoding for references to EBCDIC Signed-off-by: 1000TurquoisePogs --- .gitattributes | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitattributes b/.gitattributes index e8f976258..bc6a04bb0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,10 +2,10 @@ # git's .gitattributes and .gitignore files to be encoded as EBCDIC. # Selected binary files will not be translated at all. # The default for text files -* git-encoding=iso8859-1 working-tree-encoding=ibm-1047 +* git-encoding=iso8859-1 zos-working-tree-encoding=ibm-1047 # git's files (which MUST be ASCII) -.gitattributes git-encoding=iso8859-1 working-tree-encoding=iso8859-1 -.gitignore git-encoding=iso8859-1 working-tree-encoding=iso8859-1 +.gitattributes git-encoding=iso8859-1 zos-working-tree-encoding=iso8859-1 +.gitignore git-encoding=iso8859-1 zos-working-tree-encoding=iso8859-1 # Binary files, selected by file extension. # # Note that "Binary" really just means "Not touched when moved @@ -14,8 +14,6 @@ # # If you don't have these in your tree, removing these from the # .gitattributes file will speed up git's processing a bit. -/build/env.sh git-encoding=iso8859-1 working-tree-encoding=iso8859-1 -sonar-project.properties git-encoding=iso8859-1 working-tree-encoding=iso8859-1 *.jpg git-encoding=BINARY working-tree-encoding=BINARY *.crx git-encoding=BINARY working-tree-encoding=BINARY *.eot git-encoding=BINARY working-tree-encoding=BINARY @@ -46,4 +44,7 @@ sonar-project.properties git-encoding=iso8859-1 working-tree-encoding=iso8859-1 *.woff git-encoding=BINARY working-tree-encoding=BINARY *.woff2 git-encoding=BINARY working-tree-encoding=BINARY *.zip git-encoding=BINARY working-tree-encoding=BINARY - +# Always use LF for npm package files because npm cli likes to change line endings. +package*.json text eol=lf +# sonar scanning +sonar-project.properties git-encoding=iso8859-1 zos-working-tree-encoding=iso8859-1 From fb6aed045ce27a180328aada616ef96fde17d4ef Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Fri, 28 Dec 2018 14:50:31 -0500 Subject: [PATCH 07/10] Fix for tagging the binary files on and off Z Signed-off-by: 1000TurquoisePogs --- .gitattributes | 63 ++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/.gitattributes b/.gitattributes index bc6a04bb0..2862755be 100644 --- a/.gitattributes +++ b/.gitattributes @@ -14,36 +14,39 @@ # # If you don't have these in your tree, removing these from the # .gitattributes file will speed up git's processing a bit. -*.jpg git-encoding=BINARY working-tree-encoding=BINARY -*.crx git-encoding=BINARY working-tree-encoding=BINARY -*.eot git-encoding=BINARY working-tree-encoding=BINARY -*.fdt git-encoding=BINARY working-tree-encoding=BINARY -*.fdx git-encoding=BINARY working-tree-encoding=BINARY -*.gen git-encoding=BINARY working-tree-encoding=BINARY -*.gif git-encoding=BINARY working-tree-encoding=BINARY -*.gz git-encoding=BINARY working-tree-encoding=BINARY -*.ico git-encoding=BINARY working-tree-encoding=BINARY -*.jar git-encoding=BINARY working-tree-encoding=BINARY -*.jpg git-encoding=BINARY working-tree-encoding=BINARY -*.node git-encoding=BINARY working-tree-encoding=BINARY -*.otf git-encoding=BINARY working-tree-encoding=BINARY -*.png git-encoding=BINARY working-tree-encoding=BINARY -*.PNG git-encoding=BINARY working-tree-encoding=BINARY -*.resources git-encoding=BINARY working-tree-encoding=BINARY -*.scss git-encoding=BINARY working-tree-encoding=BINARY -*.segments_1 git-encoding=BINARY working-tree-encoding=BINARY -*.so git-encoding=BINARY working-tree-encoding=BINARY -*.svg git-encoding=BINARY working-tree-encoding=BINARY -*.swp git-encoding=BINARY working-tree-encoding=BINARY -*.tar git-encoding=BINARY working-tree-encoding=BINARY -*.tgz git-encoding=BINARY working-tree-encoding=BINARY -*.tii git-encoding=BINARY working-tree-encoding=BINARY -*.tis git-encoding=BINARY working-tree-encoding=BINARY -*.tree git-encoding=BINARY working-tree-encoding=BINARY -*.ttf git-encoding=BINARY working-tree-encoding=BINARY -*.woff git-encoding=BINARY working-tree-encoding=BINARY -*.woff2 git-encoding=BINARY working-tree-encoding=BINARY -*.zip git-encoding=BINARY working-tree-encoding=BINARY +# +# While it would make sense to have BINARY be BINARY on all platforms, +# Other platforms don't use the BINARY term, But do recognize "binary" macro +*.jpg git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.crx git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.eot git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.fdt git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.fdx git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.gen git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.gif git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.gz git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.ico git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.jar git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.jpg git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.node git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.otf git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.png git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.PNG git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.resources git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.scss git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.segments_1 git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.so git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.svg git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.swp git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.tar git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.tgz git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.tii git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.tis git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.tree git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.ttf git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.woff git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.woff2 git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.zip git-encoding=BINARY zos-working-tree-encoding=BINARY binary # Always use LF for npm package files because npm cli likes to change line endings. package*.json text eol=lf # sonar scanning From 6ab72bd28a949749db6de01b5594987d0f42e463 Mon Sep 17 00:00:00 2001 From: Jordan Filteau Date: Wed, 2 Jan 2019 21:27:22 -0500 Subject: [PATCH 08/10] Minor changes. Signed-off-by: Jordan Filteau --- doc/swagger/fileapi.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/swagger/fileapi.yaml b/doc/swagger/fileapi.yaml index 293dd03cf..569d6f992 100644 --- a/doc/swagger/fileapi.yaml +++ b/doc/swagger/fileapi.yaml @@ -411,8 +411,6 @@ paths: {msg: Successfully wrote chunk to file.} Wrote File: {msg: Successfully wrote file.} - Wrote File Without Tag: - {msg: Successfully wrote file but could not tag.} '400': description: Bad Request @@ -425,7 +423,7 @@ paths: Encoding Missing: {error: Source encoding or target encoding are missing.} Invalid Encoding: - {error: Invalid encoding arguments. Cannot convert between ASCII and BINARY.} + {error: Unsupported encodings requested. Please review the swagger documentation.} Invalid Session ID: {error: Session identifier is invalid.} Last Chunk Missing: @@ -464,10 +462,12 @@ paths: {error: Could not create file.} Failed to Get Metadata: {error: Could not get metadata for file.} - Failed to get iNode: + Failed to Get iNode: {error: Could not get iNode of file.} - Failed to get deviceID: + Failed to Get deviceID: {error: Could not get deviceID of file.} + Failed to Tag: + {error: Could not tag file.} delete: summary: deletes a file From 2f1408b64d19d7375f22afc169c2b617beab230d Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs <30730276+1000TurquoisePogs@users.noreply.github.com> Date: Fri, 11 Jan 2019 16:57:26 -0500 Subject: [PATCH 09/10] Update README.md Update README for App server naming & repository renamnig, and sample App additions. --- README.md | 70 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 947f482a6..a32841fd7 100644 --- a/README.md +++ b/README.md @@ -5,16 +5,16 @@ this distribution, and is available at https://www.eclipse.org/legal/epl-v20.htm SPDX-License-Identifier: EPL-2.0 Copyright Contributors to the Zowe Project. -# zlux-example-server -This is an example of a server built upon the zLUX framework. Within, you will find a collection of build, deploy, and run scripts as well as configuration files that will help you to configure a simple zLUX server with a few Apps included. +# zlux-app-server +This is the default setup of the Zowe App Server, built upon the zLUX framework. Within, you will find a collection of build, deploy, and run scripts as well as configuration files that will help you to configure a simple zLUX server with a few Apps included. ## Server layout -At the core of the zLUX App infrastructure backend is an extensible server, written for nodeJS and utilizing expressJS for routing. It handles the backend components of Apps, and also can server as a proxy for requests from Apps to additional servers as needed. One such proxy destination is the ZSS - the zLUX backend component for **Z Secure Services**. It is recommended that everyone who is going to set up a zLUX install contact Rocket, which can provide the ZSS binary to use in the install. +At the core of the zLUX App infrastructure backend is an extensible server, written for nodeJS and utilizing expressJS for routing. It handles the backend components of Apps, and also can server as a proxy for requests from Apps to additional servers as needed. One such proxy destination is the ZSS - the zLUX backend component for **Z Secure Services**, a so called agent for the App server. It is recommended that everyone who is going to set up a zLUX install contact Rocket, which can provide the ZSS binary to use in the install. ### ZSS & zLUX Server overlap -The zLUX Proxy Server and ZSS utilize the same deployment & App/Plugin structure, and share some configuration parameters as well. It is possible to run ZSS and zLUX Proxy Server from the same system, in which case you would be running under z/OS USS. This configuration requires that IBM's version of nodeJS is installed prior. +The zLUX App Server and ZSS utilize the same deployment & App/Plugin structure, and share some configuration parameters as well. It is possible to run ZSS and zLUX App Server from the same system, in which case you would be running under z/OS USS. This configuration requires that IBM's version of nodeJS is installed prior. -Another way to set up zLUX is to have the zLUX Proxy Server running under LUW, while keeping ZSS under USS. This is the configuration scenario presented below. In this scenario, you'll need to clone these github repositories to two different systems, and they'll need to have compatible configurations. For first-timers, it is fine to have identical configuration files and /plugins folders in order to get going. +Another way to set up zLUX is to have the zLUX App Server running under LUW, while keeping ZSS under USS. This is the configuration scenario presented below. In this scenario, you'll need to clone these github repositories to two different systems, and they'll need to have compatible configurations. For first-timers, it is fine to have identical configuration files and /plugins folders in order to get going. ## First-time Installation & Use Getting started with this server requires just a few steps: @@ -28,15 +28,15 @@ Getting started with this server requires just a few steps: 6. [Run the server](#6-run-the-server) 7. [Connect in a browser!](#7-connect-in-a-browser) -So, with that in mind, follow each step and you'll be on your way to your first zLUX Proxy Server instance! +So, with that in mind, follow each step and you'll be on your way to your first zLUX App Server instance! ### 0. (Optional) Install git for z/OS -Because all of our code is on github, yet ZSS must run on z/OS and the zLUX Proxy Server may optionally run on z/OS as well, having git on z/OS is the most convenient way to work with the source code. The alternative would be to utilize FTP or another method to transfer contents to z/OS. +Because all of our code is on github, yet ZSS must run on z/OS and the zLUX App Server may optionally run on z/OS as well, having git on z/OS is the most convenient way to work with the source code. The alternative would be to utilize FTP or another method to transfer contents to z/OS. If you'd like to go this route, you can find git for z/OS free of charge here: http://www.rocketsoftware.com/product-categories/mainframe/git-for-zos ### 1. Acquire the source code To get started, first clone or download the github capstone repository, https://github.com/zowe/zlux -As we'll be configuring ZSS on z/OS's USS, and the zLUX Proxy Server on a LUW host, you'll need to put the contents on both systems. +As we'll be configuring ZSS on z/OS's USS, and the zLUX App Server on a LUW host, you'll need to put the contents on both systems. If using git, the following commands should be used: ``` git clone --recursive git@github.com:zowe/zlux.git @@ -46,10 +46,10 @@ cd zlux-build ``` At this point, you'll have the latest code from each repository on your system. -Continue from within zlux-example-server. +Continue from within zlux-app-server. ### 2. Acquire external components -Apps and external servers can require contents not found in the Zowe github repositories. In the case of the zlux-example-server, there is a component which cannot be found in the repositories: a ZSS binary. +Apps and external servers can require contents not found in the Zowe github repositories. In the case of the zlux-app-server, there is a component which cannot be found in the repositories: a ZSS binary. If you contact the Zowe project, this will be provided. Afterwards, you should receive *zssServer*. @@ -64,7 +64,7 @@ mv zssServer externals/Rocket ``` ### 3. Set the server configuration -Read the [Configuration](https://github.com/zowe/zlux/wiki/Configuration-for-zLUX-Proxy-Server-&-ZSS) wiki page for a detailed explanation of the primary items that you'll want to configure for your first server. +Read the [Configuration](https://github.com/zowe/zlux/wiki/Configuration-for-zLUX-App-Server-&-ZSS) wiki page for a detailed explanation of the primary items that you'll want to configure for your first server. In short, ensure that within **config/zluxserver.json**, **node.http.port** OR **node.https.port + other HTTPS parameters** are set to your liking on the LUW host, and that **zssPort** is set on the z/OS host. @@ -77,9 +77,9 @@ Edit *../vt-ng2/_defaultVT.json* to set *host* and *port* to a valid ssh host an zLUX Apps can contain server and/or web components. The web components must be built, as webpack is involved in optimized packaging, and server components are also likely to need building if they require external dependencies from NPM, use native code, or are written in typescript. -This example server only needs transpilation and packaging of web components, and therefore we do not need any special build steps for the host running ZSS. +This server only needs transpilation and packaging of web components, and therefore we do not need any special build steps for the host running ZSS. -Instead, on the host running the zLUX Proxy Server, run the script that will automatically build all included Apps. +Instead, on the host running the zLUX App Server, run the script that will automatically build all included Apps. Simply, ``` //Windows @@ -91,21 +91,21 @@ build.sh This will take some time to complete. ### 5. Deploy server configuration files -If you are running the zLUX Proxy Server seperate from ZSS, you must ensure the ZSS installation has its configuration deployed. You can accomplish this via: +If you are running the zLUX App Server seperate from ZSS, you must ensure the ZSS installation has its configuration deployed. You can accomplish this via: ``` ant deploy ``` -On the other hand, if you are running ZSS and the zLUX Proxy Server on the same host, *build.sh* and *build.bat* execute *deploy* and therefore this task was accomplished in step #4. +On the other hand, if you are running ZSS and the zLUX App Server on the same host, *build.sh* and *build.bat* execute *deploy* and therefore this task was accomplished in step #4. -However, if you need to change the server configuration files or want to add more Apps to be included at startup, you'll need to update the deploy content to reflect this. Simply running deploy.bat or deploy.sh will accomplish this, but files such as zluxserver.json are only read at startup, so a reload of the zLUX Proxy Server & ZSS would be required. +However, if you need to change the server configuration files or want to add more Apps to be included at startup, you'll need to update the deploy content to reflect this. Simply running deploy.bat or deploy.sh will accomplish this, but files such as zluxserver.json are only read at startup, so a reload of the zLUX App Server & ZSS would be required. ### 6. Run the server At this point, all server files have been configured and Apps built, so ZSS and the App server are ready to run. First, from the z/OS system, start ZSS. ``` -cd ../zlux-example-server/bin +cd ../zlux-app-server/bin ./zssServer.sh ``` This should start the zssServer. If the server did not start, two common sources of error are: @@ -113,9 +113,9 @@ This should start the zssServer. If the server did not start, two common sources 1. The *zssPort* chosen is already occupied. To fix, edit *config/zluxserver.json* to choose a new one, and re-run *build/deploy.sh* to have that change take effect. 2. The zssServer binary does not have the APF bit set. Since this server is meant for secure services, it is required. To fix, execute `extattr +a zssServer`. Note you may need to alter the execute permissions of zssServer.sh in the event that the previous command is not satisfactory (eg chmod +x zssServer.sh) -Second, from the system with the zLUX Proxy Server, start it with a few parameters to hook it to ZSS. +Second, from the system with the zLUX App Server, start it with a few parameters to hook it to ZSS. ``` -cd ../zlux-example-server/bin +cd ../zlux-app-server/bin // Windows: nodeServer.bat @@ -126,41 +126,43 @@ nodeServer.sh Valid parameters for nodeServer are as follows: - *-h*: Specifies the hostname where ZSS can be found. Use as *-h \* - *-P*: Specifies the port where ZSS can be found. Use as *-P \*. This overrides *zssPort* from the configuration file. -- *-p*: Specifies the HTTP port to be used by the zLUX Proxy Server. Use as *-p *. This overrides *node.http.port* from the configuration file. -- *-s*: Specifies the HTTPS port to be used by the zLUX Proxy Server. Use as *-s *. This overrides *node.https.port* from the configuration file. +- *-p*: Specifies the HTTP port to be used by the zLUX App Server. Use as *-p *. This overrides *node.http.port* from the configuration file. +- *-s*: Specifies the HTTPS port to be used by the zLUX App Server. Use as *-s *. This overrides *node.https.port* from the configuration file. - *--noChild*: If specified, tells the server to ignore and skip spawning of child processes defined as *node.childProcesses* in the configuration file. -In the example where we're running ZSS on a host named mainframe.zowe.com, running on zssPort = 19997, the Proxy server running on Windows could be started with the following: +In the example where we're running ZSS on a host named mainframe.zowe.com, running on zssPort = 19997, the App server running on Windows could be started with the following: `nodeServer.bat -h mainframe.zowe.com -P 19997 -p 19998` -After which we'd be able to connect to the Proxy server at port 19998. +After which we'd be able to connect to the App server at port 19998. -**NOTE: the parameter parsing is provided by [argumentParser.js](https://github.com/zowe/zlux-proxy-server/blob/master/js/argumentParser.js), which allows for a few variations of input, depending on preference. For example, the following are all valid ways to specify the ZSS host** +**NOTE: the parameter parsing is provided by [argumentParser.js](https://github.com/zowe/zlux-server-framework/blob/master/js/argumentParser.js), which allows for a few variations of input, depending on preference. For example, the following are all valid ways to specify the ZSS host** - **-h myhost.com** - **-h=myhost.com** - **--hostServer myhost.com** - **--hostServer=myhost.com** -When the zLUX Proxy Server has started, one of the last messages you will see as bootstrapping completes is that the server is listening on the HTTP/s port. At this time, you should be able to use the server. +When the zLUX App Server has started, one of the last messages you will see as bootstrapping completes is that the server is listening on the HTTP/s port. At this time, you should be able to use the server. ### 7. Connect in a browser -Now that ZSS & the zLUX Proxy Server are both started, you can access this instance by pointing your web browser to the zLUX Proxy Server. -In this example, the address you will want to go to first is the location of the window management App - Mainframe Virtual Desktop (MVD). +Now that ZSS & the zLUX App Server are both started, you can access this instance by pointing your web browser to the zLUX App Server. +In this example, the address you will want to go to first is the location of the window management App - Zowe Desktop. The URL for this is: -http(s)://\:\/ZLUX/plugins/org.zowe.zlux.bootstrap/web/index.html +http(s)://\:\/ZLUX/plugins/org.zowe.zlux.bootstrap/web/index.html -Once here, you should be greeted with a Login screen and a few example Apps in the taskbar at the bottom of the screen. You can login with your mainframe credentials, and try out a few Apps to see how they interact with the framework: -- tn3270-ng2: This App communicates with the zLUX Proxy Server to enable a TN3270 connection in the browser +Once here, you should be greeted with a Login screen and a few Apps in the taskbar at the bottom of the screen. You can login with your mainframe credentials, and try out a few Apps to see how they interact with the framework: +- tn3270-ng2: This App communicates with the zLUX App Server to enable a TN3270 connection in the browser - subsystems: This App shows various z/OS subsystems installed on the host the ZSS runs on. This is accomplished via discovery of these services by the App's portion running in the ZSS context. -- sample-app: A simple app showing how a zLUX App frontend (Angular) component can communicate with an App backend (REST) component. +- sample-angular-app: A simple app showing how a zLUX App frontend (here, Angular) component can communicate with an App backend (REST) component. +- sample-react-app: Similar to the Angular App, but using React instead to show how you have the flexibility to use a framework of your choice. +- sample-iframe-app: Similar in functionality to the Angular & React Apps, but presented via inclusion of an iframe, to show that even pre-existing pages can be included #### Deploy example ``` -// All paths relative to zlux-example-server/js or zlux-example-server/bin +// All paths relative to zlux-app-server/js or zlux-app-server/bin // In real installations, these values will be configured during the install. "rootDir":"../deploy", "productDir":"../deploy/product", @@ -177,11 +179,11 @@ In the configuration file, a directory can be specified which contains JSON file To include Apps, be sure to define the location of the Plugins directory in the configuration file, via the top-level attribute *pluginsDir* -**NOTE: In this repository, the directory for these JSON files is /plugins. Yet, in order to seperate configuration files from runtime files, the zlux-example-server repository copies the contents of this folder into /deploy/instance/ZLUX/plugins. So, the example configuration file uses the latter directory.** +**NOTE: In this repository, the directory for these JSON files is /plugins. Yet, in order to seperate configuration files from runtime files, the zlux-app-server repository copies the contents of this folder into /deploy/instance/ZLUX/plugins. So, the example configuration file uses the latter directory.** #### Plugins directory example ``` -// All paths relative to zlux-example-server/js or zlux-example-server/bin +// All paths relative to zlux-app-server/js or zlux-app-server/bin // In real installations, these values will be configured during the install. //... "pluginsDir":"../deploy/instance/ZLUX/plugins", From 6494e9865bf2dd7950f5f6c014c396fb1252c4ba Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Mon, 14 Jan 2019 16:25:00 -0500 Subject: [PATCH 10/10] Merged master, updated default to HTTPS, and fixed case for enabling HTTP when config file is missing the object Signed-off-by: 1000TurquoisePogs --- js/zluxArgs.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/js/zluxArgs.js b/js/zluxArgs.js index 5af6dc417..34152bdfe 100644 --- a/js/zluxArgs.js +++ b/js/zluxArgs.js @@ -71,12 +71,20 @@ const DEFAULT_CONFIG = { "pluginsDir":"../deploy/instance/"+PRODUCT_CODE+"/plugins", "node": { - "http": { - "port": 8543 + "https": { + "port": 8544, + //pfx (string), keys, certificates, certificateAuthorities, and certificateRevocationLists are all valid here. + "keys": ["../deploy/product/ZLUX/serverConfig/zlux.keystore.key"], + "certificates": ["../deploy/product/ZLUX/serverConfig/zlux.keystore.cer"], + "certificateAuthorities": ["../deploy/product/ZLUX/serverConfig/apiml-localca.cer"] }, - "eureka": { - "hostname": "localhost", - "port": 10011 + "mediationLayer": { + "server": { + "hostname": "localhost", + "port": 10011, + "isHttps": false + }, + "enabled": false } }, "dataserviceAuthentication": { @@ -139,6 +147,7 @@ if (userInput.hostServer) { zssHost = userInput.hostServer; } if (userInput.port) { + if (!configJSON.node.http) { configJSON.node.http = {}; } configJSON.node.http.port = userInput.port; } if (userInput.securePort && configJSON.node.https) {