From 501f4a13ae247a2ace0d8715a57e8e42046333e1 Mon Sep 17 00:00:00 2001 From: pavelzlatnik <45940302+pavelzlatnik@users.noreply.github.com> Date: Mon, 10 Feb 2025 17:25:45 +0100 Subject: [PATCH] Retrofit workflows changes from Zowe V3 RC3 (new API ML workflow included) (#4176) * initAPIMLwf2x Signed-off-by: Pavel Zlatnik * iteration1 Signed-off-by: Pavel Zlatnik * iteration2 Signed-off-by: Pavel Zlatnik * signcomit Signed-off-by: Pavel Zlatnik * set debugs to flase Signed-off-by: Pavel Zlatnik * lastComponents Signed-off-by: Pavel Zlatnik * port reorder Signed-off-by: Pavel Zlatnik * wf version based on pipeline Signed-off-by: Pavel Zlatnik * signof Signed-off-by: Pavel Zlatnik * packaging pswi v2 Signed-off-by: Pavel Zlatnik * apiml wf logic changes Signed-off-by: Pavel Zlatnik * proper apiml wording Signed-off-by: Pavel Zlatnik * zowe conf update Signed-off-by: Pavel Zlatnik --------- Signed-off-by: Pavel Zlatnik Co-authored-by: Mark Ackert <35308966+MarkAckert@users.noreply.github.com> --- example-zowe.yaml | 2 +- pswi/03_create.sh | 8 +- pswi/scripts/deploy_test_2_3.py | 9 +- workflows/files/ZWEAMLCF.xml | 1433 +++++++++++++++++++++++++++++++ workflows/files/ZWECONF.xml | 65 +- 5 files changed, 1470 insertions(+), 47 deletions(-) create mode 100644 workflows/files/ZWEAMLCF.xml diff --git a/example-zowe.yaml b/example-zowe.yaml index b70fbc81e8..11444cd9d6 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 SZWEEXEC Target libraries + # where Zowe MVS data sets will be installed prefix: IBMUSER.ZWEV2 # **COMMONLY_CUSTOMIZED** # PROCLIB where Zowe STCs will be copied over diff --git a/pswi/03_create.sh b/pswi/03_create.sh index 0e79707819..49b218da98 100644 --- a/pswi/03_create.sh +++ b/pswi/03_create.sh @@ -28,7 +28,8 @@ echo "z/OSMF version :" $ZOSMF_V # JSONs ADD_SWI_JSON='{"name":"'${SWI_NAME}'","system":"'${ZOSMF_SYSTEM}'","description":"ZOWE v'${VERSION}' Portable Software Instance", "globalzone":"'${GLOBAL_ZONE}'","targetzones":["'${TZONE}'"],"workflows":[{"name":"ZOWE Mount Workflow","description":"This workflow performs mount action of ZOWE zFS.", -"location": {"dsname":"'${WORKFLOW_DSN}'(ZWEWRF02)"}},{"name":"ZOWE Configuration of Zowe 2.0","description":"This workflow configures Zowe v2.0.", +"location": {"dsname":"'${WORKFLOW_DSN}'(ZWEWRF02)"}},{"name":"Stand-alone Zowe API ML Configuration","description":"This workflow configures only API ML for Zowe 2.0.", +"location": {"dsname":"'${WORKFLOW_DSN}'(ZWEAMLCF)"}},{"name":"Full Zowe server-side configuration for Zowe 2.0","description":"This workflow configures all Zowe server-side components for Zowe v2.0.", "location": {"dsname":"'${WORKFLOW_DSN}'(ZWECONF)"}},{"name":"ZOWE Creation of CSR request workflow","description":"This workflow creates a certificate sign request.", "location": {"dsname":"'${WORKFLOW_DSN}'(ZWECRECR)"}},{"name":"ZOWE Sign a CSR request","description":"This workflow signs the certificate sign request by a local CA.", "location": {"dsname":"'${WORKFLOW_DSN}'(ZWESIGNC)"}},{"name":"ZOWE Load Authentication Certificate into ESM","description":"This workflow loads a signed client authentication certificate to the ESM.", @@ -145,6 +146,11 @@ echo "target=\"//'${WORKFLOW_DSN}(ZWESIGNC)'\";" >>JCL echo "iconv -f ISO8859-1 -t IBM-1047 \$source > _ZWESIGNC;" >>JCL echo "sed 's|UTF-8|IBM-1047|g' _ZWESIGNC > ZWESIGNC;" >>JCL echo "cp -T ZWESIGNC \$target;" >>JCL +echo "source=\"${ZOWE_MOUNT}files/workflows/ZWEAMLCF.xml\";" >>JCL +echo "target=\"//'${WORKFLOW_DSN}(ZWEAMLCF)'\";" >>JCL +echo "iconv -f ISO8859-1 -t IBM-1047 \$source > _ZWEAMLCF;" >>JCL +echo "sed 's|UTF-8|IBM-1047|g' _ZWEAMLCF > ZWEAMLCF;" >>JCL +echo "cp -T ZWEAMLCF \$target;" >>JCL echo "source=\"${ZOWE_MOUNT}files/workflows/ZWECONF.xml\";" >>JCL echo "target=\"//'${WORKFLOW_DSN}(ZWECONF)'\";" >>JCL echo "iconv -f ISO8859-1 -t IBM-1047 \$source > _ZWECONF;" >>JCL diff --git a/pswi/scripts/deploy_test_2_3.py b/pswi/scripts/deploy_test_2_3.py index f06a631379..152223aedf 100644 --- a/pswi/scripts/deploy_test_2_3.py +++ b/pswi/scripts/deploy_test_2_3.py @@ -196,9 +196,12 @@ def create_swi(self): {"name": "ZOWE Mount Workflow", "description": "This workflow performs mount action of ZOWE zFS.", "location": {"dsname": self.hlq + ".WORKFLOW(ZWEWRF02)"}}, - {"name": "ZOWE Configuration of Zowe 2.0", - "description": "This workflow configures Zowe v2.0.", - "location": {"dsname": self.hlq + ".WORKFLOW(ZWECONF)"}}, + {"name": "Stand-alone Zowe API ML Configuration", + "description": "This workflow configures only API ML for Zowe 2.0.", + "location": {"dsname": self.hlq + ".WORKFLOW(ZWEAMLCF)"}}, + {"name": "Full Zowe server-side configuration for Zowe 2.0", + "description": "This workflow configures all Zowe server-side components for Zowe v2.0.", + "location": {"dsname": self.hlq + ".WORKFLOW(ZWECONF)"}}, {"name":"ZOWE Creation of CSR request workflow", "description":"This workflow creates a certificate sign request.", "location": {"dsname": self.hlq + ".WORKFLOW(ZWECRECR)"}}, diff --git a/workflows/files/ZWEAMLCF.xml b/workflows/files/ZWEAMLCF.xml new file mode 100644 index 0000000000..07bd8ffa03 --- /dev/null +++ b/workflows/files/ZWEAMLCF.xml @@ -0,0 +1,1433 @@ + + + true + + + config_apiml_zowe_20 + Configuration of API ML for Zowe 2.0 + Use this simplified workflow to configure API ML for Zowe 2.0 + ###ZOWE_VERSION### + Zowe + + + + + + Prefix of datasets where remaining runtime datasets will be created + Prefix of datasets where remaining runtime libraries will be created within execution of Zowe install step (SZWEAUTH, SZWESAMP, SZWEEXEC, SZWELOAD) + zowe + + + + IBMUSER.ZWEV2 + + + + + Where Zowe STCs will be copied over + Where Zowe STCs will be copied over + zowe + + + + USER.PROCLIB + + + + + Zowe PARMLIB + Zowe parameter library + zowe + + + + IBMUSER.ZWEV2.CUST.PARMLIB + + + + + Zowe ZIS plugins PARMLIB + Holds PARMLIB members for ZIS plugins + zowe + + + + ZWESIP00 + + + + + JCL library where Zowe will store temporary JCLs during initialization + JCL library where Zowe will store temporary JCLs during initialization + zowe + + + + IBMUSER.ZWEV2.CUST.JCLLIB + + + + + Load library where Zowe stores libraries for Utilities for use by Zowe and extensions + Load library for Utilities for use by Zowe and extensions + zowe + + + + IBMUSER.ZWEV2.SZWELOAD + + + + + APF authorized LOADLIB for Zowe + APF authorized LOADLIB for Zowe core + zowe + + + + IBMUSER.ZWEV2.SZWEAUTH + + + + + APF authorized LOADLIB for Zowe ZIS Plugins + APF authorized LOADLIB for Zowe ZIS Plugins + zowe + + + + IBMUSER.ZWEV2.CUST.ZWESAPL + + + + + Zowe runtime (root) directory with libraries + Existing Zowe runtime.<br /> +If you created ZOWE via PSWI, <br /> +zowe runtime is your Target Mount Point from PSWI deployment. <br /> +It is used by ZWESLSTC or by zwe command + zowe + + ~?(\/[^\/]+)+ + Please specify proper full USS path ending without a trailing slash. + + + + + Where to store runtime logs + Where to store runtime logs + zowe + + + + /global/zowe/logs + + + + + Zowe runtime workspace directory + Zowe runtime workspace directory + zowe + + + + /global/zowe/workspace + + + + + Where extensions are installed + zowe_extensionDirectory + zowe + + + + /global/zowe/extensions + + + + + Zowe JES job name + Zowe JES job name + zowe + + + + ZWE1SV + + + + + Prefix of component address space + Prefix of component address space + zowe + + + + ZWE1 + + + + + The list of external domains + Defines a list of external domains that will be used by the Zowe instance. + zowe + + + + sample-domain.com + + + + + The port you use to access Zowe Gateway from your web browser + This is the port you use to access Zowe Gateway from your web browser. +In many use cases, this should be same as <b>components.gateway.port</b>. But in +some use cases, like containerization, this port could be different. + zowe + + + + 7554 + + + + + Set to "debug" or "trace" to display extra debug information + Set to "debug" or "trace" to display extra debug information + zowe + + + info + debug + trace + info + + + + + Set to "exit" or "warn" if any component has an error + Set to "exit" if you want startup to exit if any component has an error in the configuration stage, otherwise zwe will issue a warning but continue running. + zowe + + + warn + exit + warn + + + + + Certificate keystore type (PKCS12, JCERACFKS) + Certificate keystore type (PKCS12, JCERACFKS) + certificates + + + + PKCS12 + JCERACFKS + JCERACFKS + + + + + Zowe certificate keystore file. For keyring, the format is "safkeyring://OWNER/KEYRING". + Zowe certificate keystore file + certificates + + + + safkeyring://OWNER/KEYRING + + + + + Certificate keystore password. + Certificate keystore password. + certificates + + + password + + + + + Alias for the certificate keystore + Alias for the certificate keystore + certificates + + + + localhost + + + + + Zowe certificate truststore type + Zowe certificate truststore type + certificates + + + + PKCS12 + JCERACFKS + JCERACFKS + + + + + File location for certificate truststore. For keyring, the format is "safkeyring://OWNER/KEYRING" + File location for the certificate truststore + certificates + + + + safkeyring://OWNER/KEYRING + + + + + Password for the certificate truststore + Password for the certificate truststore + certificates + + + + password + + + + + Path to the JAVA home + Path to the JAVA home + java + + + + + + + + Path to the Node.js home + Path to the Node.js home + Node.js + + + + + + + + Hostname of the running z/OSMF instance + Hostname of the running z/OSMF instance + zOSMF + + + + dvipa.my-company.com + + + + + Port of the z/OSMF instance + Port of the z/OSMF instance + zOSMF + + + + 443 + + + + + APPLID of the z/OSMF instance + APPLID of the z/OSMF instance + zOSMF + + + + IZUDFLT + + + + + Port for API ML Gateway + Port for API ML Gateway + components + + + + 7554 + + + + + Port on which API Catalog should be running. + Port on which API Catalog should be running. + components + + + + 7552 + + + + + Port on which Discovery service should be running + Port on which Discovery service should be running + components + + + + 7553 + + + + + Port for Caching service + Port for Caching service + components + + + + 7555 + + + + + Port for jgroups + Port for jgroups. This is required if storage mode is infinispan. + components + + + + 7559 + + + + + ID you use to separate multiple Zowe installs + ID when determining resource names used in RBAC authorization checks such as dataservices with RBAC expects this ID in SAF resources + zowe + + + + 1 + + + + + ID that can be used by servers to distinguish their cookies from unrelated Zowe installs + ID which allows multiple copies of Zowe to be used within the same client + zowe + + + + 1 + + + + + Security product name. Can be RACF, ACF2 or TSS + Security product name. Can be RACF, ACF2 or TSS + security + + + + + RACF + TSS + ACF2 + RACF + + + + + Zowe admin user group + Zowe admin user group + security + + + + ZWEADMIN + + + + + + Zowe STC group + Zowe STC group + security + + + + + ZWEADMIN + + + + + Zowe SysProg group + Zowe SysProg group + security + + + + + ZWEADMIN + + + + + Zowe runtime user name of main service + Zowe runtime user name of main service + security + + + + + ZWESVUSR + + + + + Zowe runtime user name of ZIS + Zowe runtime user name of ZIS + security + + + + + ZWESIUSR + + + + + STC name of main service + STC name of main service + security + + + + + ZWESLSTC + + + + + STC name of ZIS + STC name of ZIS + security + + + + + ZWESISTC + + + + + STC name of Auxiliary Service + STC name of Auxiliary Service + security + + + + + ZWESASTC + + + + + + Define variables + Use this step to define the variables for execution + + + Define the main variables + Use this step to define the main variables for Zowe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Run this step to fill base variables. + 1 + z/OS System Programmer + false + false + + + + Ports + Specify ports variables for components + + + + + + + Run this step to specify ports variables for components + 1 + z/OS System Programmer + false + false + + + + + Create configuration + Creates the configuration for the Zowe (API ML) + + + + + Generated yaml file is backward compatible with full Zowe,
+ this workflow is just simplified with focus on easier API ML configuration.
+ Ensure that the values are correct.
+ zowe.yaml file is created in the: ${instance-zowe_runtimeDirectory} directory

+ NOTE: If you run this workflow outside of PSWI (SMP/E or convenience build), you might encounter a folder write permission issue.
+ To solve the issue, run the following command in USS:
+ chmod 775 ${instance-zowe_runtimeDirectory}
+ and change the folder UID to the ID of the user who executes this workflow.
+ Issue the following command:
+ chown ${_workflow-workflowOwner} ${instance-zowe_runtimeDirectory}
+ Re-run the step. +]]>
+ 1 + z/OS System Programmer + false + false + +
+ + Zowe installation + Zowe installation + + Run the Zowe install + Configure Zowe. + + + + zwe install -c ${instance-zowe_runtimeDirectory}/zowe.yml
+ Will create remaining runtime data sets under zowe.setup.dataset.prefix definition,
+ i.e. under specified prefix ${instance-zowe_setup_dataset_prefix}:
+ SZWEAUTH contains few Zowe load modules (++PROGRAM).
+ SZWESAMP contains several sample configurations.
+ SZWEEXEC contains few utilities used by Zowe.
+ SZWELOAD contains config manager for REXX.
+ ]]>
+ 1 + z/OS System Programmer + false + false + +
+ + Run scripts for Zowe initialization + Executes scripts for Zowe initialization + + + + + + zwe init mvs -c ${instance-zowe_runtimeDirectory}/zowe.yml --allow-overwrite
+ zwe init stc -c ${instance-zowe_runtimeDirectory}/zowe.yml --allow-overwrite
+
+ NOTE: + Each zwe init sub-command defines a configuration. +
    +
  • mvs: Copy the data sets provided with Zowe to custom data sets.
  • +
  • stc: Configure the system to launch the Zowe started task.
  • +
