Skip to content

Commit

Permalink
Merge branch 'v3.x/staging' into v3.x/readYamlInit
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Zeithaml <[email protected]>
  • Loading branch information
Martin-Zeithaml authored Nov 19, 2024
2 parents 5dea7ff + 30d2e0d commit cf7a652
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 52 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

All notable changes to the Zowe Installer will be documented in this file.

## `3.0.1`
## `3.1.0`
- Enhancement: command `zwe init` does not require NodeJS [#4088](https://github.com/zowe/zowe-install-packaging/pull/4088)
- 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)
Expand Down
4 changes: 2 additions & 2 deletions bin/commands/install/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 29 additions & 2 deletions pswi/ZWECONF_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -55,6 +58,30 @@ 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 to or delete from the ZWECONF.xml workflow what needs or doesn't need to be there."
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."
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 <final_diff.txt
cat final_final_diff.txt
echo "------------------------------------------------------------------------"
echo "First line is from the example-zowe.yaml and the line bellow is from the"
echo "zowe.yaml created by the ZWECONF.xm workflow."
cp final_final_diff.txt $LOG_DIR/diff_output.txt
exit -1
fi
126 changes: 80 additions & 46 deletions pswi/scripts/base_diff.txt
Original file line number Diff line number Diff line change
@@ -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#"
2 changes: 1 addition & 1 deletion workflows/files/ZWECONF.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit cf7a652

Please sign in to comment.