Skip to content

Commit

Permalink
Merge pull request #2719 from zowe/v2.x/workflows-revert
Browse files Browse the repository at this point in the history
V2.x/workflows
  • Loading branch information
jackjia-ibm authored Mar 8, 2022
2 parents 6a869b3 + e92f580 commit d39fe5f
Show file tree
Hide file tree
Showing 13 changed files with 2,530 additions and 51 deletions.
57 changes: 26 additions & 31 deletions pswi/03_create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ 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 Security Workflow","description":"This workflow configure zowe security manager.",
"location": {"dsname":"'${WORKFLOW_DSN}'(ZWESECUR)"}},{"name":"ZOWE Certificates Workflow","description":"This workflow configure zowe security certificates.",
"location": {"dsname":"'${WORKFLOW_DSN}'(ZWEWRF05)"}},{"name":"ZOWE Cross-memory Workflow","description":"This workflow configure cross-memory server.",
"location": {"dsname":"'${WORKFLOW_DSN}'(ZWEWRF06)"}},{"name":"ZOWE Instance and STC Workflow","description":"This workflow create zowe instance and STC.",
"location": {"dsname":"'${WORKFLOW_DSN}'(ZWEWRF03)"}}],"products":[{"prodname":"ZOWE","release":"'${VERSION}'","vendor":"Open Mainframe Project","url":"https://www.zowe.org/"}]}'
"location": {"dsname":"'${WORKFLOW_DSN}'(ZWEWRF02)"}},{"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.",
"location": {"dsname":"'${WORKFLOW_DSN}'(ZWEKRING)"}}],"products":[{"prodname":"ZOWE","release":"'${VERSION}'","vendor":"Open Mainframe Project","url":"https://www.zowe.org/"}]}'
ADD_WORKFLOW_DSN_JSON='{"dirblk":5,"avgblk":25000,"dsorg":"PO","alcunit":"TRK","primary":80,"secondary":40,"recfm":"VB","blksize":26000,"lrecl":4096,"volser":"'${VOLUME}'"}'
ADD_EXPORT_DSN_JSON='{"dsorg":"PO","alcunit":"TRK","primary":10,"secondary":5,"dirblk":10,"avgblk":500,"recfm":"FB","blksize":400,"lrecl":80}'
EXPORT_JCL_JSON='{"packagedir":"'${EXPORT}'","jcldataset":"'${EXPORT_DSN}'","workvolume":"'${VOLUME}'"}'
Expand Down Expand Up @@ -118,17 +118,6 @@ else
fi
fi

# Store ZWEWRF02 wokflow in the WORKFLOW dataset
echo "Uploading workflow ZWEWRF02 into ${DIR} directory thru SSH"

cd workflows

sshpass -p${ZOSMF_PASS} sftp -o BatchMode=no -o StrictHostKeyChecking=no -o PubkeyAuthentication=no -b - -P 22 ${ZOSMF_USER}@${HOST} << EOF
cd ${WORK_MOUNT}
put ZWEWRF02
EOF
cd ..

echo "Copying workflows to ${WORKFLOW_DSN} data set."

echo ${JOBST1} > JCL
Expand All @@ -137,22 +126,28 @@ echo "//COPYWRFS 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 "source=\"${ZOWE_MOUNT}files/workflows/ZWESECUR.xml\";" >> JCL
echo "target=\"//'${WORKFLOW_DSN}(ZWESECUR)'\";" >> JCL
echo "cp \$source \$target;" >> JCL
echo "source=\"${ZOWE_MOUNT}files/workflows/ZWEWRF03.xml\";" >> JCL
echo "target=\"//'${WORKFLOW_DSN}(ZWEWRF03)'\";" >> JCL
echo "cp \$source \$target;" >> JCL
echo "source=\"${ZOWE_MOUNT}files/workflows/ZWEWRF05.xml\";" >> JCL
echo "target=\"//'${WORKFLOW_DSN}(ZWEWRF05)'\";" >> JCL
echo "cp \$source \$target;" >> JCL
echo "source=\"${ZOWE_MOUNT}files/workflows/ZWEWRF06.xml\";" >> JCL
echo "target=\"//'${WORKFLOW_DSN}(ZWEWRF06)'\";" >> JCL
echo "cp \$source \$target;" >> JCL
echo "source=\"${WORK_MOUNT}/ZWEWRF02\";" >> JCL
echo "SH set -x;set -e;" >> JCL
echo "cd ${WORK_MOUNT};" >> JCL
echo "source=\"${ZOWE_MOUNT}files/workflows/ZWEWRF02.xml\";" >> JCL
echo "target=\"//'${WORKFLOW_DSN}(ZWEWRF02)'\";" >> JCL
echo "cp \$source \$target;" >> JCL
echo "sed 's|UTF-8|IBM-1047|g' \$source > _ZWEWRF02;" >> JCL
echo "cp -T _ZWEWRF02 \$target;" >> JCL
echo "source=\"${ZOWE_MOUNT}files/workflows/ZWECRECR.xml\";" >> JCL
echo "target=\"//'${WORKFLOW_DSN}(ZWECRECR)'\";" >> JCL
echo "sed 's|UTF-8|IBM-1047|g' \$source > _ZWECRECR;" >> JCL
echo "cp -T _ZWECRECR \$target;" >> JCL
echo "source=\"${ZOWE_MOUNT}files/workflows/ZWEKRING.xml\";" >> JCL
echo "target=\"//'${WORKFLOW_DSN}(ZWEKRING)'\";" >> JCL
echo "sed 's|UTF-8|IBM-1047|g' \$source > _ZWEKRING;" >> JCL
echo "cp -T _ZWEKRING \$target;" >> JCL
echo "source=\"${ZOWE_MOUNT}files/workflows/ZWELOADC.xml\";" >> JCL
echo "target=\"//'${WORKFLOW_DSN}(ZWELOADC)'\";" >> JCL
echo "sed 's|UTF-8|IBM-1047|g' \$source > _ZWELOADC;" >> JCL
echo "cp -T _ZWELOADC \$target;" >> JCL
echo "source=\"${ZOWE_MOUNT}files/workflows/ZWESIGNC.xml\";" >> JCL
echo "target=\"//'${WORKFLOW_DSN}(ZWESIGNC)'\";" >> JCL
echo "sed 's|UTF-8|IBM-1047|g' \$source > _ZWESIGNC;" >> JCL
echo "cp -T _ZWESIGNC \$target;" >> JCL
echo "/*" >> JCL