+ ]]>
+ 1 + z/OS System Programmer + false + false + +
+
+
diff --git a/workflows/files/ZWECONF.xml b/workflows/files/ZWECONF.xml index cbc5eb9963..5d72cf3f92 100644 --- a/workflows/files/ZWECONF.xml +++ b/workflows/files/ZWECONF.xml @@ -12,9 +12,9 @@ - - 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 + + Prefix of datasets where remaining runtime datasets will be created + Prefix of datasets where remaining runtime libraries will be created within execution of Zowe install step (SZWEAUTH, SZWESAMP, SZWEEXEC, SZWELOAD) zowe @@ -460,8 +460,8 @@ How we want to verify SSL certificates of services. Valid values are: - Port for the APIML Gateway - Port for the APIML Gateway + Port for the API ML Gateway + Port for the API ML Gateway components @@ -492,7 +492,7 @@ How we want to verify SSL certificates of services. Valid values are: - + Authorization provider for the Gateway Authorization provider for the Gateway components @@ -503,7 +503,7 @@ 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 components @@ -514,7 +514,7 @@ How we want to verify SSL certificates of services. Valid values are: - + Service ID for Gateway security auth Service ID for Gateway security auth components @@ -525,7 +525,7 @@ How we want to verify SSL certificates of services. Valid values are: - + Check to enable the security authorization endpoint Check to enable the security authorization endpoint components @@ -536,7 +536,7 @@ How we want to verify SSL certificates of services. Valid values are: - + Security authorization provider for the Gateway Security authorization provider for the Gateway components @@ -546,7 +546,7 @@ 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 components @@ -1157,20 +1157,7 @@ How we want to verify SSL certificates of services. Valid values are: ZWESASTC - - - - Check to enable this run step with the zwe install command. For convenience build only. - Check this option to enable the optional workflow step with zwe install command. After Zowe convenience build is extracted, - you can enable this flag to run the zwe install command to install MVS data sets within this workflow run. - This option is for convenience build only. SMP/E installs the MVS data sets during installation. - installMVSDatasets - - - - false - - + @@ -1242,8 +1229,7 @@ How we want to verify SSL certificates of services. Valid values are: - - + Run this step to fill base variables. 1 z/OS System Programmer @@ -1640,7 +1626,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 SZWEEXEC Target libraries' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" +echo ' # where Zowe MVS data sets will be installed' >> "${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" @@ -2446,26 +2432,21 @@ echo '# enabled: false' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" Zowe installation Zowe installation - - Run the Zowe install (only for convenience build) + + Run the Zowe install Configure Zowe. - - 1==1 - Always true - - - Skips this step if Install the MVS data sets was not selected - !${instance-zowe_setup_installStep_enabled} - skipped - - - zwe install -c ${instance-zowe_runtimeDirectory}/zowe.yml + This step runs the command: zwe install -c ${instance-zowe_runtimeDirectory}/zowe.yml
+ Will create remaining runtime data sets under zowe.setup.dataset.prefix definition,
+ i.e. under specified prefix ${instance-zowe_setup_dataset_prefix}:
+ SZWEAUTH contains few Zowe load modules (++PROGRAM).
+ SZWESAMP contains several sample configurations.
+ SZWEEXEC contains few utilities used by Zowe.
+ SZWELOAD contains config manager for REXX.
]]>
1 z/OS System Programmer