Skip to content

Commit

Permalink
Merge pull request #4161 from zowe/user/zlatnikp/installstep
Browse files Browse the repository at this point in the history
User/zlatnikp/installstep
  • Loading branch information
pavelzlatnik authored and MarkAckert committed Feb 3, 2025
1 parent 828349a commit 846ceb9
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 83 deletions.
2 changes: 1 addition & 1 deletion example-zowe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.ZWEV3
# **COMMONLY_CUSTOMIZED**
# PROCLIB where Zowe STCs will be copied over
Expand Down
6 changes: 3 additions & 3 deletions pswi/03_create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ 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 3.0","description":"This workflow configures Zowe v3.0.",
"location": {"dsname":"'${WORKFLOW_DSN}'(ZWECONF)"}},{"name":"ZOWE APIML optimized Configuration","description":"This simplified workflow configures APIML for Zowe 3.0.",
"location": {"dsname":"'${WORKFLOW_DSN}'(ZWEAMLCF)"}},{"name":"ZOWE Creation of CSR request workflow","description":"This workflow creates a certificate sign request.",
"location": {"dsname":"'${WORKFLOW_DSN}'(ZWEWRF02)"}},{"name":"Stand-alone Zowe API ML Configuration","description":"This workflow configures only API ML for Zowe 3.0.",
"location": {"dsname":"'${WORKFLOW_DSN}'(ZWEAMLCF)"}},{"name":"Full Zowe server-side configuration for Zowe 3.0","description":"This workflow configures all Zowe server-side components for Zowe v3.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.",
"location": {"dsname":"'${WORKFLOW_DSN}'(ZWELOADC)"}},{"name":"ZOWE Define key ring and certificates","description":"This workflow defines key ring and certificates for Zowe.",
Expand Down
10 changes: 5 additions & 5 deletions pswi/scripts/deploy_test_2_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,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 3.0",
"description": "This workflow configures Zowe v3.0.",
"location": {"dsname": self.hlq + ".WORKFLOW(ZWECONF)"}},
{"name": "ZOWE APIML optimized Configuration",
"description": "This simplified workflow configures APIML for Zowe 3.0.",
{"name": "Stand-alone Zowe API ML Configuration",
"description": "This workflow configures only API ML for Zowe 3.0.",
"location": {"dsname": self.hlq + ".WORKFLOW(ZWEAMLCF)"}},
{"name": "Full Zowe server-side configuration for Zowe 3.0",
"description": "This workflow configures all Zowe server-side components for Zowe v3.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)"}},
Expand Down
4 changes: 2 additions & 2 deletions pswi/scripts/wf_run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ if [ "$run" = "run" ]; then
echo "Checking if the workflow is ZWECONF" >>$LOG_DIR/report.txt
if [ "$ZWECONF" = "ZWECONF" ]; then
STEP_NAME=$(echo $RESP | grep -o '"currentStepName":".*"' | cut -f4 -d\")
if [ "$STEP_NAME" = "init_zowe" ]; then
echo "The workflow is ZWECONF and should end in step 'init_zowe'"
if [ "$STEP_NAME" = "install_zowe" ]; then
echo "The workflow is ZWECONF and should end in step 'install_zowe', first step of 'zowe_installation_steps'"
STATUS="FINISHED"
else
echo "The workflow is ZWECONF but ended in different step: '$STEP_NAME'" >>$LOG_DIR/report.txt
Expand Down
63 changes: 49 additions & 14 deletions workflows/files/ZWEAMLCF.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
<!-- instance prefix settings -->
<workflowInfo>
<workflowID scope="none">config_apiml_zowe_30</workflowID>
<workflowDefaultName>Configuration of APIML for Zowe 3.0</workflowDefaultName>
<workflowDescription>Use this simplified workflow to configure APIML for Zowe 3.0</workflowDescription>
<workflowDefaultName>Configuration of API ML for Zowe 3.0</workflowDefaultName>
<workflowDescription>Use this simplified workflow to configure API ML for Zowe 3.0</workflowDescription>
<workflowVersion>###ZOWE_VERSION###</workflowVersion>
<vendor>Zowe</vendor>
<General/>
</workflowInfo>
<!--variables-->
<variable name="zowe_setup_dataset_prefix" scope="instance" visibility="public">
<label>Prefix of existing Zowe SZWEEXEC Target libraries</label>
<abstract>Prefix of existing SZWEEXEC Target libraries created during PSWI or SMP/E</abstract>
<description>Prefix of existing SZWEEXEC Target libraries created during PSWI or SMP/E installation phase</description>
<label>Prefix of Zowe setup MVS datasets</label>
<abstract>Prefix of datasets where remaining runtime datasets will be created</abstract>
<description>Prefix of datasets where remaining runtime libraries will be created within execution of Zowe install step (SZWEAUTH, SZWESAMP, SZWEEXEC, SZWELOAD)</description>
<category>zowe</category>
<string valueMustBeChoice="false" multiLine="false">
<!-- Put validation here -->
Expand Down Expand Up @@ -405,8 +405,8 @@ some use cases, like containerization, this port could be different.</descriptio
</variable>
<variable name="components_gateway_port" scope="instance" visibility="public">
<label>Gateway port</label>
<abstract>Port for APIML Gateway</abstract>
<description>Port for APIML Gateway</description>
<abstract>Port for API ML Gateway</abstract>
<description>Port for API ML Gateway</description>
<category>components</category>
<integer>
<!-- Put validation here -->
Expand All @@ -416,8 +416,8 @@ some use cases, like containerization, this port could be different.</descriptio
</variable>
<variable name="components_zaas_port" scope="instance" visibility="public">
<label>ZAAS port</label>
<abstract>Port for APIML ZAAS</abstract>
<description>Port for APIML ZAAS</description>
<abstract>Port for API ML ZAAS</abstract>
<description>Port for API ML ZAAS</description>
<category>components</category>
<integer>
<!-- Put validation here -->
Expand Down Expand Up @@ -698,13 +698,13 @@ some use cases, like containerization, this port could be different.</descriptio
</step>
<step name="configure" optional="false">
<title>Create configuration</title>
<description>Creates the configuration for the Zowe (APIML)</description>
<description>Creates the configuration for the Zowe (API ML)</description>
<prereqStep name="define_variables"/>
<!-- condition -->
<!--variableValues-->
<instructions substitution="true"><![CDATA[Run this step to create the configuration file for APIML for Zowe. <br/>
<instructions substitution="true"><![CDATA[Run this step to create the configuration file for API ML for Zowe. <br/>
Generated yaml file is backward compatible with full Zowe, <br/>
this workflow is just simplified with focus on easier APIML configuration. <br/>
this workflow is just simplified with focus on easier API ML configuration. <br/>
Ensure that the values are correct. <br/>
<b>zowe.yaml</b> file is created in the: <b>${instance-zowe_runtimeDirectory}</b> directory<br/><br/>
<b>NOTE:</b> If you run this workflow outside of PSWI (SMP/E or convenience build), you might encounter a folder write permission issue.<br/>
Expand Down Expand Up @@ -767,7 +767,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"
Expand Down Expand Up @@ -1407,11 +1407,46 @@ echo '# enabled: false' >> "${instance-zowe_runtimeDirectory}/zowe.yaml"
</step>
<step name="zowe_installation_steps" optional="false">
<title>Zowe installation</title>
<description>Zowe installation</description>
<description>Zowe installation</description>
<step name="install_zowe" optional="false">
<title>Run the Zowe install</title>
<description>Configure Zowe.</description>
<prereqStep name="configure"/>
<!-- condition -->
<!--variableValues-->
<instructions substitution="true"><![CDATA[
This step runs the command: <code>zwe install -c ${instance-zowe_runtimeDirectory}/zowe.yml</code><br/>
Will create remaining runtime data sets under zowe.setup.dataset.prefix definition,<br/>
i.e. under specified prefix ${instance-zowe_setup_dataset_prefix}:<br/>
SZWEAUTH contains few Zowe load modules (++PROGRAM).<br/>
SZWESAMP contains several sample configurations.<br/>
SZWEEXEC contains few utilities used by Zowe.<br/>
SZWELOAD contains config manager for REXX.<br/>
]]></instructions>
<weight>1</weight>
<skills>z/OS System Programmer</skills>
<autoEnable>false</autoEnable>
<canMarkAsFailed>false</canMarkAsFailed>
<template>
<inlineTemplate substitution="true">set -e
set -x

export JAVA_HOME='${instance-java_home}'
export NODE_HOME='${instance-node_home}'

export PATH=$PATH:'${instance-zowe_runtimeDirectory}/bin'

zwe install -c '${instance-zowe_runtimeDirectory}/zowe.yaml' --allow-overwrite</inlineTemplate>
<submitAs maxRc="0">shell-JCL</submitAs>
<maxLrecl>1024</maxLrecl>
<!-- zosmfOutput -->
</template>
</step>
<step name="init_zowe" optional="false">
<title>Run scripts for Zowe initialization</title>
<description>Executes scripts for Zowe initialization</description>
<prereqStep name="configure"/>
<prereqStep name="install_zowe"/>
<!-- condition -->
<!--variableValues-->
<instructions substitution="true"><![CDATA[
Expand Down
9 changes: 0 additions & 9 deletions workflows/files/ZWECONF.properties
Original file line number Diff line number Diff line change
Expand Up @@ -750,12 +750,3 @@ zowe_setup_security_stcs_zis=ZWESISTC
# STC name of Auxiliary Service
zowe_setup_security_stcs_aux=ZWESASTC

# zowe_setup_installStep_enabled
# Label: Install the MVS data sets
# Abstract: Check to enable this run step with the zwe install command. For convenience build only.
# Category: installMVSDatasets
# Description:
# 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.
zowe_setup_installStep_enabled=false
Loading

0 comments on commit 846ceb9

Please sign in to comment.