Skip to content

Commit

Permalink
Merge branch 'v3.x/staging' into user/markackert/staging-to-v3-rc2
Browse files Browse the repository at this point in the history
Signed-off-by: MarkAckert <[email protected]>
  • Loading branch information
MarkAckert committed Sep 26, 2024
2 parents 79ea2b0 + 48f9f9f commit eb1248f
Show file tree
Hide file tree
Showing 22 changed files with 402 additions and 240 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ jobs:
jfrog rt dl ${{github.event.inputs.PSWI_SMPE_AZWE_ARTIFACTORY_PATH}}/AZWE002*.zip --flat=true .pax/AZWE002.zip
jfrog rt dl ${{github.event.inputs.PSWI_SMPE_ARTIFACTORY_PATH}}/zowe-smpe-*.zip --flat=true .pax/zowe-smpe.zip
- name: '[SMPE Pax 4] Build PSWI'
id: pswi
if: env.INPUTS_BUILD_PSWI == 'true'
timeout-minutes: 60
run: |
Expand All @@ -367,6 +367,14 @@ jobs:
ZZOW_SSH_PORT: ${{ secrets.SSH_MARIST_ALLSYS_PORT }}
VERSION: ${{ env.P_VERSION }}

- name: Store PSWI folder
uses: actions/upload-artifact@v4
if: env.INPUTS_BUILD_PSWI == 'true' && failure()
with:
name: pswi-folder
path: |
pswi/**
- name: '[K8S] Build Kubernetes'
timeout-minutes: 10
if: env.INPUTS_BUILD_KUBERNETES == 'true'
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/pswi-zowe-config-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: PSWI zowe.yaml sync check

permissions:
id-token: write
issues: write
pull-requests: write
contents: write

on:
push:
branches:
- v3.x/staging
pull_request:
types: [opened, synchronize]
workflow_dispatch:

jobs:
test-pswi-zowe-yaml:
runs-on: ubuntu-latest
steps:

- name: '[Prep 1] Checkout'
uses: actions/checkout@v4

# Taken from shared-actions/prepare-workflow
- name: 'export github username and email'
run: |
git config --global user.name ${{ github.actor }}
echo ${{ github.actor }}
git config --global user.email [email protected]
shell: bash

- name: '[PSI-LOCK] Lock marist servers to build PSWI'
uses: zowe-actions/shared-actions/lock-resource@main
with:
lock-repository: ${{ github.repository }}
github-token: ${{ secrets.GITHUB_TOKEN }}
lock-resource-name: zowe-psi-build-zzow07-lock
lock-avg-retry-interval: 30

- name: 'Test ZWECONF workflow'
id: zweconf
timeout-minutes: 30
run: |
cd pswi
./ZWECONF_test.sh
env:
ZOSMF_USER: ${{ secrets.ZOWE_PSWI_BUILD_USR }}
ZOSMF_PASS: ${{ secrets.ZOWE_PSWI_BUILD_PASSWD }}
ZZOW_SSH_PORT: ${{ secrets.SSH_MARIST_ALLSYS_PORT }}

- name: Store test output
uses: actions/upload-artifact@v4
if: steps.zweconf.outcome != '' && failure()
with:
name: zweconf_test
path: |
pswi/**.txt
pswi/zowe_.yaml
pswi/ZWECONF1/**
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ All notable changes to the Zowe Installer will be documented in this file.

### New features and enhancements
- Enhancement: Added explanation to possible error message when checking z/OSMF setting. [#3956](https://github.com/zowe/zowe-install-packaging/pull/3956)
- Enhancement: New plugin identifier added to list of plugins and `allowedPlugins.json` for the new V3 Desktop in Angular 18. [#3984](https://github.com/zowe/zowe-install-packaging/pull/3984)

<!--Add the PR or issue number to the entry if available.-->

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# zowe-install-packaging
# zowe-install-packaging

This repository includes Zowe installation script and pipelines to build Zowe.

Expand Down
14 changes: 8 additions & 6 deletions bin/libs/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,17 @@ export function resolvePath(...parts:string[]): string {
}

export function mkdirp(path:string, mode?: number): number {
if (!path) {
return 1;
}
let paths: string[] = [];
let parts = path.split('/');
let currentPath = '';
parts.forEach((part:string)=> {
currentPath+='/'+part;
if (currentPath.startsWith('//')) {
currentPath = currentPath.substring(1);
if (part) {
currentPath += '/' + part;
paths.push(currentPath);
}
paths.push(currentPath);
});

let firstMissingDir: number;
Expand All @@ -85,9 +87,9 @@ export function mkdirp(path:string, mode?: number): number {
}
}

common.printDebug('paths='+JSON.stringify(paths));
common.printDebug('fs.mkdir paths='+JSON.stringify(paths));
if (firstMissingDir >= paths.length) { return 0; }
common.printDebug('firstMissingDir='+paths[firstMissingDir]);
common.printDebug('fs.mkdir firstMissingDir='+paths[firstMissingDir]);

for (let i = firstMissingDir; i < paths.length; i++) {
let rc = os.mkdir(paths[i], mode ? mode : 0o777);
Expand Down
28 changes: 8 additions & 20 deletions example-zowe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,27 @@ zowe:
dataset:
# **COMMONLY_CUSTOMIZED**
# where Zowe MVS data sets will be installed
prefix: IBMUSER.ZWEV2
prefix: IBMUSER.ZWEV3
# **COMMONLY_CUSTOMIZED**
# PROCLIB where Zowe STCs will be copied over
proclib: USER.PROCLIB
# **COMMONLY_CUSTOMIZED**
# Zowe PARMLIB
parmlib: IBMUSER.ZWEV2.CUST.PARMLIB
parmlib: IBMUSER.ZWEV3.CUST.PARMLIB
# Holds Zowe PARMLIB members for plugins
parmlibMembers:
# For ZIS plugins
zis: ZWESIP00
# **COMMONLY_CUSTOMIZED**
# JCL library where Zowe will store temporary JCLs during initialization
jcllib: IBMUSER.ZWEV2.CUST.JCLLIB
jcllib: IBMUSER.ZWEV3.CUST.JCLLIB
# Utilities for use by Zowe and extensions
loadlib: IBMUSER.ZWEV2.SZWELOAD
loadlib: IBMUSER.ZWEV3.SZWELOAD
# APF authorized LOADLIB for Zowe
authLoadlib: IBMUSER.ZWEV2.SZWEAUTH
authLoadlib: IBMUSER.ZWEV3.SZWEAUTH
# **COMMONLY_CUSTOMIZED**
# APF authorized LOADLIB for Zowe ZIS Plugins
authPluginLib: IBMUSER.ZWEV2.CUST.ZWESAPL
authPluginLib: IBMUSER.ZWEV3.CUST.ZWESAPL

# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# # Security related configurations. This setup is optional.
Expand Down Expand Up @@ -292,22 +292,10 @@ zowe:
# Where extensions are installed
extensionDirectory: /global/zowe/extensions

# **COMMONLY_CUSTOMIZED**
useConfigmgr: true
# Setting to true will enable:
# * schema-backed validation of zowe.yaml
# * should greatly improve startup time.
# * can supply multiple zowe.yaml as defaults & overrides in the format of
# FILE(/my/customizations.yaml):PARMLIB(MYORG.ZOWE(YAML)):FILE(/zowe/defaults.yaml)
# * allows templating in zowe.yaml by putting references within ${{ }} blocks such as
# rewriting the job section below as
# job:
# name: ${{ zowe.job.prefix }}SV
# prefix: ZWE1
configmgr:
# STRICT=quit on any error, including missing schema
# COMPONENT-COMPAT=if component missing schema, skip it with warning instead of quit
validation: "COMPONENT-COMPAT"
validation: "STRICT"

# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# runtime z/OS job name
Expand Down Expand Up @@ -379,7 +367,7 @@ zowe:

# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# You can define any Zowe message portions to be checked for and the message added to the
# system log upon its logging, truncated to 126 characters.
# system log upon its logging, truncated to 126 characters (wildcards are not supported).
sysMessages:
# # Zowe starting
- "ZWEL0021I"
Expand Down
28 changes: 6 additions & 22 deletions files/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,26 +157,13 @@ components:
authorization:
endpoint:
enabled: false
provider: ""
provider: "native"
x509:
enabled: false
server:
internal:
# gateway supports internal connector
enabled: false
port: 7550
ssl:
enabled: false

# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
metrics-service:
enabled: false
port: 7551
debug: false

# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
cloud-gateway:
enabled: false
zaas:
enabled: true
port: 7558
debug: false

Expand All @@ -201,16 +188,13 @@ components:
storage:
evictionStrategy: reject
# can be inMemory, VSAM, redis or infinispan
mode: VSAM
size: 10000
vsam:
# your VSAM data set created by "zwe init vsam" command or ZWECSVSM JCL
# this is required if storage mode is VSAM
name: ""
mode: infinispan
infinispan:
# this is required if storage mode is infinispan
jgroups:
port: 7600
keyExchange:
port: 7601

# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
app-server:
Expand Down
4 changes: 2 additions & 2 deletions pswi/01_smpe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ STATUS_NAME=`echo $RESP | grep -o '"statusName":".*"' | cut -f4 -d\"`

if [ "$STATUS_NAME" = "in-progress" ]
then
echo "Workflow ended with an error."
echo $RESP
echo "Workflow with SMP/E ended with an error." >> report.txt
echo $RESP >> report.txt
exit -1
elif [ "$STATUS_NAME" = "complete" ]
then
Expand Down
4 changes: 2 additions & 2 deletions pswi/02_ptf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ STATUS_NAME=`echo $RESP | grep -o '"statusName":".*"' | cut -f4 -d\"`

if [ "$STATUS_NAME" = "in-progress" ]
then
echo "Workflow ended with an error."
echo $RESP
echo "Workflow with PTFs ended with an error." >> report.txt
echo $RESP >> report.txt
exit -1
elif [ "$STATUS_NAME" = "complete" ]
then
Expand Down
22 changes: 11 additions & 11 deletions pswi/03_create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ 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":"ZOWE Configuration of Zowe 3.0","description":"This workflow configures 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.",
Expand Down Expand Up @@ -79,8 +79,8 @@ then
then
echo "${ZOWE_MOUNT} with zFS ${ZOWE_ZFS} mounted will be used."
else
echo "The file system ${ZOWE_ZFS} exists but is mounted to different mount point ${MOUNTZ}."
echo "It is required to have the file system ${ZOWE_ZFS} mounted to the exact mount point (${ZOWE_MOUNT}) to successfully export Zowe PSWI."
echo "The file system ${ZOWE_ZFS} exists but is mounted to different mount point ${MOUNTZ}." >> report.txt
echo "It is required to have the file system ${ZOWE_ZFS} mounted to the exact mount point (${ZOWE_MOUNT}) to successfully export Zowe PSWI." >> report.txt
exit -1
fi
else
Expand All @@ -90,7 +90,7 @@ else
if [ -n "$MOUNTZFS" ]
then
# If ZFS is not mounted to the mountpoint then this ZOWE mountpoint has different zFS
echo "The mountpoint ${ZOWE_MOUNT} has different zFS ${MOUNTZFS}."
echo "The mountpoint ${ZOWE_MOUNT} has different zFS ${MOUNTZFS}." >> report.txt
exit -1
else
# Mount zFS to Zowe mountpoint
Expand All @@ -108,14 +108,14 @@ RESP=`curl -s $CHECK_WORKFLOW_DSN_URL -k -X "GET" -H "Content-Type: application/
DS_COUNT=`echo $RESP | grep -o '"returnedRows":[0-9]*' | cut -f2 -d:`
if [ $DS_COUNT -ne 0 ]
then
echo "The ${WORKFLOW_DSN} already exist. Because there is a possibility that it contains something unwanted the script does not continue."
echo "The ${WORKFLOW_DSN} already exist. Because there is a possibility that it contains something unwanted the script does not continue." >> report.txt
exit -1
else
echo "Creating a data set where the post-Deployment workflow will be stored."
RESP=`curl -s $WORKFLOW_DSN_URL -k -X "POST" -d "$ADD_WORKFLOW_DSN_JSON" -H "Content-Type: application/json" -H "X-CSRF-ZOSMF-HEADER: A" --user $ZOSMF_USER:$ZOSMF_PASS`
if [ -n "$RESP" ]
then
echo "The creation of the ${WORKFLOW_DSN} was not successful. Error message: ${RESP}"
echo "The creation of the ${WORKFLOW_DSN} was not successful. Error message: ${RESP}" >> report.txt
exit -1
fi
fi
Expand Down Expand Up @@ -173,7 +173,7 @@ RESP=`curl -s $CHECK_EXPORT_DSN_URL -k -X "GET" -H "Content-Type: application/js
DSN_COUNT=`echo $RESP | grep -o '"returnedRows":[0-9]*' | cut -f2 -d:`
if [ $DSN_COUNT -ne 0 ]
then
echo "The ${EXPORT_DSN} already exist. Because there is a possibility that it contains something unwanted the script does not continue."
echo "The ${EXPORT_DSN} already exist. Because there is a possibility that it contains something unwanted the script does not continue." >> report.txt
exit -1
else
echo "Creating a data set where the export jobs will be stored."
Expand Down Expand Up @@ -209,7 +209,7 @@ if [ $? -gt 0 ];then exit -1;fi
LOAD_STATUS_URL=`echo $RESP | grep -o '"statusurl":".*"' | cut -f4 -d\" | tr -d '\' 2>/dev/null`
if [ -z "$LOAD_STATUS_URL" ]
then
echo "No response from the REST API call."
echo "No response from the load product REST API call." >> report.txt
exit -1
fi

Expand Down Expand Up @@ -239,7 +239,7 @@ if [ $? -gt 0 ];then exit -1;fi
EXPORT_STATUS_URL=`echo $RESP | grep -o '"statusurl":".*"' | cut -f4 -d\" | tr -d '\' 2>/dev/null`
if [ -z "$EXPORT_STATUS_URL" ]
then
echo "No response from the REST API call."
echo "No response from the export REST API call." >> report.txt
exit -1
fi

Expand All @@ -266,7 +266,7 @@ then
# Can be 100% but still running
if [ "$STATUS" != "complete" ] && [ "$STATUS" != "running" ]
then
echo "Status of generation of Export JCL failed."
echo "Status of generation of Export JCL failed." >> report.txt
exit -1
fi
fi
Expand All @@ -275,7 +275,7 @@ done

if [ -z "$DSN" ]
then
echo "The creation of export JCL failed"
echo "The creation of export JCL failed" >> report.txt
exit -1
fi

Expand Down
28 changes: 28 additions & 0 deletions pswi/051_test_workflows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
#version=1.0

export BASE_URL="${ZOSMF_URL}:${ZOSMF_PORT}"

echo ""
echo ""
echo "Script for testing workflows..."
echo "Host :" $ZOSMF_URL
echo "Port :" $ZOSMF_PORT
echo "SSH Port :" $ZZOW_SSH_PORT
echo "z/OSMF system :" $ZOSMF_SYSTEM
echo "Test HLQ :" $TEST_HLQ
echo "Test mount point :" $TEST_MOUNT
echo "Work zFS :" $WORK_ZFS # For z/OSMF v2.3
echo "Work mount point :" $WORK_MOUNT # For z/OSMF v2.3

echo "Mounting ${TEST_HLQ}.ZFS"
sh scripts/tmp_mounts.sh "${TEST_HLQ}.ZFS" "${TEST_MOUNT}"
if [ $? -gt 0 ]; then exit -1; fi

echo "Registering/testing the configuration workflow ${TEST_HLQ}.WORKFLOW(ZWECONF)"
sh scripts/wf_run_test.sh "${TEST_HLQ}.WORKFLOW(ZWECONF)"
if [ $? -gt 0 ];then exit -1;fi

echo "Registering/testing the configuration workflow ${TEST_MOUNT}/files/workflows/ZWECONF.xml"
sh scripts/wf_run_test.sh "${TEST_MOUNT}/files/workflows/ZWECONF.xml"
if [ $? -gt 0 ];then exit -1;fi
Loading

0 comments on commit eb1248f

Please sign in to comment.