From 5b9c6657aa53056b64acb0eca758b435ab896408 Mon Sep 17 00:00:00 2001 From: mm667937 Date: Thu, 26 Sep 2024 16:27:19 +0200 Subject: [PATCH 01/35] need to change USS dir permissions so the target user can successfully run zwe command and change the permissions themselves Signed-off-by: mm667937 --- pswi/03_create.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pswi/03_create.sh b/pswi/03_create.sh index 724ab7ad61..8c4575eb16 100644 --- a/pswi/03_create.sh +++ b/pswi/03_create.sh @@ -161,6 +161,13 @@ echo "iconv -f ISO8859-1 -t IBM-1047 \$source > _ZWECONF;" >> JCL echo "sed 's|UTF-8|IBM-1047|g' _ZWECONF > ZWECONF;" >> JCL echo "cp -T ZWECONF \$target;" >> JCL echo "/*" >> JCL +echo "//CHMODZWE EXEC PGM=BPXBATCH" >> JCL +echo "//STDOUT DD SYSOUT=*" >> JCL +echo "//STDERR DD SYSOUT=*" >> JCL +echo "//STDPARM DD *" >> JCL +echo "SH set -x;set -e;" >> JCL +echo "chmod -R 777 ${ZOWE_MOUNT};" >> JCL +echo "/*" >> JCL sh scripts/submit_jcl.sh "`cat JCL`" if [ $? -gt 0 ];then exit -1;fi From 6282677cab6ad01226791e960eb3360d5dcc415a Mon Sep 17 00:00:00 2001 From: mm667937 Date: Wed, 23 Oct 2024 16:35:51 +0200 Subject: [PATCH 02/35] more detail for failed test about zowe.yaml check Signed-off-by: mm667937 --- pswi/ZWECONF_test.sh | 15 ++++- pswi/scripts/base_diff.txt | 126 +++++++++++++++++++++++-------------- 2 files changed, 93 insertions(+), 48 deletions(-) diff --git a/pswi/ZWECONF_test.sh b/pswi/ZWECONF_test.sh index 346c997e45..29adf86401 100755 --- a/pswi/ZWECONF_test.sh +++ b/pswi/ZWECONF_test.sh @@ -55,6 +55,17 @@ pwd cp ../example-zowe.yaml example-zowe.yaml -diff --ed example-zowe.yaml zowe_.yaml > diff.txt || true +diff example-zowe.yaml zowe_.yaml > diff.txt || true -diff --ed diff.txt scripts/base_diff.txt > final_diff.txt +diff diff.txt scripts/base_diff.txt > final_diff.txt || true + +concat=`cat final_diff.txt` + +if [ -n "$concat" ] +then + echo "There are some discrepancies between the example-zowe.yaml and the zowe.yaml created by ZWECONF.xml workflow." + echo "Please add or delete the workflow so everything is there." + echo "First line is from the example and the line bellow is from the workflow." + echo $concat + exit -1 +fi diff --git a/pswi/scripts/base_diff.txt b/pswi/scripts/base_diff.txt index ad4425a61f..6dd8a5668f 100644 --- a/pswi/scripts/base_diff.txt +++ b/pswi/scripts/base_diff.txt @@ -1,46 +1,80 @@ -471c - home: "#delete_me#" -. -456c - home: "#delete_me#" -. -281c - runtimeDirectory: "/tmp" -. -106c - # directory: -. -100,103c - # certificate: - # Type of certificate storage. Valid values are: PKCS12, JCEKS, JCECCAKS, JCERACFKS, JCECCARACFKS, or JCEHYBRIDRACFKS - # type: - # pkcs12: -. -66,91c - # Security related configurations. This setup is optional. - security: - # security product name. Can be RACF, ACF2 or TSS - product: RACF - # security group name - groups: - # Zowe admin user group - admin: ZWEADMIN - # Zowe STC group - stc: ZWEADMIN - # Zowe SysProg group - sysProg: ZWEADMIN - # security user name - users: - # Zowe runtime user name of main service - zowe: ZWESVUSR - # Zowe runtime user name of ZIS - zis: ZWESIUSR - # STC names - stcs: - # STC name of Zowe main service - zowe: ZWESLSTC - # STC name of Zowe ZIS - zis: ZWESISTC - # STC name of Zowe ZIS Auxiliary Server - aux: ZWESASTC -. +66,91c66,91 +< # # Security related configurations. This setup is optional. +< # security: +< # # security product name. Can be RACF, ACF2 or TSS +< # product: RACF +< # # security group name +< # groups: +< # # Zowe admin user group +< # admin: ZWEADMIN +< # # Zowe STC group +< # stc: ZWEADMIN +< # # Zowe SysProg group +< # sysProg: ZWEADMIN +< # # security user name +< # users: +< # # Zowe runtime user name of main service +< # zowe: ZWESVUSR +< # # Zowe runtime user name of ZIS +< # zis: ZWESIUSR +< # # STC names +< # stcs: +< # # STC name of Zowe main service +< # zowe: ZWESLSTC +< # # STC name of Zowe ZIS +< # zis: ZWESISTC +< # # STC name of Zowe ZIS Auxiliary Server +< # aux: ZWESASTC +--- +> # Security related configurations. This setup is optional. +> security: +> # security product name. Can be RACF, ACF2 or TSS +> product: RACF +> # security group name +> groups: +> # Zowe admin user group +> admin: ZWEADMIN +> # Zowe STC group +> stc: ZWEADMIN +> # Zowe SysProg group +> sysProg: ZWEADMIN +> # security user name +> users: +> # Zowe runtime user name of main service +> zowe: ZWESVUSR +> # Zowe runtime user name of ZIS +> zis: ZWESIUSR +> # STC names +> stcs: +> # STC name of Zowe main service +> zowe: ZWESLSTC +> # STC name of Zowe ZIS +> zis: ZWESISTC +> # STC name of Zowe ZIS Auxiliary Server +> aux: ZWESASTC +100,103c100,103 +< certificate: +< # Type of certificate storage. Valid values are: PKCS12, JCERACFKS. APIML additionally supports: JCEKS, JCECCAKS, JCECCARACFKS, or JCEHYBRIDRACFKS +< type: PKCS12 +< pkcs12: +--- +> # certificate: +> # Type of certificate storage. Valid values are: PKCS12, JCEKS, JCECCAKS, JCERACFKS, JCECCARACFKS, or JCEHYBRIDRACFKS +> # type: +> # pkcs12: +106c106 +< directory: /var/zowe/keystore +--- +> # directory: +281c281 +< runtimeDirectory: "" +--- +> runtimeDirectory: "/tmp" +456c456 +< home: "" +--- +> home: "#delete_me#" +471c471 +< home: "" +--- +> home: "#delete_me#" From 363228a2292f10164537d42e76f75e525877abad Mon Sep 17 00:00:00 2001 From: mm667937 Date: Mon, 4 Nov 2024 15:57:14 +0100 Subject: [PATCH 03/35] smol changes Signed-off-by: mm667937 --- pswi/ZWECONF_test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pswi/ZWECONF_test.sh b/pswi/ZWECONF_test.sh index a7a65263c4..df936b3f56 100755 --- a/pswi/ZWECONF_test.sh +++ b/pswi/ZWECONF_test.sh @@ -55,11 +55,11 @@ pwd cp ../example-zowe.yaml example-zowe.yaml -diff example-zowe.yaml zowe_.yaml > diff.txt || true +diff example-zowe.yaml zowe_.yaml >diff.txt || true -diff diff.txt scripts/base_diff.txt > final_diff.txt || true +diff diff.txt scripts/base_diff.txt >final_diff.txt || true -concat=`cat final_diff.txt` +concat=$(cat final_diff.txt) if [ -n "$concat" ] then From 1253903a0a4cc731dabe64dfda5debfb22a9d69c Mon Sep 17 00:00:00 2001 From: mm667937 Date: Mon, 4 Nov 2024 16:47:08 +0100 Subject: [PATCH 04/35] probably fixed the log problem Signed-off-by: mm667937 --- pswi/ZWECONF_test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pswi/ZWECONF_test.sh b/pswi/ZWECONF_test.sh index df936b3f56..f3a927f036 100755 --- a/pswi/ZWECONF_test.sh +++ b/pswi/ZWECONF_test.sh @@ -4,6 +4,9 @@ export ZOSMF_SYSTEM="S0W1" export JOBNAME="ZWECONF1" export HOST=${ZOSMF_URL#https:\/\/} export BASE_URL="${ZOSMF_URL}:${ZOSMF_PORT}" +CURR_TIME=$(date +%s) +export LOG_DIR="logs/$CURR_TIME" +mkdir -p $LOG_DIR WORK_MOUNT="/tmp" echo "Changing runtime path in ZWECONF.properties." @@ -66,6 +69,7 @@ then echo "There are some discrepancies between the example-zowe.yaml and the zowe.yaml created by ZWECONF.xml workflow." echo "Please add or delete the workflow so everything is there." echo "First line is from the example and the line bellow is from the workflow." + #TODO: while loop final_diff.txt and delete every line that doesn't start with '<' and redirect into final_final_diff.txt and do cat final_final_diff.txt echo $concat exit -1 fi From 0bb131cab460697d934e2d25316b9eca9d9d4cc3 Mon Sep 17 00:00:00 2001 From: mm667937 Date: Mon, 4 Nov 2024 17:16:23 +0100 Subject: [PATCH 05/35] while Signed-off-by: mm667937 --- pswi/ZWECONF_test.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pswi/ZWECONF_test.sh b/pswi/ZWECONF_test.sh index f3a927f036..41901ba08a 100755 --- a/pswi/ZWECONF_test.sh +++ b/pswi/ZWECONF_test.sh @@ -69,7 +69,11 @@ then echo "There are some discrepancies between the example-zowe.yaml and the zowe.yaml created by ZWECONF.xml workflow." echo "Please add or delete the workflow so everything is there." echo "First line is from the example and the line bellow is from the workflow." - #TODO: while loop final_diff.txt and delete every line that doesn't start with '<' and redirect into final_final_diff.txt and do cat final_final_diff.txt - echo $concat + while read -r line; do + if [[ "$line" =~ ^\< ]]; then + echo $line >> final_final_diff.txt + fi + done Date: Tue, 5 Nov 2024 16:09:14 +0100 Subject: [PATCH 06/35] some more info added Signed-off-by: mm667937 --- pswi/ZWECONF_test.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pswi/ZWECONF_test.sh b/pswi/ZWECONF_test.sh index 41901ba08a..186897ccb8 100755 --- a/pswi/ZWECONF_test.sh +++ b/pswi/ZWECONF_test.sh @@ -67,13 +67,20 @@ concat=$(cat final_diff.txt) if [ -n "$concat" ] then echo "There are some discrepancies between the example-zowe.yaml and the zowe.yaml created by ZWECONF.xml workflow." - echo "Please add or delete the workflow so everything is there." - echo "First line is from the example and the line bellow is from the workflow." + echo "Please add to or delete from the ZWECONF.xml workflow what needs or doesn't need to be there." + echo "Eg. if there is a new variable you need to add it first to the workflow variables, then add the variable to the" + echo "'main_variables' step and then also to the step where the zowe.yaml is created." + echo "If there was added/deleted just a comment in the example-zowe.yaml please add it also to the workflow so" + echo "this step is not failing." + echo "Here is the output from the diff command:" # They will surely know what is diff cmd, right while read -r line; do if [[ "$line" =~ ^\< ]]; then echo $line >> final_final_diff.txt fi done Date: Wed, 6 Nov 2024 09:30:17 +0100 Subject: [PATCH 07/35] Use xplatform for logging Signed-off-by: Martin Zeithaml --- CHANGELOG.md | 3 ++- bin/libs/common.ts | 33 +++++++++------------------------ 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47b1fe90de..4d0ce09f1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ All notable changes to the Zowe Installer will be documented in this file. ## `3.0.1` -- Bugfix: When `--log-dir` parameter for `zwe` command is a file, there might be an error "InternalError: stack overflow". [#40nn](https://github.com/zowe/zowe-install-packaging/pull/40nn) +- Bugfix: When logging `zwe` command, sometimes the log has wrong file tag and the log is unreadable. [#40nn](https://github.com/zowe/zowe-install-packaging/pull/40nn) +- Bugfix: When `--log-dir` parameter for `zwe` command is a file, there might be an error "InternalError: stack overflow". [#4064](https://github.com/zowe/zowe-install-packaging/pull/4064) - Enhancement: new javascript funtion `getStatvfs()` to obtain information about the file sysytem [#3994](https://github.com/zowe/zowe-install-packaging/pull/3994) - Enhancement: schema validation update for `zowe.job.name` and `zowe.job.prefix` [#4060](https://github.com/zowe/zowe-install-packaging/pull/4060) diff --git a/bin/libs/common.ts b/bin/libs/common.ts index ad3457926c..47bdd94dcc 100644 --- a/bin/libs/common.ts +++ b/bin/libs/common.ts @@ -128,36 +128,21 @@ export function date(...args: string[]): string|undefined { let logExists = false; -let logFile:std.File|null = null; function writeLog(message: string): boolean { + const filename = std.getenv('ZWE_PRIVATE_LOG_FILE'); + if (!filename) { + return false; + } + logExists = fs.fileExists(filename); if (!logExists) { - const filename = std.getenv('ZWE_PRIVATE_LOG_FILE'); - if (filename) { + fs.createFile(filename, 0o640, message); logExists = fs.fileExists(filename); - if (!logExists) { - fs.createFile(filename, 0o640, message); - logExists = fs.fileExists(filename); - } - if (logExists) { - let errObj = {errno:undefined}; - logFile = std.open(filename, 'w', errObj); - if (errObj.errno) { - printError(`Error opening file ${filename}, errno=${errObj.errno}`); - logFile=null; - logExists=false; - return false; - } - } - } - } - if (logFile===undefined || logFile===null) { - return false; } else { - //TODO this does utf8. should we flip it to 1047 on zos? - logFile.puts(message); - return true; + xplatform.appendFileUTF8(filename, xplatform.AUTO_DETECT, message); + return true; } + return logExists; } From d8f566b05c7c8fd4552a117c560d85c5362d240a Mon Sep 17 00:00:00 2001 From: Martin Zeithaml <66114686+Martin-Zeithaml@users.noreply.github.com> Date: Wed, 6 Nov 2024 09:31:50 +0100 Subject: [PATCH 08/35] Update CHANGELOG.md Signed-off-by: Martin Zeithaml <66114686+Martin-Zeithaml@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d0ce09f1e..a1867a095a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to the Zowe Installer will be documented in this file. ## `3.0.1` -- Bugfix: When logging `zwe` command, sometimes the log has wrong file tag and the log is unreadable. [#40nn](https://github.com/zowe/zowe-install-packaging/pull/40nn) +- Bugfix: When logging `zwe` command, sometimes the log has wrong file tag and the log is unreadable. [#4071](https://github.com/zowe/zowe-install-packaging/pull/4071) - Bugfix: When `--log-dir` parameter for `zwe` command is a file, there might be an error "InternalError: stack overflow". [#4064](https://github.com/zowe/zowe-install-packaging/pull/4064) - Enhancement: new javascript funtion `getStatvfs()` to obtain information about the file sysytem [#3994](https://github.com/zowe/zowe-install-packaging/pull/3994) - Enhancement: schema validation update for `zowe.job.name` and `zowe.job.prefix` [#4060](https://github.com/zowe/zowe-install-packaging/pull/4060) From 91b1e6b5d0912e80f2719988f75f20385ec70f43 Mon Sep 17 00:00:00 2001 From: mm667937 Date: Wed, 6 Nov 2024 12:59:04 +0100 Subject: [PATCH 09/35] line needed splitting Signed-off-by: mm667937 --- pswi/ZWECONF_test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pswi/ZWECONF_test.sh b/pswi/ZWECONF_test.sh index 186897ccb8..c58e53f922 100755 --- a/pswi/ZWECONF_test.sh +++ b/pswi/ZWECONF_test.sh @@ -80,7 +80,8 @@ then done Date: Wed, 6 Nov 2024 13:06:13 +0100 Subject: [PATCH 10/35] formatting Signed-off-by: mm667937 --- pswi/03_create.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pswi/03_create.sh b/pswi/03_create.sh index 16203c2ac4..9915adfd2b 100644 --- a/pswi/03_create.sh +++ b/pswi/03_create.sh @@ -151,13 +151,13 @@ echo "iconv -f ISO8859-1 -t IBM-1047 \$source > _ZWECONF;" >>JCL echo "sed 's|UTF-8|IBM-1047|g' _ZWECONF > ZWECONF;" >>JCL echo "cp -T ZWECONF \$target;" >>JCL echo "/*" >>JCL -echo "//CHMODZWE EXEC PGM=BPXBATCH" >> JCL -echo "//STDOUT DD SYSOUT=*" >> JCL -echo "//STDERR DD SYSOUT=*" >> JCL -echo "//STDPARM DD *" >> JCL -echo "SH set -x;set -e;" >> JCL -echo "chmod -R 777 ${ZOWE_MOUNT};" >> JCL -echo "/*" >> JCL +echo "//CHMODZWE EXEC PGM=BPXBATCH" >>JCL +echo "//STDOUT DD SYSOUT=*" >>JCL +echo "//STDERR DD SYSOUT=*" >>JCL +echo "//STDPARM DD *" >>JCL +echo "SH set -x;set -e;" >>JCL +echo "chmod -R 777 ${ZOWE_MOUNT};" >>JCL +echo "/*" >>JCL sh scripts/submit_jcl.sh "$(cat JCL)" if [ $? -gt 0 ]; then exit -1; fi From 2710f40cbe9df2a73b49655b2f512eb50476c95d Mon Sep 17 00:00:00 2001 From: mm667937 Date: Thu, 7 Nov 2024 14:37:13 +0100 Subject: [PATCH 11/35] Fix of the workflow so the test can finally pass Signed-off-by: mm667937 --- pswi/ZWECONF_test.sh | 2 +- workflows/files/ZWECONF.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pswi/ZWECONF_test.sh b/pswi/ZWECONF_test.sh index c58e53f922..2fb2696dc3 100755 --- a/pswi/ZWECONF_test.sh +++ b/pswi/ZWECONF_test.sh @@ -68,7 +68,7 @@ if [ -n "$concat" ] then echo "There are some discrepancies between the example-zowe.yaml and the zowe.yaml created by ZWECONF.xml workflow." echo "Please add to or delete from the ZWECONF.xml workflow what needs or doesn't need to be there." - echo "Eg. if there is a new variable you need to add it first to the workflow variables, then add the variable to the" + echo "E.g. if there is a new variable you need to add it first to the workflow variables, then add the variable to the" echo "'main_variables' step and then also to the step where the zowe.yaml is created." echo "If there was added/deleted just a comment in the example-zowe.yaml please add it also to the workflow so" echo "this step is not failing." diff --git a/workflows/files/ZWECONF.xml b/workflows/files/ZWECONF.xml index cbee9b53e0..9b8032d02c 100644 --- a/workflows/files/ZWECONF.xml +++ b/workflows/files/ZWECONF.xml @@ -1809,7 +1809,7 @@ echo ' # ZWED_TN3270_PORT: 23' >> "${instance-zowe_runtimeDirectory}/zowe.yam echo '' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # You can define any Zowe message portions to be checked for and the message added to the' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" -echo ' # system log upon its logging, truncated to 126 characters.' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" +echo ' # system log upon its logging, truncated to 126 characters (wildcards are not supported).' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' sysMessages:' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # # Zowe starting' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' - "ZWEL0021I"' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" From 7de81aef969bc869285687979b81e13b7f73904b Mon Sep 17 00:00:00 2001 From: Martin Zeithaml Date: Thu, 14 Nov 2024 12:51:03 +0100 Subject: [PATCH 12/35] Use configmgr to read yaml in shell Signed-off-by: Martin Zeithaml --- CHANGELOG.md | 3 +- bin/commands/init/apfauth/index.sh | 6 ++-- bin/commands/init/certificate/index.sh | 44 +++++++++++++------------- bin/commands/init/index.sh | 4 +-- bin/commands/init/mvs/index.sh | 10 +++--- bin/commands/init/security/index.sh | 24 +++++++------- bin/commands/init/stc/index.sh | 20 ++++++------ bin/commands/init/vsam/index.sh | 16 +++++----- bin/libs/common.sh | 6 ++-- bin/libs/json.sh | 27 ++++++++++++++++ 10 files changed, 94 insertions(+), 66 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b909772b9f..a57296ab00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ All notable changes to the Zowe Installer will be documented in this file. ## `3.0.1` -- Bugfix: When `--log-dir` parameter for `zwe` command is a file, there might be an error "InternalError: stack overflow". [#40nn](https://github.com/zowe/zowe-install-packaging/pull/40nn) +- Enhancement: command `zwe init` does not require NodeJS [#40??](https://github.com/zowe/zowe-install-packaging/pull/40??) +- Bugfix: When `--log-dir` parameter for `zwe` command is a file, there might be an error "InternalError: stack overflow". [#4071](https://github.com/zowe/zowe-install-packaging/pull/4071) - Enhancement: new javascript funtion `getStatvfs()` to obtain information about the file sysytem [#3994](https://github.com/zowe/zowe-install-packaging/pull/3994) - Enhancement: command `zwe diagnose` in javascript only [#4061](https://github.com/zowe/zowe-install-packaging/pull/4061) - Enhancement: schema validation update for `zowe.job.name` and `zowe.job.prefix` [#4060](https://github.com/zowe/zowe-install-packaging/pull/4060) diff --git a/bin/commands/init/apfauth/index.sh b/bin/commands/init/apfauth/index.sh index d248cbb904..06398f846d 100644 --- a/bin/commands/init/apfauth/index.sh +++ b/bin/commands/init/apfauth/index.sh @@ -19,10 +19,10 @@ auth_libs="authLoadlib authPluginLib" ############################### # validation -require_zowe_yaml +require_zowe_yaml "skipnode" # read prefix and validate -prefix=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.prefix") +prefix=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.prefix") if [ -z "${prefix}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe dataset prefix (zowe.setup.dataset.prefix) is not defined in Zowe YAML configuration file." "" 157 fi @@ -32,7 +32,7 @@ fi job_has_failures= for key in ${auth_libs}; do # read def and validate - ds=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.${key}") + ds=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.${key}") if [ -z "${ds}" ]; then # authLoadlib can be empty if [ "${key}" = "authLoadlib" ]; then diff --git a/bin/commands/init/certificate/index.sh b/bin/commands/init/certificate/index.sh index a1d2f5c8dd..f226009c5b 100644 --- a/bin/commands/init/certificate/index.sh +++ b/bin/commands/init/certificate/index.sh @@ -13,24 +13,24 @@ ############################### # validation -require_zowe_yaml +require_zowe_yaml "skipnode" ############################### # read prefix and validate -prefix=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.prefix") +prefix=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.prefix") if [ -z "${prefix}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe dataset prefix (zowe.setup.dataset.prefix) is not defined in Zowe YAML configuration file." "" 157 fi # read JCL library and validate -jcllib=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.jcllib") +jcllib=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.jcllib") if [ -z "${jcllib}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe custom JCL library (zowe.setup.dataset.jcllib) is not defined in Zowe YAML configuration file." "" 157 fi -security_product=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.product") -security_users_zowe=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.users.zowe") -security_groups_admin=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.groups.admin") +security_product=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.product") +security_users_zowe=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.users.zowe") +security_groups_admin=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.groups.admin") # read cert type and validate -cert_type=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.type") +cert_type=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.type") if [ -z "${cert_type}" ]; then print_error_and_exit "Error ZWEL0157E: Certificate type (zowe.setup.certificate.type) is not defined in Zowe YAML configuration file." "" 157 fi @@ -41,16 +41,16 @@ fi # read cert dname for item in caCommonName commonName orgUnit org locality state country; do var_name="dname_${item}" - var_val=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.dname.${item}") + var_val=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.dname.${item}") eval "${var_name}=\"${var_val}\"" done # read cert validity -cert_validity=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.validity") +cert_validity=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.validity") if [ "${cert_type}" = "PKCS12" ]; then # read keystore info for item in directory lock name password caAlias caPassword; do var_name="pkcs12_${item}" - var_val=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.pkcs12.${item}") + var_val=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.pkcs12.${item}") eval "${var_name}=\"${var_val}\"" done if [ -z "${pkcs12_directory}" ]; then @@ -59,7 +59,7 @@ if [ "${cert_type}" = "PKCS12" ]; then # read keystore import info for item in keystore password alias; do var_name="pkcs12_import_${item}" - var_val=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.pkcs12.import.${item}") + var_val=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.pkcs12.import.${item}") eval "${var_name}=\"${var_val}\"" done if [ -n "${pkcs12_import_keystore}" ]; then @@ -75,47 +75,47 @@ elif [[ "${cert_type}" == JCE*KS ]]; then # read keyring info for item in owner name label caLabel; do var_name="keyring_${item}" - var_val=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.keyring.${item}") + var_val=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.keyring.${item}") eval "${var_name}=\"${var_val}\"" done if [ -z "${keyring_name}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe keyring name (zowe.setup.certificate.keyring.name) is not defined in Zowe YAML configuration file." "" 157 fi - keyring_import_dsName=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.keyring.import.dsName") - keyring_import_password=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.keyring.import.password") + keyring_import_dsName=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.keyring.import.dsName") + keyring_import_password=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.keyring.import.password") if [ -n "${keyring_import_dsName}" ]; then keyring_option=3 if [ -z "${keyring_import_password}" ]; then print_error_and_exit "Error ZWEL0157E: The password for data set storing importing certificate (zowe.setup.certificate.keyring.import.password) is not defined in Zowe YAML configuration file." "" 157 fi fi - keyring_connect_user=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.keyring.connect.user") - keyring_connect_label=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.keyring.connect.label") + keyring_connect_user=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.keyring.connect.user") + keyring_connect_label=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.keyring.connect.label") if [ -n "${keyring_connect_label}" ]; then keyring_option=2 fi fi # read keystore domains -cert_import_CAs=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.importCertificateAuthorities" | tr '\n' ',') +cert_import_CAs=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.importCertificateAuthorities" | tr '\n' ',') # read keystore domains -cert_domains=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.san" | tr '\n' ',') +cert_domains=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.san" | tr '\n' ',') if [ -z "${cert_domains}" ]; then - cert_domains=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.externalDomains" | tr '\n' ',') + cert_domains=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.externalDomains" | tr '\n' ',') fi # read z/OSMF info for item in user ca; do var_name="zosmf_${item}" - var_val=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.keyring.zOSMF.${item}") + var_val=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.keyring.zOSMF.${item}") eval "${var_name}=\"${var_val}\"" done for item in host port; do var_name="zosmf_${item}" - var_val=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zOSMF.${item}") + var_val=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zOSMF.${item}") eval "${var_name}=\"${var_val}\"" done keyring_trust_zosmf= -verify_certificates=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.verifyCertificates" | upper_case) +verify_certificates=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.verifyCertificates" | upper_case) if [ "${verify_certificates}" = "STRICT" -o "${verify_certificates}" = "NONSTRICT" ]; then keyring_trust_zosmf="--trust-zosmf" else diff --git a/bin/commands/init/index.sh b/bin/commands/init/index.sh index a2815f2b49..ba87c5ee57 100755 --- a/bin/commands/init/index.sh +++ b/bin/commands/init/index.sh @@ -36,10 +36,10 @@ if [ -z "${yaml_java_home}" ]; then fi fi # zowe.runtimeDirectory -require_zowe_yaml +require_zowe_yaml "skipnode" update_zowe_runtime_dir= # do we have zowe.runtimeDirectory defined in zowe.yaml? -yaml_runtime_dir=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.runtimeDirectory") +yaml_runtime_dir=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.runtimeDirectory") if [ -n "${yaml_runtime_dir}" ]; then result=$(are_directories_same "${yaml_runtime_dir}" "${ZWE_zowe_runtimeDirectory}") code=$? diff --git a/bin/commands/init/mvs/index.sh b/bin/commands/init/mvs/index.sh index 7f1102c95d..ab724fa206 100644 --- a/bin/commands/init/mvs/index.sh +++ b/bin/commands/init/mvs/index.sh @@ -22,10 +22,10 @@ authPluginLib|Zowe authorized plugin library|dsntype(library) dsorg(po) recfm(u) ############################### # validation -require_zowe_yaml +require_zowe_yaml "skipnode" # read prefix and validate -prefix=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.prefix") +prefix=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.prefix") if [ -z "${prefix}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe dataset prefix (zowe.setup.dataset.prefix) is not defined in Zowe YAML configuration file." "" 157 fi @@ -39,7 +39,7 @@ while read -r line; do spec=$(echo "${line}" | awk -F"|" '{print $3}') # read def and validate - ds=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.${key}") + ds=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.${key}") if [ -z "${ds}" ]; then # authLoadlib can be empty if [ "${key}" = "authLoadlib" ]; then @@ -76,7 +76,7 @@ if [ "${ds_existence}" = "true" ] && [ "${ZWE_CLI_PARAMETER_ALLOW_OVERWRITE}" ! else ############################### # copy sample lib members - parmlib=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.parmlib") + parmlib=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.parmlib") for ds in ZWESIP00; do print_message "Copy ${prefix}.${ZWE_PRIVATE_DS_SZWESAMP}(${ds}) to ${parmlib}(${ds})" data_set_copy_to_data_set "${prefix}" "${prefix}.${ZWE_PRIVATE_DS_SZWESAMP}(${ds})" "${parmlib}(${ds})" "${ZWE_CLI_PARAMETER_ALLOW_OVERWRITE}" @@ -88,7 +88,7 @@ else ############################### # copy auth lib members # FIXME: data_set_copy_to_data_set cannot be used to copy program? - authLoadlib=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.authLoadlib") + authLoadlib=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.authLoadlib") if [ -n "${authLoadlib}" ]; then for ds in ZWESIS01 ZWESAUX ZWESISDL; do print_message "Copy components/zss/LOADLIB/${ds} to ${authLoadlib}(${ds})" diff --git a/bin/commands/init/security/index.sh b/bin/commands/init/security/index.sh index b0d2c48551..a07c135ef8 100644 --- a/bin/commands/init/security/index.sh +++ b/bin/commands/init/security/index.sh @@ -18,51 +18,51 @@ print_level1_message "Run Zowe security configurations" ############################### # validation -require_zowe_yaml +require_zowe_yaml "skipnode" # read prefix and validate -prefix=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.prefix") +prefix=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.prefix") if [ -z "${prefix}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe dataset prefix (zowe.setup.dataset.prefix) is not defined in Zowe YAML configuration file." "" 157 fi # read JCL library and validate -jcllib=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.jcllib") +jcllib=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.jcllib") if [ -z "${jcllib}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe custom JCL library (zowe.setup.dataset.jcllib) is not defined in Zowe YAML configuration file." "" 157 fi -security_product=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.product") +security_product=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.product") if [ -z "${security_product}" ]; then security_product=RACF fi -security_groups_admin=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.groups.admin") +security_groups_admin=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.groups.admin") if [ -z "${security_groups_admin}" ]; then security_groups_admin=${ZWE_PRIVATE_DEFAULT_ADMIN_GROUP} fi -security_groups_stc=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.groups.stc") +security_groups_stc=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.groups.stc") if [ -z "${security_groups_stc}" ]; then security_groups_stc=${ZWE_PRIVATE_DEFAULT_ADMIN_GROUP} fi -security_groups_sysProg=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.groups.sysProg") +security_groups_sysProg=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.groups.sysProg") if [ -z "${security_groups_sysProg}" ]; then security_groups_sysProg=${ZWE_PRIVATE_DEFAULT_ADMIN_GROUP} fi -security_users_zowe=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.users.zowe") +security_users_zowe=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.users.zowe") if [ -z "${security_users_zowe}" ]; then security_users_zowe=${ZWE_PRIVATE_DEFAULT_ZOWE_USER} fi -security_users_zis=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.users.zis") +security_users_zis=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.users.zis") if [ -z "${security_users_zis}" ]; then security_users_zis=${ZWE_PRIVATE_DEFAULT_ZIS_USER} fi -security_stcs_zowe=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.stcs.zowe") +security_stcs_zowe=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.stcs.zowe") if [ -z "${security_stcs_zowe}" ]; then security_stcs_zowe=${ZWE_PRIVATE_DEFAULT_ZOWE_STC} fi -security_stcs_zis=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.stcs.zis") +security_stcs_zis=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.stcs.zis") if [ -z "${security_stcs_zis}" ]; then security_stcs_zis=${ZWE_PRIVATE_DEFAULT_ZIS_STC} fi -security_stcs_aux=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.stcs.aux") +security_stcs_aux=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.stcs.aux") if [ -z "${security_stcs_aux}" ]; then security_stcs_aux=${ZWE_PRIVATE_DEFAULT_AUX_STC} fi diff --git a/bin/commands/init/stc/index.sh b/bin/commands/init/stc/index.sh index c26cf6e7e8..f3de7377e9 100644 --- a/bin/commands/init/stc/index.sh +++ b/bin/commands/init/stc/index.sh @@ -19,47 +19,47 @@ proclibs="ZWESLSTC ZWESISTC ZWESASTC" ############################### # validation -require_zowe_yaml +require_zowe_yaml "skipnode" # read prefix and validate -prefix=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.prefix") +prefix=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.prefix") if [ -z "${prefix}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe dataset prefix (zowe.setup.dataset.prefix) is not defined in Zowe YAML configuration file." "" 157 fi # read PROCLIB and validate -proclib=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.proclib") +proclib=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.proclib") if [ -z "${proclib}" ]; then print_error_and_exit "Error ZWEL0157E: PROCLIB (zowe.setup.dataset.proclib) is not defined in Zowe YAML configuration file." "" 157 fi # read JCL library and validate -jcllib=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.jcllib") +jcllib=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.jcllib") if [ -z "${jcllib}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe custom JCL library (zowe.setup.dataset.jcllib) is not defined in Zowe YAML configuration file." "" 157 fi # read PARMLIB and validate -parmlib=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.parmlib") +parmlib=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.parmlib") if [ -z "${parmlib}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe custom parameter library (zowe.setup.dataset.parmlib) is not defined in Zowe YAML configuration file." "" 157 fi # read LOADLIB and validate -authLoadlib=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.authLoadlib") +authLoadlib=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.authLoadlib") if [ -z "${authLoadlib}" ]; then # authLoadlib can be empty authLoadlib="${prefix}.${ZWE_PRIVATE_DS_SZWEAUTH}" fi -authPluginLib=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.authPluginLib") +authPluginLib=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.authPluginLib") if [ -z "${authPluginLib}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe custom load library (zowe.setup.dataset.authPluginLib) is not defined in Zowe YAML configuration file." "" 157 fi -security_stcs_zowe=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.stcs.zowe") +security_stcs_zowe=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.stcs.zowe") if [ -z "${security_stcs_zowe}" ]; then security_stcs_zowe=${ZWE_PRIVATE_DEFAULT_ZOWE_STC} fi -security_stcs_zis=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.stcs.zis") +security_stcs_zis=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.stcs.zis") if [ -z "${security_stcs_zis}" ]; then security_stcs_zis=${ZWE_PRIVATE_DEFAULT_ZIS_STC} fi -security_stcs_aux=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.stcs.aux") +security_stcs_aux=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.security.stcs.aux") if [ -z "${security_stcs_aux}" ]; then security_stcs_aux=${ZWE_PRIVATE_DEFAULT_AUX_STC} fi diff --git a/bin/commands/init/vsam/index.sh b/bin/commands/init/vsam/index.sh index f40e606b6a..e279ff07b7 100644 --- a/bin/commands/init/vsam/index.sh +++ b/bin/commands/init/vsam/index.sh @@ -18,43 +18,43 @@ print_level1_message "Create VSAM storage for Zowe Caching Service" ############################### # validation -require_zowe_yaml +require_zowe_yaml "skipnode" -caching_storage=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".components.caching-service.storage.mode" | upper_case) +caching_storage=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".components.caching-service.storage.mode" | upper_case) if [ "${caching_storage}" != "VSAM" ]; then print_error "Warning ZWEL0301W: Zowe Caching Service is not configured to use VSAM. Command skipped." return 0 fi # read prefix and validate -prefix=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.prefix") +prefix=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.prefix") if [ -z "${prefix}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe dataset prefix (zowe.setup.dataset.prefix) is not defined in Zowe YAML configuration file." "" 157 fi # read JCL library and validate -jcllib=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.jcllib") +jcllib=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.jcllib") if [ -z "${jcllib}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe custom JCL library (zowe.setup.dataset.jcllib) is not defined in Zowe YAML configuration file." "" 157 fi -vsam_mode=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.vsam.mode") +vsam_mode=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.vsam.mode") if [ -z "${vsam_mode}" ]; then vsam_mode=NONRLS fi vsam_volume= if [ "${vsam_mode}" = "NONRLS" ]; then - vsam_volume=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.vsam.volume") + vsam_volume=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.vsam.volume") if [ -z "${vsam_volume}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe Caching Service VSAM data set volume (zowe.setup.vsam.volume) is not defined in Zowe YAML configuration file." "" 157 fi fi vsam_storageClass= if [ "${vsam_mode}" = "RLS" ]; then - vsam_storageClass=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.vsam.storageClass") + vsam_storageClass=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.vsam.storageClass") if [ -z "${vsam_storageClass}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe Caching Service VSAM data set RLS storage class (zowe.setup.vsam.storageClass) is not defined in Zowe YAML configuration file." "" 157 fi fi -vsam_name=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".components.caching-service.storage.vsam.name") +vsam_name=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".components.caching-service.storage.vsam.name") if [ -z "${vsam_name}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe Caching Service VSAM data set name (components.caching-service.storage.vsam.name) is not defined in Zowe YAML configuration file." "" 157 fi diff --git a/bin/libs/common.sh b/bin/libs/common.sh index 5db74cc256..52815dfe6a 100644 --- a/bin/libs/common.sh +++ b/bin/libs/common.sh @@ -46,9 +46,9 @@ check_configmgr_enabled() { } require_zowe_yaml() { - # node is required to read yaml file - require_node - + if [ -z "${1}" ]; then + require_node + fi if [ -z "${ZWE_CLI_PARAMETER_CONFIG}" ]; then print_error_and_exit "Error ZWEL0108E: Zowe YAML config file is required." "" 108 elif [ ! -f "${ZWE_CLI_PARAMETER_CONFIG}" ]; then diff --git a/bin/libs/json.sh b/bin/libs/json.sh index 5b5342a4a3..b85c93951e 100644 --- a/bin/libs/json.sh +++ b/bin/libs/json.sh @@ -109,6 +109,33 @@ read_yaml() { return ${code} } +read_yaml_configmgr() { + file="${1}" + key=$(echo "${2}" | tr '.' '/') + ignore_null="${3:-true}" + + print_trace "- read_yaml_configmgr process ${file} and extract '${2} -> ${key}'" + + configmgr="${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr" + schema="${ZWE_zowe_runtimeDirectory}/schemas/server-common.json:${ZWE_zowe_runtimeDirectory}/schemas/zowe-yaml-schema.json" + + result=$(_CEE_RUNOPTS="XPLINK(ON)" "${configmgr}" -s "$schema" -p "FILE(${file})" extract "${key}" 2>&1); + code=$? + + print_trace " * Exit code: ${code}" + print_trace " * Output:" + print_trace "$(padding_left "${result}" " ")" + + if [ ${code} -eq 0 ]; then + if [ "${ignore_null}" = "true" ]; then + if [ "${result}" = "null" -o "${result}" = "undefined" ]; then + result= + fi + fi + printf "${result}" + fi +} + read_json() { file="${1}" key="${2}" From 47296d2a6604d14e44079123cdcf320bd4a111f0 Mon Sep 17 00:00:00 2001 From: Martin Zeithaml Date: Thu, 14 Nov 2024 12:54:58 +0100 Subject: [PATCH 13/35] Changelog update Signed-off-by: Martin Zeithaml --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a57296ab00..67f8b4a3a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to the Zowe Installer will be documented in this file. ## `3.0.1` -- Enhancement: command `zwe init` does not require NodeJS [#40??](https://github.com/zowe/zowe-install-packaging/pull/40??) +- Enhancement: command `zwe init` does not require NodeJS [#4088](https://github.com/zowe/zowe-install-packaging/pull/4088) - Bugfix: When `--log-dir` parameter for `zwe` command is a file, there might be an error "InternalError: stack overflow". [#4071](https://github.com/zowe/zowe-install-packaging/pull/4071) - Enhancement: new javascript funtion `getStatvfs()` to obtain information about the file sysytem [#3994](https://github.com/zowe/zowe-install-packaging/pull/3994) - Enhancement: command `zwe diagnose` in javascript only [#4061](https://github.com/zowe/zowe-install-packaging/pull/4061) From 5dea7ff73439ae8a4dec786fc368a6b089d23ee9 Mon Sep 17 00:00:00 2001 From: Martin Zeithaml Date: Fri, 15 Nov 2024 14:27:01 +0100 Subject: [PATCH 14/35] Return empty string Signed-off-by: Martin Zeithaml --- CHANGELOG.md | 1 - bin/libs/json.sh | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67f8b4a3a7..5895368628 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,6 @@ All notable changes to the Zowe Installer will be documented in this file. ## `3.0.1` - Enhancement: command `zwe init` does not require NodeJS [#4088](https://github.com/zowe/zowe-install-packaging/pull/4088) -- Bugfix: When `--log-dir` parameter for `zwe` command is a file, there might be an error "InternalError: stack overflow". [#4071](https://github.com/zowe/zowe-install-packaging/pull/4071) - Enhancement: new javascript funtion `getStatvfs()` to obtain information about the file sysytem [#3994](https://github.com/zowe/zowe-install-packaging/pull/3994) - Enhancement: command `zwe diagnose` in javascript only [#4061](https://github.com/zowe/zowe-install-packaging/pull/4061) - Enhancement: schema validation update for `zowe.job.name` and `zowe.job.prefix` [#4060](https://github.com/zowe/zowe-install-packaging/pull/4060) diff --git a/bin/libs/json.sh b/bin/libs/json.sh index b85c93951e..322361c3dc 100644 --- a/bin/libs/json.sh +++ b/bin/libs/json.sh @@ -122,6 +122,13 @@ read_yaml_configmgr() { result=$(_CEE_RUNOPTS="XPLINK(ON)" "${configmgr}" -s "$schema" -p "FILE(${file})" extract "${key}" 2>&1); code=$? + # When the item is not defined in config, configmgr returns + # code 0 and + # stdout = "error not found, reason=nnn" + if [[ "${result}" == "error not found, reason="* ]]; then + result="" + fi + print_trace " * Exit code: ${code}" print_trace " * Output:" print_trace "$(padding_left "${result}" " ")" From 30d2e0db22f50ec8f554cbb5e744420ef86c97f1 Mon Sep 17 00:00:00 2001 From: Martin Zeithaml <66114686+Martin-Zeithaml@users.noreply.github.com> Date: Mon, 18 Nov 2024 14:40:42 +0100 Subject: [PATCH 15/35] Read yaml by configmgr (#4069) * Read yaml by configmgr Signed-off-by: Martin Zeithaml * Changelog update Signed-off-by: Martin Zeithaml * When not found, return empty string Signed-off-by: Martin Zeithaml * Changelog update Signed-off-by: Martin Zeithaml --------- Signed-off-by: Martin Zeithaml Co-authored-by: 1000TurquoisePogs --- CHANGELOG.md | 2 +- bin/commands/install/index.sh | 4 ++-- bin/libs/common.sh | 6 +++--- bin/libs/json.sh | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b909772b9f..3f8be7b246 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to the Zowe Installer will be documented in this file. ## `3.0.1` -- Bugfix: When `--log-dir` parameter for `zwe` command is a file, there might be an error "InternalError: stack overflow". [#40nn](https://github.com/zowe/zowe-install-packaging/pull/40nn) +- Enhancement: command `zwe install` does not require NodeJS [#4069](https://github.com/zowe/zowe-install-packaging/pull/4069) - Enhancement: new javascript funtion `getStatvfs()` to obtain information about the file sysytem [#3994](https://github.com/zowe/zowe-install-packaging/pull/3994) - Enhancement: command `zwe diagnose` in javascript only [#4061](https://github.com/zowe/zowe-install-packaging/pull/4061) - Enhancement: schema validation update for `zowe.job.name` and `zowe.job.prefix` [#4060](https://github.com/zowe/zowe-install-packaging/pull/4060) diff --git a/bin/commands/install/index.sh b/bin/commands/install/index.sh index 0fc9e7fad6..05a0455e6d 100644 --- a/bin/commands/install/index.sh +++ b/bin/commands/install/index.sh @@ -26,10 +26,10 @@ ${ZWE_PRIVATE_DS_SZWEEXEC}|Zowe executable utilities library|dsntype(library) ds if [ -n "${ZWE_CLI_PARAMETER_DATASET_PREFIX}" ]; then prefix="${ZWE_CLI_PARAMETER_DATASET_PREFIX}" else - require_zowe_yaml + require_zowe_yaml "skipnode" # read prefix and validate - prefix=$(read_yaml "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.prefix") + prefix=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.dataset.prefix") if [ -z "${prefix}" ]; then print_error_and_exit "Error ZWEL0157E: Zowe dataset prefix (zowe.setup.dataset.prefix) is not defined in Zowe YAML configuration file." "" 157 fi diff --git a/bin/libs/common.sh b/bin/libs/common.sh index 5db74cc256..52815dfe6a 100644 --- a/bin/libs/common.sh +++ b/bin/libs/common.sh @@ -46,9 +46,9 @@ check_configmgr_enabled() { } require_zowe_yaml() { - # node is required to read yaml file - require_node - + if [ -z "${1}" ]; then + require_node + fi if [ -z "${ZWE_CLI_PARAMETER_CONFIG}" ]; then print_error_and_exit "Error ZWEL0108E: Zowe YAML config file is required." "" 108 elif [ ! -f "${ZWE_CLI_PARAMETER_CONFIG}" ]; then diff --git a/bin/libs/json.sh b/bin/libs/json.sh index 5b5342a4a3..322361c3dc 100644 --- a/bin/libs/json.sh +++ b/bin/libs/json.sh @@ -109,6 +109,40 @@ read_yaml() { return ${code} } +read_yaml_configmgr() { + file="${1}" + key=$(echo "${2}" | tr '.' '/') + ignore_null="${3:-true}" + + print_trace "- read_yaml_configmgr process ${file} and extract '${2} -> ${key}'" + + configmgr="${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr" + schema="${ZWE_zowe_runtimeDirectory}/schemas/server-common.json:${ZWE_zowe_runtimeDirectory}/schemas/zowe-yaml-schema.json" + + result=$(_CEE_RUNOPTS="XPLINK(ON)" "${configmgr}" -s "$schema" -p "FILE(${file})" extract "${key}" 2>&1); + code=$? + + # When the item is not defined in config, configmgr returns + # code 0 and + # stdout = "error not found, reason=nnn" + if [[ "${result}" == "error not found, reason="* ]]; then + result="" + fi + + print_trace " * Exit code: ${code}" + print_trace " * Output:" + print_trace "$(padding_left "${result}" " ")" + + if [ ${code} -eq 0 ]; then + if [ "${ignore_null}" = "true" ]; then + if [ "${result}" = "null" -o "${result}" = "undefined" ]; then + result= + fi + fi + printf "${result}" + fi +} + read_json() { file="${1}" key="${2}" From 879dedf751f95abfb9cedcc88e87d2051b21e2c1 Mon Sep 17 00:00:00 2001 From: Pavel Zlatnik Date: Wed, 20 Nov 2024 09:45:21 +0100 Subject: [PATCH 16/35] issue4076Nodejs Signed-off-by: Pavel Zlatnik --- workflows/files/ZWECONF.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/workflows/files/ZWECONF.xml b/workflows/files/ZWECONF.xml index 9b8032d02c..730267f050 100644 --- a/workflows/files/ZWECONF.xml +++ b/workflows/files/ZWECONF.xml @@ -459,10 +459,10 @@ How we want to verify SSL certificates of services. Valid values are: - - Path to the NodeJS home - Path to the NodeJS home - node + + Path to the Node.js home + Path to the Node.js home + Node.js @@ -1899,17 +1899,17 @@ echo ' home: "$!{instance-java_home}"' >> "${instance-zowe_runtimeDirectory}/zo echo '' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '#-------------------------------------------------------------------------------' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" -echo '# node.js configuration' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" +echo '# Node.js configuration' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '#' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" -echo '# Some Zowe components requires node.js. Define the path where you have your' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" -echo '# node.js is installed.' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" +echo '# Some Zowe components requires Node.js. Define the path where you have your' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" +echo '# Node.js is installed.' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '#' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '# **NOTE**: this field can be updated automatically if you pass `--update-config`' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '# to `zwe init` command.' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '#-------------------------------------------------------------------------------' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo 'node:' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # **COMMONLY_CUSTOMIZED**' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" -echo ' # Path to your node.js home directory' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" +echo ' # Path to your Node.js home directory' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' home: "$!{instance-node_home}"' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" From c51f0439a72ca56c22946b51b078e077d15c4b7d Mon Sep 17 00:00:00 2001 From: Pavel Zlatnik Date: Wed, 20 Nov 2024 11:53:31 +0100 Subject: [PATCH 17/35] issue4081 init steps Signed-off-by: Pavel Zlatnik --- workflows/files/ZWECONF.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/workflows/files/ZWECONF.xml b/workflows/files/ZWECONF.xml index 730267f050..2a53ed2f6a 100644 --- a/workflows/files/ZWECONF.xml +++ b/workflows/files/ZWECONF.xml @@ -2266,8 +2266,8 @@ zwe install -c '${instance-zowe_runtimeDirectory}/zowe.yaml' --allow-overwrite - Run the Zowe init - Executes the Zowe initialization + Run scripts for Zowe initialization + Executes scripts for Zowe initialization @@ -2314,8 +2314,8 @@ zwe init vsam -c '${instance-zowe_runtimeDirectory}/zowe.yaml' --allow-overwrite - Run the Zowe init security - Executes the Zowe initialization for security setup + Run scripts for Zowe security initialization + Executes Zowe initialization scripts for security setup Date: Wed, 20 Nov 2024 12:00:43 +0100 Subject: [PATCH 18/35] issue4078 Gateway only Signed-off-by: Pavel Zlatnik --- workflows/files/ZWECONF.xml | 44 ++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/workflows/files/ZWECONF.xml b/workflows/files/ZWECONF.xml index 2a53ed2f6a..7b07c21af0 100644 --- a/workflows/files/ZWECONF.xml +++ b/workflows/files/ZWECONF.xml @@ -502,9 +502,9 @@ How we want to verify SSL certificates of services. Valid values are: - - Check this option to enable the gateway - Check this option to enable the gateway + + Check this option to enable the Gateway + Check this option to enable the Gateway components @@ -514,8 +514,8 @@ How we want to verify SSL certificates of services. Valid values are: - Port for the API ML gateway - Port for the API ML gateway + Port for the API ML Gateway + Port for the API ML Gateway components @@ -525,8 +525,8 @@ How we want to verify SSL certificates of services. Valid values are: - Switch on the debug mode for the gateway - Switch on the debug mode for the gateway + Switch on the debug mode for the Gateway + Switch on the debug mode for the Gateway components @@ -569,8 +569,8 @@ How we want to verify SSL certificates of services. Valid values are: - Authorization provider for the gateway - Authorization provider for the gateway + Authorization provider for the Gateway + Authorization provider for the Gateway components @@ -580,8 +580,8 @@ How we want to verify SSL certificates of services. Valid values are: - JWT auto configuration for gateway security auth - JWT auto configuration for gateway security auth + JWT auto configuration for Gateway security auth + JWT auto configuration for Gateway security auth components @@ -593,8 +593,8 @@ How we want to verify SSL certificates of services. Valid values are: - Service ID for gateway security auth - Service ID for gateway security auth + Service ID for Gateway security auth + Service ID for Gateway security auth components @@ -615,8 +615,8 @@ How we want to verify SSL certificates of services. Valid values are: - Security authorization provider for the gateway - Security authorization provider for the gateway + Security authorization provider for the Gateway + Security authorization provider for the Gateway components @@ -626,8 +626,8 @@ How we want to verify SSL certificates of services. Valid values are: - Check to enable the gateway security x509 - Check to enable the gateway security x509 + Check to enable the Gateway security x509 + Check to enable the Gateway security x509 components @@ -1163,14 +1163,14 @@ How we want to verify SSL certificates of services. Valid values are: Gateway variables - Specify the variables for the gateway component + Specify the variables for the Gateway component 1 == 1 Always true - Skipped if the gateway was not selected + Skipped if the Gateway was not selected !${instance-components_gateway_enabled} skipped @@ -1184,7 +1184,7 @@ How we want to verify SSL certificates of services. Valid values are: - Run this step to specify the cloud gateway variables + Run this step to specify the Gateway variables 1 z/OS System Programmer false @@ -1208,7 +1208,7 @@ How we want to verify SSL certificates of services. Valid values are: - Run this step to fill gateway component variables. + Run this step to fill ZAAS component variables. 1 z/OS System Programmer false @@ -2170,7 +2170,7 @@ echo '# sysname: LPR1' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '# # for this HA instance, we did not customize "components", so it will use default value.' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '# # HA instance ID, we will start 2 instances on LPAR2' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" -echo '# # **NOTE**, we can only start one gateway in same LPAR.' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" +echo '# # **NOTE**, we can only start one Gateway in same LPAR.' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '# lpar2a:' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '# # hostname where this instance will be started' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo '# hostname: lpar2.my-company.com' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" From 841fc54a0a7716f7d32f29b9820dd31e781a17a9 Mon Sep 17 00:00:00 2001 From: Pavel Zlatnik Date: Wed, 20 Nov 2024 15:42:27 +0100 Subject: [PATCH 19/35] issue4082 subcommands desc clean Signed-off-by: Pavel Zlatnik --- workflows/files/ZWECONF.xml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/workflows/files/ZWECONF.xml b/workflows/files/ZWECONF.xml index 7b07c21af0..40e597a733 100644 --- a/workflows/files/ZWECONF.xml +++ b/workflows/files/ZWECONF.xml @@ -2283,10 +2283,9 @@ zwe install -c '${instance-zowe_runtimeDirectory}/zowe.yaml' --allow-overwritezwe init sub-command defines a configuration.
  • mvs: Copy the data sets provided with Zowe to custom data sets.
  • -
  • security: Create the user IDs and security manager settings.
  • -
  • apfauth: APF authorize the LOADLIB containing the modules that need to perform z/OS priviledged security calls.
  • -
  • certificate: Configure Zowe to use TLS certificates.
  • +#if (${instance-components_caching_service_storage_mode} == "VSAM" && ${instance-components_caching_service_enabled})
  • vsam: Configure the VSAM files needed to run the Zowe caching service used for high availability (HA).
  • +#end
  • stc: Configure the system to launch the Zowe started task.
]]> @@ -2320,18 +2319,14 @@ zwe init vsam -c '${instance-zowe_runtimeDirectory}/zowe.yaml' --allow-overwrite - zwe init apfauth -c ${instance-zowe_runtimeDirectory}/zowe.yml
zwe init security -c ${instance-zowe_runtimeDirectory}/zowe.yml --allow-overwrite
+ zwe init apfauth -c ${instance-zowe_runtimeDirectory}/zowe.yml