sh scripts/submit_jcl.sh "`cat JCL`"
Expand Down
24 changes: 12 additions & 12 deletions pswi/scripts/deploy_test_2_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,18 @@ 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 Security Workflow",
"description":"This workflow configure zowe security manager.",
"location": {"dsname": self.hlq + ".WORKFLOW(ZWESECUR)"}},
{"name":"ZOWE Certificates Workflow",
"description":"This workflow configure zowe security certificates.",
"location": {"dsname": self.hlq + ".WORKFLOW(ZWEWRF05)"}},
{"name":"ZOWE Cross-memory Workflow",
"description":"This workflow configure cross-memory server.",
"location": {"dsname": self.hlq + ".WORKFLOW(ZWEWRF06)"}},
{"name":"ZOWE Instance and STC Workflow",
"description":"This workflow create zowe instance and STC.",
"location": {"dsname": self.hlq + ".WORKFLOW(ZWEWRF03)"}}
{"name":"ZOWE Creation of CSR request workflow",
"description":"This workflow creates a certificate sign request.",
"location": {"dsname": self.hlq + ".WORKFLOW(ZWECRECR)"}},
{"name":"ZOWE Sign a CSR request",
"description":"This workflow signs the certificate sign request by a local CA.",
"location": {"dsname": self.hlq + ".WORKFLOW(ZWESIGNC)"}},
{"name":"ZOWE Load Authentication Certificate into ESM",
"description":"This workflow loads a signed client authentication certificate to the ESM.",
"location": {"dsname": self.hlq + ".WORKFLOW(ZWELOADC)"}},
{"name":"ZOWE Define key ring and certificates",
"description":"This workflow defines key ring and certificates for Zowe.",
"location": {"dsname": self.hlq + ".WORKFLOW(ZWEKRING)"}}
]
}
swi_url = "{0}/zosmf/swmgmt/swi".format(self.url)
Expand Down
63 changes: 63 additions & 0 deletions workflows/files/ZWECRECR.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# certificate_label
# Label: Certificate Label
# Abstract: The certificate label that is used for the request
# Category: General
# Description:
# Specifies the label of the certificate that is used to obtain the distinguished name and public key for the request
certificate_label=

# output_dataset
# Label: Output Data set
# Abstract: Data set that will contain the CSR
# Category: General
# Description:
# Specifies the name of the data set into which the certificate request is written. The data set must not already exist
output_dataset=

# esm
# Label: Security Manager
# Abstract: Please, specify your security management software
# Category: General
# Description:
# Please, specify the ESM system you use on your workstation
# Choices: RACF,TSS,ACF2
esm=RACF

# racf_acid
# Label: RACF ACID
# Abstract: [ ID(certificate-owner) | SITE | CERTAUTH ]
# Category: RACF
# Description:
# Indicates that the specified certificate is either a user certificate that is associated with the specified user ID,
# a site certificate, or a certificate-authority certificate.
# If you do not specify ID, SITE, or CERTAUTH, the default is ID,
# and certificate-owner defaults to the user ID of the command issuer.
# If more than one keyword is specified, the last specified keyword is processed and
# the others are ignored by TSO command parse processing.
# Choices: ID(certificate-owner),SITE,CERTAUTH
racf_acid=

# tss_acid
# Label: TSS ACID
# Abstract: acid|CERTAUTH|CERTSITE
# Category: TSS
# Description:
# ACID that is used for the CSR creation
# Choices: CERTAUTH,CERTSITE
tss_acid=

# acf2_acid
# Label: ACF2 ACID
# Abstract: Your USERID
# Category: ACF2
# Description:
# Please, specify the user ID for the certificate creation
acf2_acid=

# uss_output_folder
# Label: CSR USS output folder
# Abstract: USS folder which will contain the resulting .csr file
# Category: General
# Description:
# This folder will contain the resulting request.csr file which can be signed by your CA authority.
uss_output_folder=/tmp/
Loading

0 comments on commit d39fe5f

Please sign in to comment.