NOTE: Each zwe init sub-command defines a configuration.
    -
  • mvs: Copy the data sets provided with Zowe to custom data sets.
  • security: Create the user IDs and security manager settings.
  • apfauth: APF authorize the LOADLIB containing the modules that need to perform z/OS priviledged security calls.
  • -
  • certificate: Configure Zowe to use TLS certificates.
  • -
  • vsam: Configure the VSAM files needed to run the Zowe caching service used for high availability (HA).
  • -
  • stc: Configure the system to launch the Zowe started task.
]]>
1 From a2f77e516b1264ffb907e89835330331968d73b9 Mon Sep 17 00:00:00 2001 From: Pavel Zlatnik Date: Wed, 20 Nov 2024 15:49:12 +0100 Subject: [PATCH 20/35] issue4085 reword Signed-off-by: Pavel Zlatnik --- workflows/files/ZWECRECR.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/files/ZWECRECR.xml b/workflows/files/ZWECRECR.xml index c5d3c3b812..c9a6172800 100644 --- a/workflows/files/ZWECRECR.xml +++ b/workflows/files/ZWECRECR.xml @@ -33,7 +33,7 @@ Please, specify your security management software - Please, specify the ESM system you use on your workstation + Please, specify the ESM system you use General From fbe1fc737a0e25dded038f4d23148719aabf561a Mon Sep 17 00:00:00 2001 From: Pavel Zlatnik Date: Wed, 20 Nov 2024 16:09:58 +0100 Subject: [PATCH 21/35] issue 4086 acf2 genreq Signed-off-by: Pavel Zlatnik --- workflows/files/ZWECRECR.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/workflows/files/ZWECRECR.xml b/workflows/files/ZWECRECR.xml index c9a6172800..a3636d5d4b 100644 --- a/workflows/files/ZWECRECR.xml +++ b/workflows/files/ZWECRECR.xml @@ -276,7 +276,8 @@ TSS GENREQ(${instance-tss_acid}) + - This step will generate the CSR request into the ${instance-output_dataset} + This step uses ACF2 command GENREQ

]]>
1 Security Administrator true @@ -303,7 +304,7 @@ GENREQ ${instance-acf2_acid} + This step uses ACF2 command GENREQ

]]>
+]]> 1 Security Administrator true From 773148f61b07e70f1f1474bef0de21602fee13d2 Mon Sep 17 00:00:00 2001 From: Pavel Zlatnik Date: Wed, 20 Nov 2024 16:12:44 +0100 Subject: [PATCH 22/35] issue4086 new link Signed-off-by: Pavel Zlatnik --- workflows/files/ZWECRECR.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/files/ZWECRECR.xml b/workflows/files/ZWECRECR.xml index a3636d5d4b..9999de8573 100644 --- a/workflows/files/ZWECRECR.xml +++ b/workflows/files/ZWECRECR.xml @@ -277,7 +277,7 @@ TSS GENREQ(${instance-tss_acid}) + This step uses ACF2 command GENREQ

]]>
+

This step uses ACF2 command GENREQ

]]> 1 Security Administrator true From 6e55faf74436c9b45db95c9cf512e54c2e459b2e Mon Sep 17 00:00:00 2001 From: Martin Zeithaml Date: Wed, 20 Nov 2024 17:45:27 +0100 Subject: [PATCH 23/35] d.ts update Signed-off-by: Martin Zeithaml --- build/zwe/types/@qjstypes/xplatform.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/build/zwe/types/@qjstypes/xplatform.d.ts b/build/zwe/types/@qjstypes/xplatform.d.ts index f139e1ac00..6d4572936e 100644 --- a/build/zwe/types/@qjstypes/xplatform.d.ts +++ b/build/zwe/types/@qjstypes/xplatform.d.ts @@ -27,6 +27,7 @@ export function stringFromBytes(data:ArrayBuffer, offset:number, length:number, */ export function loadFileUTF8(path:string, sourceCCSID:number):string; export function storeFileUTF8(path:string, targetCCSID:number, content:string):number; +export function appendFileUTF8(path: string, targetCCSID:number, content:string):number; export var AUTO_DETECT:number; export var NO_CONVERT:number; From e8e790fc03c97025ff4e2adfb93df44af5417b93 Mon Sep 17 00:00:00 2001 From: Martin Zeithaml Date: Thu, 21 Nov 2024 11:09:56 +0100 Subject: [PATCH 24/35] Read arrays by internal config get Signed-off-by: Martin Zeithaml --- bin/commands/init/certificate/index.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/commands/init/certificate/index.sh b/bin/commands/init/certificate/index.sh index f226009c5b..df10620ad0 100644 --- a/bin/commands/init/certificate/index.sh +++ b/bin/commands/init/certificate/index.sh @@ -95,13 +95,17 @@ elif [[ "${cert_type}" == JCE*KS ]]; then keyring_option=2 fi fi +# Trace or debug information will be part of the output, let's turn it off for the inline zwe commands +save_trace=$ZWE_PRIVATE_LOG_LEVEL_ZWELS +ZWE_PRIVATE_LOG_LEVEL_ZWELS= # read keystore domains -cert_import_CAs=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.importCertificateAuthorities" | tr '\n' ',') +cert_import_CAs=$(zwecli_inline_execute_command internal config get --config "${ZWE_CLI_PARAMETER_CONFIG}" --path ".zowe.setup.certificate.importCertificateAuthorities" | tr '\n' ',') # read keystore domains -cert_domains=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.setup.certificate.san" | tr '\n' ',') +cert_domains=$(zwecli_inline_execute_command internal config get --config "${ZWE_CLI_PARAMETER_CONFIG}" --path ".zowe.setup.certificate.san" | tr '\n' ',') if [ -z "${cert_domains}" ]; then - cert_domains=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".zowe.externalDomains" | tr '\n' ',') + cert_domains=$(zwecli_inline_execute_command internal config get --config "${ZWE_CLI_PARAMETER_CONFIG}" --path ".zowe.externalDomains" | tr '\n' ',') fi +ZWE_PRIVATE_LOG_LEVEL_ZWELS=$save_trace # read z/OSMF info for item in user ca; do From b98a8c855499c850fcb39685cc82c1599da3585a Mon Sep 17 00:00:00 2001 From: Pavel Zlatnik Date: Thu, 21 Nov 2024 15:03:43 +0100 Subject: [PATCH 25/35] issue4077 components Signed-off-by: Pavel Zlatnik --- workflows/files/ZWECONF.xml | 70 ++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/workflows/files/ZWECONF.xml b/workflows/files/ZWECONF.xml index 40e597a733..bbb133b497 100644 --- a/workflows/files/ZWECONF.xml +++ b/workflows/files/ZWECONF.xml @@ -502,9 +502,9 @@ How we want to verify SSL certificates of services. Valid values are:
- - Check this option to enable the Gateway - Check this option to enable the Gateway + + Check this option to enable Gateway + Check this option to enable Gateway components @@ -525,8 +525,8 @@ How we want to verify SSL certificates of services. Valid values are: - Switch on the debug mode for the Gateway - Switch on the debug mode for the Gateway + Switch on the debug mode for Gateway + Switch on the debug mode for Gateway components @@ -535,9 +535,9 @@ How we want to verify SSL certificates of services. Valid values are: - - Should the APIML ZAAS be enabled? - Should the APIML ZAAS be enabled? + + Check this option to enable APIML ZAAS + Check this option to enable APIML ZAAS components @@ -547,8 +547,8 @@ How we want to verify SSL certificates of services. Valid values are: - Port for the APIML ZAAS - Port for the APIML ZAAS + Port for APIML ZAAS + Port for APIML ZAAS components @@ -558,8 +558,8 @@ How we want to verify SSL certificates of services. Valid values are: - Switch on the debug mode for the ZAAS - Switch on the debug mode for the ZAAS + Switch on the debug mode for ZAAS + Switch on the debug mode for ZAAS components @@ -637,8 +637,8 @@ How we want to verify SSL certificates of services. Valid values are: - Check this option to enable the API Catalog - Check this option to enable the API Catalog + Check this option to enable API Catalog + Check this option to enable API Catalog components @@ -669,9 +669,9 @@ How we want to verify SSL certificates of services. Valid values are: - - Check this option to enable the Discovery service - Check this option to enable the Discovery service + + Check this option to enable Discovery service + Check this option to enable Discovery service components @@ -681,8 +681,8 @@ How we want to verify SSL certificates of services. Valid values are: - Port on which the Discovery service should be running - Port on which the Discovery service should be running + Port on which Discovery service should be running + Port on which Discovery service should be running components @@ -702,9 +702,9 @@ How we want to verify SSL certificates of services. Valid values are:
- - Check this option to enable the Caching service - Check this option to enable the Caching service + + Check this option to enable Caching service + Check this option to enable Caching service components @@ -714,8 +714,8 @@ How we want to verify SSL certificates of services. Valid values are: - Port for the caching service - Port for the caching service + Port for Caching service + Port for Caching service components @@ -802,9 +802,9 @@ How we want to verify SSL certificates of services. Valid values are: - - Check this option to enable the app server - Check this option to enable the app server. + + Check this option to enable App server + Check this option to enable App server. components @@ -825,8 +825,8 @@ How we want to verify SSL certificates of services. Valid values are: - Port for the app server - Port for the app server + Port for App server + Port for App server components @@ -891,8 +891,8 @@ How we want to verify SSL certificates of services. Valid values are: - Check this option to enable the JES explorer - Check this option to enable the JES explorer. + Check this option to enable JES explorer + Check this option to enable JES explorer. components @@ -902,8 +902,8 @@ How we want to verify SSL certificates of services. Valid values are: - Check this option to enable the MVS explorer - Check this option to enable the MVS explorer. + Check this option to enable MVS explorer + Check this option to enable MVS explorer. components @@ -913,8 +913,8 @@ How we want to verify SSL certificates of services. Valid values are: - Check this option to enable the USS explorer - Check this option to enable the USS explorer. + Check this option to enable USS explorer + Check this option to enable USS explorer. components From a642b24631dbac4b00151af305f9d3e77be1730c Mon Sep 17 00:00:00 2001 From: Pavel Zlatnik Date: Thu, 21 Nov 2024 15:17:14 +0100 Subject: [PATCH 26/35] reword Signed-off-by: Pavel Zlatnik --- workflows/files/ZWECONF.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflows/files/ZWECONF.xml b/workflows/files/ZWECONF.xml index bbb133b497..d2fb423f27 100644 --- a/workflows/files/ZWECONF.xml +++ b/workflows/files/ZWECONF.xml @@ -514,8 +514,8 @@ How we want to verify SSL certificates of services. Valid values are: - Port for the API ML Gateway - Port for the API ML Gateway + Port for the APIML Gateway + Port for the APIML Gateway components From e71132f1234ed18d2b32095b600f9661bd6f6771 Mon Sep 17 00:00:00 2001 From: Pavel Zlatnik Date: Thu, 21 Nov 2024 15:40:03 +0100 Subject: [PATCH 27/35] example yaml sync update Signed-off-by: Pavel Zlatnik --- example-zowe.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/example-zowe.yaml b/example-zowe.yaml index 79d9c61186..78d0ffb1c2 100644 --- a/example-zowe.yaml +++ b/example-zowe.yaml @@ -457,17 +457,17 @@ java: #------------------------------------------------------------------------------- -# node.js configuration +# Node.js configuration # -# Some Zowe components requires node.js. Define the path where you have your -# node.js is installed. +# Some Zowe components requires Node.js. Define the path where you have your +# Node.js is installed. # # **NOTE**: this field can be updated automatically if you pass `--update-config` # to `zwe init` command. #------------------------------------------------------------------------------- node: # **COMMONLY_CUSTOMIZED** - # Path to your node.js home directory + # Path to your Node.js home directory home: "" @@ -623,7 +623,7 @@ components: # # for this HA instance, we did not customize "components", so it will use default value. # # HA instance ID, we will start 2 instances on LPAR2 -# # **NOTE**, we can only start one gateway in same LPAR. +# # **NOTE**, we can only start one Gateway in same LPAR. # lpar2a: # # hostname where this instance will be started # hostname: lpar2.my-company.com From 0b17262215ac87256e257d6294e9ad1dc6eb21a2 Mon Sep 17 00:00:00 2001 From: vm635318 Date: Fri, 22 Nov 2024 10:47:57 +0100 Subject: [PATCH 28/35] Fixed #4074 Signed-off-by: vm635318 --- workflows/files/ZWECONF.properties | 4 ++-- workflows/files/ZWECONF.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/workflows/files/ZWECONF.properties b/workflows/files/ZWECONF.properties index e2729d21b1..405467602b 100644 --- a/workflows/files/ZWECONF.properties +++ b/workflows/files/ZWECONF.properties @@ -140,10 +140,10 @@ zowe_job_prefix=ZWE1 # zowe_externalDomains # Label: Zowe external domains -# Abstract: The domain name of your Dynamic VIP Address (DVIPA) +# Abstract: The list of external domains # Category: zowe # Description: -# The domain name of your Dynamic VIP Address (DVIPA) +# Defines a list of external domains that will be used by the Zowe instance. zowe_externalDomains=sample-domain.com # zowe_externalPort diff --git a/workflows/files/ZWECONF.xml b/workflows/files/ZWECONF.xml index 9b8032d02c..476d397049 100644 --- a/workflows/files/ZWECONF.xml +++ b/workflows/files/ZWECONF.xml @@ -202,8 +202,8 @@ It is used by ZWESLSTC or by zwe command - The domain name of your Dynamic VIP Address (DVIPA) - The domain name of your Dynamic VIP Address (DVIPA) + The list of external domains + Defines a list of external domains that will be used by the Zowe instance. zowe From de927871ed781c1985053bd8eaaca38d9e2ddbc9 Mon Sep 17 00:00:00 2001 From: Pavel Zlatnik Date: Fri, 22 Nov 2024 15:24:55 +0100 Subject: [PATCH 29/35] issue4083 change prefix meaning Signed-off-by: Pavel Zlatnik --- example-zowe.yaml | 2 +- workflows/files/ZWECONF.xml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example-zowe.yaml b/example-zowe.yaml index 79d9c61186..8d13d42ee3 100644 --- a/example-zowe.yaml +++ b/example-zowe.yaml @@ -39,7 +39,7 @@ zowe: # MVS data set related configurations dataset: # **COMMONLY_CUSTOMIZED** - # where Zowe MVS data sets will be installed + # where are existing Zowe Target libraries prefix: IBMUSER.ZWEV3 # **COMMONLY_CUSTOMIZED** # PROCLIB where Zowe STCs will be copied over diff --git a/workflows/files/ZWECONF.xml b/workflows/files/ZWECONF.xml index 9b8032d02c..eb3d91f74e 100644 --- a/workflows/files/ZWECONF.xml +++ b/workflows/files/ZWECONF.xml @@ -12,9 +12,9 @@ - - Where Zowe MVS data sets will be installed - Where Zowe MVS data sets will be installed + + Prefix of existing Target libraries created during PSWI or SMP/E + Prefix of existing Target libraries created during PSWI or SMP/E installation phase zowe @@ -1475,7 +1475,7 @@ echo ' setup:' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # MVS data set related configurations' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' dataset:' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # **COMMONLY_CUSTOMIZED**' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" -echo ' # where Zowe MVS data sets will be installed' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" +echo ' # where are existing Zowe Target libraries' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' prefix: $!{instance-zowe_setup_dataset_prefix}' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # **COMMONLY_CUSTOMIZED**' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # PROCLIB where Zowe STCs will be copied over' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" From a8035d96fc4a73f6cb6bf254637707fb590c4825 Mon Sep 17 00:00:00 2001 From: mm667937 Date: Mon, 25 Nov 2024 15:46:08 +0100 Subject: [PATCH 30/35] I need to create PSWI version 9 Signed-off-by: mm667937 --- pswi/03_create.sh | 10 ++++----- pswi/04_create_cleanup.sh | 45 +++++++++++++++++++-------------------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/pswi/03_create.sh b/pswi/03_create.sh index 9915adfd2b..c41e3023e8 100644 --- a/pswi/03_create.sh +++ b/pswi/03_create.sh @@ -293,17 +293,17 @@ echo "Showing EXPORT JCL how it looks before the change" #else echo "Changing jobcard and adding SYSAFF" sed "s|//IZUD01EX JOB (ACCOUNT),'NAME'|$JOBST1\n$JOBST2|g" EXPORT >EXPJCL0 -sed "s|//.*gimzipInputFile.*,|EXPJCL1 -sed "s|// FILEDATA=TEXT| archid=\"ZOS003.ZWE.PSWI.AZWE003.ZFS\"/>|g" EXPJCL1 >EXPJCL2 -sed "s|// DD \*||g" EXPJCL2 >EXPJCL +#sed "s|//.*gimzipInputFile.*,|EXPJCL1 +#sed "s|// FILEDATA=TEXT| archid=\"ZOS003.ZWE.PSWI.AZWE003.ZFS\"/>|g" EXPJCL1 >EXPJCL2 +#sed "s|// DD \*||g" EXPJCL2 >EXPJCL # sed "s|ZOS003.ZWE.PSWI.|ZWE.PSWI.|g" EXPJCL3 >EXPJCL #fi -sh scripts/submit_jcl.sh "$(cat EXPJCL)" +sh scripts/submit_jcl.sh "$(cat EXPJCL0)" if [ $? -gt 0 ]; then exit -1; fi -rm ./EXPJCL +rm ./EXPJCL0 rm ./EXPORT # Pax the directory diff --git a/pswi/04_create_cleanup.sh b/pswi/04_create_cleanup.sh index 16fcc98b3b..f682379f3a 100644 --- a/pswi/04_create_cleanup.sh +++ b/pswi/04_create_cleanup.sh @@ -100,29 +100,28 @@ sh scripts/submit_jcl.sh "$(cat JCL)" # Not checking results so the script doesn't fail rm JCL -if [ "$ZOSMF_V" = "2.3" ]; then - # Unmount and delete - echo "Unmounting and deleting zFS ${WORK_ZFS}." - - echo ${JOBST1} >JCL - echo ${JOBST2} >>JCL - echo "//UNMNTZFS EXEC PGM=IKJEFT01,REGION=4096K,DYNAMNBR=50" >>JCL - echo "//SYSTSPRT DD SYSOUT=*" >>JCL - echo "//SYSTSOUT DD SYSOUT=*" >>JCL - echo "//SYSTSIN DD * " >>JCL - echo "UNMOUNT FILESYSTEM('${WORK_ZFS}') + " >>JCL - echo "IMMEDIATE" >>JCL - echo "/*" >>JCL - echo "//DELTZFST EXEC PGM=IDCAMS" >>JCL - echo "//SYSPRINT DD SYSOUT=*" >>JCL - echo "//SYSIN DD *" >>JCL - echo " DELETE ${WORK_ZFS}" >>JCL - echo "/*" >>JCL - - sh scripts/submit_jcl.sh "$(cat JCL)" - # Not checking results so the script doesn't fail - rm JCL -fi + +# Unmount and delete +echo "Unmounting and deleting zFS ${WORK_ZFS}." + +echo ${JOBST1} >JCL +echo ${JOBST2} >>JCL +echo "//UNMNTZFS EXEC PGM=IKJEFT01,REGION=4096K,DYNAMNBR=50" >>JCL +echo "//SYSTSPRT DD SYSOUT=*" >>JCL +echo "//SYSTSOUT DD SYSOUT=*" >>JCL +echo "//SYSTSIN DD * " >>JCL +echo "UNMOUNT FILESYSTEM('${WORK_ZFS}') + " >>JCL +echo "IMMEDIATE" >>JCL +echo "/*" >>JCL +echo "//DELTZFST EXEC PGM=IDCAMS" >>JCL +echo "//SYSPRINT DD SYSOUT=*" >>JCL +echo "//SYSIN DD *" >>JCL +echo " DELETE ${WORK_ZFS}" >>JCL +echo "/*" >>JCL + +sh scripts/submit_jcl.sh "$(cat JCL)" +# Not checking results so the script doesn't fail +rm JCL echo "Invoking REST API to unmount Zowe zFS ${ZOWE_ZFS} from its mountpoint." From 6010478057daa9d35a1833f9e6c04258a4096695 Mon Sep 17 00:00:00 2001 From: mm667937 Date: Mon, 25 Nov 2024 16:36:31 +0100 Subject: [PATCH 31/35] I forgot that I can't run the tests Signed-off-by: mm667937 --- pswi/PSWI-marist.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pswi/PSWI-marist.sh b/pswi/PSWI-marist.sh index 50c719367d..da7c24c284 100755 --- a/pswi/PSWI-marist.sh +++ b/pswi/PSWI-marist.sh @@ -134,13 +134,13 @@ if [ $presmpe -eq 0 ]; then if [ $create -eq 0 ]; then # Test PSWI sh 05_test.sh - test=$? - - if [ $test -eq 0 ]; then - #test the workflows - sh 051_test_workflows.sh - wf_test=$? - fi +# test=$? +# +# if [ $test -eq 0 ]; then +# #test the workflows +# sh 051_test_workflows.sh +# wf_test=$? +# fi # Cleanup after the test sh 06_test_cleanup.sh fi From b0bb345870532ddddfd7422213d06c847eb9d01d Mon Sep 17 00:00:00 2001 From: mm667937 Date: Tue, 26 Nov 2024 16:26:53 +0100 Subject: [PATCH 32/35] back to old wrong methd because I will fix that in later PR Signed-off-by: mm667937 --- pswi/03_create.sh | 10 +++++----- pswi/PSWI-marist.sh | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pswi/03_create.sh b/pswi/03_create.sh index c41e3023e8..9915adfd2b 100644 --- a/pswi/03_create.sh +++ b/pswi/03_create.sh @@ -293,17 +293,17 @@ echo "Showing EXPORT JCL how it looks before the change" #else echo "Changing jobcard and adding SYSAFF" sed "s|//IZUD01EX JOB (ACCOUNT),'NAME'|$JOBST1\n$JOBST2|g" EXPORT >EXPJCL0 -#sed "s|//.*gimzipInputFile.*,|EXPJCL1 -#sed "s|// FILEDATA=TEXT| archid=\"ZOS003.ZWE.PSWI.AZWE003.ZFS\"/>|g" EXPJCL1 >EXPJCL2 -#sed "s|// DD \*||g" EXPJCL2 >EXPJCL +sed "s|//.*gimzipInputFile.*,|EXPJCL1 +sed "s|// FILEDATA=TEXT| archid=\"ZOS003.ZWE.PSWI.AZWE003.ZFS\"/>|g" EXPJCL1 >EXPJCL2 +sed "s|// DD \*||g" EXPJCL2 >EXPJCL # sed "s|ZOS003.ZWE.PSWI.|ZWE.PSWI.|g" EXPJCL3 >EXPJCL #fi -sh scripts/submit_jcl.sh "$(cat EXPJCL0)" +sh scripts/submit_jcl.sh "$(cat EXPJCL)" if [ $? -gt 0 ]; then exit -1; fi -rm ./EXPJCL0 +rm ./EXPJCL rm ./EXPORT # Pax the directory diff --git a/pswi/PSWI-marist.sh b/pswi/PSWI-marist.sh index da7c24c284..50c719367d 100755 --- a/pswi/PSWI-marist.sh +++ b/pswi/PSWI-marist.sh @@ -134,13 +134,13 @@ if [ $presmpe -eq 0 ]; then if [ $create -eq 0 ]; then # Test PSWI sh 05_test.sh -# test=$? -# -# if [ $test -eq 0 ]; then -# #test the workflows -# sh 051_test_workflows.sh -# wf_test=$? -# fi + test=$? + + if [ $test -eq 0 ]; then + #test the workflows + sh 051_test_workflows.sh + wf_test=$? + fi # Cleanup after the test sh 06_test_cleanup.sh fi From 417179da0292fa097554e2fc978090dc721df644 Mon Sep 17 00:00:00 2001 From: Pavel Zlatnik Date: Wed, 27 Nov 2024 09:43:52 +0100 Subject: [PATCH 33/35] update based on feedback Signed-off-by: Pavel Zlatnik --- example-zowe.yaml | 2 +- workflows/files/ZWECONF.xml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example-zowe.yaml b/example-zowe.yaml index 8d13d42ee3..b7ec51f594 100644 --- a/example-zowe.yaml +++ b/example-zowe.yaml @@ -39,7 +39,7 @@ zowe: # MVS data set related configurations dataset: # **COMMONLY_CUSTOMIZED** - # where are existing Zowe Target libraries + # HLQ where are existing Zowe SZWEEXEC Target libraries prefix: IBMUSER.ZWEV3 # **COMMONLY_CUSTOMIZED** # PROCLIB where Zowe STCs will be copied over diff --git a/workflows/files/ZWECONF.xml b/workflows/files/ZWECONF.xml index eb3d91f74e..909109caca 100644 --- a/workflows/files/ZWECONF.xml +++ b/workflows/files/ZWECONF.xml @@ -12,9 +12,9 @@ - - Prefix of existing Target libraries created during PSWI or SMP/E - Prefix of existing Target libraries created during PSWI or SMP/E installation phase + + Prefix (HLQ) of existing SZWEEXEC Target libraries created during PSWI or SMP/E + Prefix (HLQ) of existing SZWEEXEC Target libraries created during PSWI or SMP/E installation phase zowe @@ -1475,7 +1475,7 @@ echo ' setup:' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # MVS data set related configurations' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' dataset:' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # **COMMONLY_CUSTOMIZED**' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" -echo ' # where are existing Zowe Target libraries' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" +echo ' # HLQ where are existing Zowe SZWEEXEC Target libraries' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' prefix: $!{instance-zowe_setup_dataset_prefix}' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # **COMMONLY_CUSTOMIZED**' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # PROCLIB where Zowe STCs will be copied over' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" From 9820462420159ceec615e8fe19ed5bfdf155044a Mon Sep 17 00:00:00 2001 From: Pavel Zlatnik Date: Thu, 28 Nov 2024 09:59:43 +0100 Subject: [PATCH 34/35] update based on Mark's feedback Signed-off-by: Pavel Zlatnik --- example-zowe.yaml | 2 +- workflows/files/ZWECONF.xml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example-zowe.yaml b/example-zowe.yaml index b7ec51f594..1c857ad5f3 100644 --- a/example-zowe.yaml +++ b/example-zowe.yaml @@ -39,7 +39,7 @@ zowe: # MVS data set related configurations dataset: # **COMMONLY_CUSTOMIZED** - # HLQ where are existing Zowe SZWEEXEC Target libraries + # where are existing Zowe SZWEEXEC Target libraries prefix: IBMUSER.ZWEV3 # **COMMONLY_CUSTOMIZED** # PROCLIB where Zowe STCs will be copied over diff --git a/workflows/files/ZWECONF.xml b/workflows/files/ZWECONF.xml index 909109caca..8f834b42f8 100644 --- a/workflows/files/ZWECONF.xml +++ b/workflows/files/ZWECONF.xml @@ -13,8 +13,8 @@ - Prefix (HLQ) of existing SZWEEXEC Target libraries created during PSWI or SMP/E - Prefix (HLQ) of existing SZWEEXEC Target libraries created during PSWI or SMP/E installation phase + Prefix of existing SZWEEXEC Target libraries created during PSWI or SMP/E + Prefix of existing SZWEEXEC Target libraries created during PSWI or SMP/E installation phase zowe @@ -1475,7 +1475,7 @@ echo ' setup:' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # MVS data set related configurations' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' dataset:' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # **COMMONLY_CUSTOMIZED**' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" -echo ' # HLQ where are existing Zowe SZWEEXEC Target libraries' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" +echo ' # where are existing Zowe SZWEEXEC Target libraries' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' prefix: $!{instance-zowe_setup_dataset_prefix}' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # **COMMONLY_CUSTOMIZED**' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # PROCLIB where Zowe STCs will be copied over' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" From 40e625432698d55e4ca229c0f6546710d8253a4d Mon Sep 17 00:00:00 2001 From: Martin Zeithaml Date: Thu, 28 Nov 2024 11:08:05 +0100 Subject: [PATCH 35/35] Delete last char Signed-off-by: Martin Zeithaml --- bin/commands/init/certificate/index.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/commands/init/certificate/index.sh b/bin/commands/init/certificate/index.sh index df10620ad0..90106839fb 100644 --- a/bin/commands/init/certificate/index.sh +++ b/bin/commands/init/certificate/index.sh @@ -99,11 +99,11 @@ fi save_trace=$ZWE_PRIVATE_LOG_LEVEL_ZWELS ZWE_PRIVATE_LOG_LEVEL_ZWELS= # read keystore domains -cert_import_CAs=$(zwecli_inline_execute_command internal config get --config "${ZWE_CLI_PARAMETER_CONFIG}" --path ".zowe.setup.certificate.importCertificateAuthorities" | tr '\n' ',') +cert_import_CAs=$(zwecli_inline_execute_command internal config get --config "${ZWE_CLI_PARAMETER_CONFIG}" --path ".zowe.setup.certificate.importCertificateAuthorities" | tr '\n' ',' | awk '{ print substr( $0, 1, length($0)-1 ) }') # read keystore domains -cert_domains=$(zwecli_inline_execute_command internal config get --config "${ZWE_CLI_PARAMETER_CONFIG}" --path ".zowe.setup.certificate.san" | tr '\n' ',') +cert_domains=$(zwecli_inline_execute_command internal config get --config "${ZWE_CLI_PARAMETER_CONFIG}" --path ".zowe.setup.certificate.san" | tr '\n' ',' | awk '{ print substr( $0, 1, length($0)-1 ) }') if [ -z "${cert_domains}" ]; then - cert_domains=$(zwecli_inline_execute_command internal config get --config "${ZWE_CLI_PARAMETER_CONFIG}" --path ".zowe.externalDomains" | tr '\n' ',') + cert_domains=$(zwecli_inline_execute_command internal config get --config "${ZWE_CLI_PARAMETER_CONFIG}" --path ".zowe.externalDomains" | tr '\n' ',' | awk '{ print substr( $0, 1, length($0)-1 ) }') fi ZWE_PRIVATE_LOG_LEVEL_ZWELS=$save_trace